module Bradach

Extended Modules

Defined in:

bradach.cr

Constant Summary

VERSION = "0.1.1"

The version of the program.

Class Method Summary

Instance Method Summary

Class Method Detail

def self.addr : String #

The address on which to listen (when daemon is true)


[View source]
def self.addr=(addr : String) #

The address on which to listen (when daemon is true)


[View source]
def self.cors : String #

An origin to use for CORS


[View source]
def self.cors=(cors : String) #

An origin to use for CORS


[View source]
def self.count : Int32 #

The (max) number of results shown.


[View source]
def self.count=(count : Int32) #

The (max) number of results shown.


[View source]
def self.daemon=(daemon : Bool) #

If true, instead of searching, the application will listen on .port/tcp for new connections and serve JSON responses.


[View source]
def self.daemon? : Bool #

If true, instead of searching, the application will listen on .port/tcp for new connections and serve JSON responses.


[View source]
def self.json=(json : Bool) #

If true, the results are printed as a JSON array, rather than as a list of magnet links. Has no effect in daemon mode.


[View source]
def self.json? : Bool #

If true, the results are printed as a JSON array, rather than as a list of magnet links. Has no effect in daemon mode.


[View source]
def self.port : Int32 #

The port on which to listen (when daemon is true)


[View source]
def self.port=(port : Int32) #

The port on which to listen (when daemon is true)


[View source]
def self.trackers : Array(String) #

The list of trackers used to create magnet links.


[View source]
def self.trackers=(trackers : Array(String)) #

The list of trackers used to create magnet links.


[View source]
def self.url : String #

The URL used to search. Can be set with $BRADACH_API_URL.


[View source]
def self.url=(url : String) #

The URL used to search. Can be set with $BRADACH_API_URL.


[View source]
def self.version : String #

A version string for the programme.


[View source]
def self.version=(version : String) #

A version string for the programme.


[View source]
def self.webroot : String #

A directory from which to serve static files (in daemon mode).


[View source]
def self.webroot=(webroot : String) #

A directory from which to serve static files (in daemon mode).


[View source]

Instance Method Detail

def parse(args : Array(String) = ARGV) #

Parses the given command-line args using an OptionParser.


[View source]