Module: Kat
- Defined in:
- lib/kat/app.rb,
lib/kat/colour.rb,
lib/kat/search.rb,
lib/kat/options.rb,
lib/kat/version.rb,
lib/kat/field_map.rb
Defined Under Namespace
Modules: Colour Classes: App, Options, Search
Constant Summary collapse
- BASE_URL =
'https://kat.cr'- RECENT_PATH =
'new'- SEARCH_PATH =
'usearch'- ADVANCED_URL =
"#{ BASE_URL }/torrents/search/advanced/"- NAME =
'Kickass Torrents Search'- VERSION =
'2.0.11'- MALEVOLENT_DICTATOR_FOR_LIFE =
'Fission Xuiptz'- AUTHOR =
MALEVOLENT_DICTATOR_FOR_LIFE- VERSION_STR =
"#{ NAME } #{ VERSION } (c) 2013 #{ MALEVOLENT_DICTATOR_FOR_LIFE }"- FIELD_MAP =
{ exact: { type: :string, desc: 'Exact phrase' }, or: { type: :string, desc: 'Optional words', multi: true }, without: { type: :string, desc: 'Without this word', multi: true }, sort: { type: :string, desc: 'Sort field (size, files, added, seeds, leeches)' }, asc: { desc: 'Ascending sort order (descending is default)' }, category: { type: :string, desc: 'Category', select: :categories, short: :c }, added: { type: :string, desc: 'Age of the torrent', select: :times, short: :a, sort: :time_add, id: :age }, size: { sort: :size }, user: { type: :string, desc: 'Uploader', input: true }, files: { type: :int, desc: 'Number of files', input: true, sort: :files_count }, imdb: { type: :int, desc: 'IMDB ID', input: true }, seeds: { type: :int, desc: 'Min no of seeders', input: true, sort: :seeders, short: :s }, leeches: { sort: :leechers }, season: { type: :int, desc: 'Television season', input: true }, episode: { type: :int, desc: 'Television episode', input: true, short: :e }, language: { type: :int, desc: 'Language', select: :languages, id: :lang_id }, platform: { type: :int, desc: 'Game platform', select: :platforms, id: :platform_id }, safe: { desc: 'Family safe filter', check: true, short: :none}, verified: { desc: 'Verified torrent', check: true, short: :none }, output: { type: :string, desc: 'Directory to save torrents in', short: :o }, colour: { desc: 'Output with colour', short: :none } }.freeze
Class Method Summary collapse
-
.app(args = ARGV) ⇒ Object
Convenience method for the App class.
-
.options(args) ⇒ Object
Convenience method for the Options class.
- .quick_search(search_term = nil) ⇒ Object
-
.search(search_term = nil, opts = {}) ⇒ Object
Convenience methods for the Search class.
Class Method Details
.app(args = ARGV) ⇒ Object
Convenience method for the App class
13 14 15 |
# File 'lib/kat/app.rb', line 13 def self.app(args = ARGV) App.new(args).main end |
.options(args) ⇒ Object
Convenience method for the Options class
9 10 11 |
# File 'lib/kat/options.rb', line 9 def self.(args) Options.parse args end |
.quick_search(search_term = nil) ⇒ Object
19 20 21 |
# File 'lib/kat/search.rb', line 19 def self.quick_search(search_term = nil) Search.quick_search search_term end |
.search(search_term = nil, opts = {}) ⇒ Object
Convenience methods for the Search class
15 16 17 |
# File 'lib/kat/search.rb', line 15 def self.search(search_term = nil, opts = {}) Search.new search_term, opts end |