organo 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/lib/organo/commands/anime/anime_add.rb +4 -2
  3. data/lib/organo/commands/anime/anime_add_sequel.rb +4 -2
  4. data/lib/organo/commands/anime/anime_get_broken_links.rb +3 -1
  5. data/lib/organo/commands/anime/anime_remove.rb +4 -0
  6. data/lib/organo/commands/anime/anime_search.rb +3 -1
  7. data/lib/organo/commands/anime/anime_show.rb +4 -0
  8. data/lib/organo/commands/anime/anime_update_image.rb +6 -2
  9. data/lib/organo/commands/anime/anime_update_query.rb +6 -2
  10. data/lib/organo/commands/api/api_get_anime.rb +2 -0
  11. data/lib/organo/commands/api/api_get_season.rb +3 -3
  12. data/lib/organo/commands/api/api_get_sequels.rb +4 -2
  13. data/lib/organo/commands/api/api_search_anime.rb +6 -4
  14. data/lib/organo/commands/init.rb +3 -1
  15. data/lib/organo/commands/merge.rb +7 -3
  16. data/lib/organo/commands/remote/remote_add.rb +10 -6
  17. data/lib/organo/commands/remote/remote_download.rb +7 -3
  18. data/lib/organo/commands/remote/remote_remove.rb +8 -4
  19. data/lib/organo/commands/remote/remote_upload.rb +7 -3
  20. data/lib/organo/commands/statistics.rb +17 -6
  21. data/lib/organo/commands/version.rb +3 -1
  22. data/lib/organo/query.rb +1 -1
  23. data/lib/organo/show_list.rb +2 -2
  24. data/lib/organo/tools/check.rb +12 -0
  25. data/lib/organo/tools/local_search.rb +1 -1
  26. data/lib/organo/{reader.rb → tools/reader.rb} +2 -2
  27. data/lib/organo/version.rb +1 -1
  28. data/lib/organo.rb +27 -32
  29. metadata +8 -7
  30. /data/lib/organo/{search_show.rb → model/search_show.rb} +0 -0
  31. /data/lib/organo/{sequel.rb → model/sequel.rb} +0 -0
  32. /data/lib/organo/{show.rb → model/show.rb} +0 -0
  33. /data/lib/organo/{writer.rb → tools/writer.rb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7145d1efb8ac5804c2c0d786c2854dd9d92b209fceb33ca02192ae86fe0e65a
4
- data.tar.gz: 77ff5845dd17c7ec583cbe5dace3833e52c3ca02e3d36b1b479d2140a97d908e
3
+ metadata.gz: b58779cd5ac92ef4f14f3b3abd75b221393b45d18f8268e3c967fce213d1563c
4
+ data.tar.gz: b16f8fe0a6b7a2a6cddfd5b49484710923aca86bd21bd6dc034143d352391652
5
5
  SHA512:
6
- metadata.gz: 03c4f273847259ab1af9319ec390df5badfdcf448a9208bb20992b5e1b3d8d06bd7a22580a1c54bdd7268e0595825d560ae9269bf8556b1c9178967e03aa9a26
7
- data.tar.gz: 5003d8cbac8a154dbcb57c2698504b86faef172a705d20b9d070f786a70c0ac53013e7ac5e24dac9699fec73808bcc244e1721531a43a47d5364459f3560213e
6
+ metadata.gz: ebe9ecb20f6aca8e4248b518a132789296c81b166a263124010d401e6bc9916577c1c9d1224eab9f0610314d634cac78482bd4cc5d474b98de8388e6ce44048e
7
+ data.tar.gz: 2bc797f151ee354347375d77e85f1b7ac0429ed7173a7fa1d2bbce12f4dcb01a339513851059895b251d554d5a4405b91b3995e4703e9e2ceebb3353d46702f3
@@ -1,7 +1,8 @@
1
1
  require_relative '../../config'
2
- require_relative '../../writer'
3
- require_relative '../../reader'
2
+ require_relative '../../tools/writer'
3
+ require_relative '../../tools/reader'
4
4
  require_relative '../../tools/local_search'
5
+ require_relative '../../tools/check'
5
6
 
6
7
  module Organo
7
8
  module CLI
@@ -14,6 +15,7 @@ module Organo
14
15
  argument :mal_id, type: :integer, required: true, desc: 'MyAnimeList ID'
15
16
 
16
17
  def call(mal_id:, **)
18
+ Check.init?
17
19
  if LocalSearch.find_anime_by_id(mal_id).nil?
18
20
  json_obj = Query.get_anime_by_id(mal_id)
19
21
  show = SearchShow.new(json_obj['mal_id'], json_obj['title'], json_obj['images']['jpg']['image_url'])
@@ -1,9 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative '../../config'
4
- require_relative '../../writer'
5
- require_relative '../../reader'
4
+ require_relative '../../tools/writer'
5
+ require_relative '../../tools/reader'
6
6
  require_relative '../../tools/local_search'
7
+ require_relative '../../tools/check'
7
8
 
8
9
  module Organo
9
10
  module CLI
@@ -20,6 +21,7 @@ module Organo
20
21
  argument :type_num, type: :integer, required: false, default: 0, desc: 'The sequel type number'
21
22
 
22
23
  def call(anime_mal_id:, sequel_mal_id:, season_num:, type:, type_num:, **)
24
+ Check.init?
23
25
  if LocalSearch.find_anime_by_id(sequel_mal_id).nil?
24
26
  json_obj = Query.get_anime_by_id(sequel_mal_id)
25
27
  sequel = Sequel.new(
@@ -1,5 +1,6 @@
1
1
  require 'httparty'
2
- require_relative '../../reader'
2
+ require_relative '../../tools/reader'
3
+ require_relative '../../tools/check'
3
4
 
4
5
  module Organo
5
6
  module CLI
@@ -11,6 +12,7 @@ module Organo
11
12
  desc 'Get list of anime IDs that have broken links'
12
13
 
13
14
  def call(*)
15
+ Check.init?
14
16
  show_list = Reader.read_all_files
15
17
  broken_list = []
16
18
  show_list.each do |show|
@@ -1,4 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative '../../config'
4
+ require_relative '../../tools/check'
2
5
 
3
6
  module Organo
4
7
  module CLI
@@ -10,6 +13,7 @@ module Organo
10
13
  argument :mal_id, type: :integer, required: true, desc: 'MyAnimeList ID'
11
14
 
12
15
  def call(mal_id:, **)
16
+ Check.init?
13
17
  Dir["#{Config::DEFAULT_DIR}/*.json"].each do |file_path|
14
18
  shows_list = Reader.read_file(file_path)
15
19
  show_index = shows_list.find_index { |s| s.id.to_s == mal_id.to_s }
@@ -2,6 +2,7 @@
2
2
 
3
3
  require_relative '../../config'
4
4
  require_relative '../../tools/local_search'
5
+ require_relative '../../tools/check'
5
6
 
6
7
  module Organo
7
8
  module CLI
@@ -13,7 +14,8 @@ module Organo
13
14
  argument :query, type: :string, required: true, desc: 'Search query'
14
15
 
15
16
  def call(query:, **)
16
- puts (LocalSearch.find_anime_by_query(query).map{ |anime| anime.to_json })
17
+ Check.init?
18
+ puts (LocalSearch.find_anime_by_query(query).map{ |anime| anime.to_json} )
17
19
  end
18
20
  end
19
21
 
@@ -1,4 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative '../../config'
4
+ require_relative '../../tools/check'
2
5
 
3
6
  module Organo
4
7
  module CLI
@@ -10,6 +13,7 @@ module Organo
10
13
  argument :mal_id, type: :integer, required: true, desc: 'MyAnimeList ID'
11
14
 
12
15
  def call(mal_id:, **)
16
+ Check.init?
13
17
  found = false
14
18
  Dir["#{Config::DEFAULT_DIR}/*.json"].each do |file_path|
15
19
  shows_list = Reader.read_file(file_path)
@@ -1,7 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative '../../config'
2
4
  require_relative '../../query'
3
- require_relative '../../writer'
4
- require_relative '../../reader'
5
+ require_relative '../../tools/writer'
6
+ require_relative '../../tools/reader'
7
+ require_relative '../../tools/check'
5
8
 
6
9
  module Organo
7
10
  module CLI
@@ -14,6 +17,7 @@ module Organo
14
17
  argument :mal_id_list, type: :array, required: true, desc: 'MyAnimeList ID list'
15
18
 
16
19
  def call(mal_id_list:, **)
20
+ Check.init?
17
21
  found = false
18
22
  Dir["#{Config::DEFAULT_DIR}/*.json"].each do |file_path|
19
23
  shows_list = Reader.read_file(file_path)
@@ -1,6 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative '../../config'
2
- require_relative '../../writer'
3
- require_relative '../../reader'
4
+ require_relative '../../tools/writer'
5
+ require_relative '../../tools/reader'
6
+ require_relative '../../tools/check'
4
7
 
5
8
  module Organo
6
9
  module CLI
@@ -14,6 +17,7 @@ module Organo
14
17
  argument :search_query, type: :string, required: true, desc: 'String query for Nyaa Torrents search'
15
18
 
16
19
  def call(mal_id:, search_query:, **)
20
+ Check.init?
17
21
  Dir["#{Config::DEFAULT_DIR}/*.json"].each do |file_path|
18
22
  shows_list = Reader.read_file(file_path)
19
23
  show = shows_list.find { |s| s.id.to_s == mal_id.to_s }
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative '../../query'
2
4
  require_relative '../../show_list'
3
5
 
@@ -8,9 +8,9 @@ module Organo
8
8
  module Get
9
9
 
10
10
  class Season < Dry::CLI::Command
11
- desc "Get list of anime for a specific season"
12
- argument :season, type: :string, required: true, desc: "Winter, Spring, Summer or Fall"
13
- argument :year, type: :integer, required: true, desc: "Year"
11
+ desc 'Get list of anime for a specific season'
12
+ argument :season, type: :string, required: true, desc: 'Winter, Spring, Summer or Fall'
13
+ argument :year, type: :integer, required: true, desc: 'Year'
14
14
 
15
15
  def call(season:, year:, **)
16
16
  json_obj = Query.get_anime_season(season, year)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative '../../query'
2
4
  require_relative '../../show_list'
3
5
 
@@ -8,8 +10,8 @@ module Organo
8
10
  module Get
9
11
 
10
12
  class Sequels < Dry::CLI::Command
11
- desc "Get list of sequels for a specific anime"
12
- argument :mal_id, type: :integer, required: true, desc: "MyAnimeList ID"
13
+ desc 'Get list of sequels for a specific anime'
14
+ argument :mal_id, type: :integer, required: true, desc: 'MyAnimeList ID'
13
15
 
14
16
  def call(mal_id:, **)
15
17
  sequels = ShowList.create_search_sequel_list(Query.get_anime_sequel(mal_id))
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative '../../query'
2
4
  require_relative '../../show_list'
3
5
 
@@ -8,10 +10,10 @@ module Organo
8
10
  module Search
9
11
 
10
12
  class Anime < Dry::CLI::Command
11
- desc "Get a list anime from query"
12
- argument :query, type: :string, required: true, desc: "Search query"
13
- option :type, type: :string, required: false, default: '', values: %w[tv movie ova special ona music], desc: "Type of anime"
14
- option :limit, type: :integer, required: false, default: 5, desc: "Limit number of results"
13
+ desc 'Get a list anime from query'
14
+ argument :query, type: :string, required: true, desc: 'Search query'
15
+ option :type, type: :string, required: false, default: '', values: %w[tv movie ova special ona music], desc: 'Type of anime'
16
+ option :limit, type: :integer, required: false, default: 5, desc: 'Limit number of results'
15
17
 
16
18
  def call(query:, type:, limit:, **)
17
19
  json_obj = Query.search_anime(query, { 'type' => type, 'limit' => limit})
@@ -1,9 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Organo
2
4
  module CLI
3
5
  module Commands
4
6
 
5
7
  class Init < Dry::CLI::Command
6
- desc "Initialize directory with default files and directories"
8
+ desc 'Initialize directory with default files and directories'
7
9
 
8
10
  def call(*)
9
11
  Dir.mkdir './.organo' unless File.exist?('./.organo')
@@ -1,14 +1,18 @@
1
- require_relative '../reader'
2
- require_relative '../writer'
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../tools/reader'
4
+ require_relative '../tools/writer'
5
+ require_relative '../tools/check'
3
6
 
4
7
  module Organo
5
8
  module CLI
6
9
  module Commands
7
10
 
8
11
  class Merge < Dry::CLI::Command
9
- desc "Merge edited seasonal files into one main file"
12
+ desc 'Merge edited seasonal files into one main file'
10
13
 
11
14
  def call(*)
15
+ Check.init?
12
16
  show_list = Reader.read_all_files
13
17
  Writer.to_data_file(show_list, 'shows')
14
18
  puts 'Edited files have been merged.'
@@ -1,4 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative '../../config'
4
+ require_relative '../../tools/check'
2
5
 
3
6
  module Organo
4
7
  module CLI
@@ -6,14 +9,15 @@ module Organo
6
9
  module Remote
7
10
 
8
11
  class Add < Dry::CLI::Command
9
- desc "Add remote FTP server to config file"
10
- argument :env, type: :string, required: true, desc: "Remote environment name"
11
- argument :url, type: :string, required: true, desc: "FTP server url"
12
- option :username, type: :string, default: '', desc: "FTP account username"
13
- option :password, type: :string, default: '', desc: "FTP account password"
14
- option :directory, type: :string, default: '', desc: "FTP directory"
12
+ desc 'Add remote FTP server to config file'
13
+ argument :env, type: :string, required: true, desc: 'Remote environment name'
14
+ argument :url, type: :string, required: true, desc: 'FTP server url'
15
+ option :username, type: :string, default: '', desc: 'FTP account username'
16
+ option :password, type: :string, default: '', desc: 'FTP account password'
17
+ option :directory, type: :string, default: '', desc: 'FTP directory'
15
18
 
16
19
  def call(env:, url:, username:, password:, directory:, **)
20
+ Check.init?
17
21
  config = File.exist?(Config::DEFAULT_FILE) ? JSON.parse(File.read(Config::DEFAULT_FILE)) : Array.new
18
22
  section = config.find { |option| option['section'] == 'remotes' }
19
23
  remote = { env: env, url: url, username: username, password: password, directory: directory }
@@ -1,4 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'net/ftp'
4
+ require_relative '../../tools/check'
2
5
 
3
6
  module Organo
4
7
  module CLI
@@ -6,14 +9,15 @@ module Organo
6
9
  module Remote
7
10
 
8
11
  class Download < Dry::CLI::Command
9
- desc "Download data from website"
10
- argument :env, type: :string, required: true, desc: "Environment"
12
+ desc 'Download data from website'
13
+ argument :env, type: :string, required: true, desc: 'Environment'
11
14
 
12
15
  def call(env:, **)
16
+ Check.init?
13
17
  config = File.exist?(Config::DEFAULT_FILE) ? JSON.parse(File.read(Config::DEFAULT_FILE)) : nil
14
18
  section = config.find { |option| option['section'] == 'remotes' }
15
19
  if section.nil?
16
- puts "No remote is configured in the configuration file"
20
+ puts 'No remote is configured in the configuration file'
17
21
  else
18
22
  credentials = section['entries'].find { |entry| entry['env'] == env }
19
23
  if credentials.nil?
@@ -1,4 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative '../../config'
4
+ require_relative '../../tools/check'
2
5
 
3
6
  module Organo
4
7
  module CLI
@@ -6,17 +9,18 @@ module Organo
6
9
  module Remote
7
10
 
8
11
  class Remove < Dry::CLI::Command
9
- desc "Remove remote FTP server from config file"
10
- argument :env, type: :string, required: true, desc: "Remote environment name"
12
+ desc 'Remove remote FTP server from config file'
13
+ argument :env, type: :string, required: true, desc: 'Remote environment name'
11
14
 
12
15
  def call(env:, **)
16
+ Check.init?
13
17
  config = File.exist?(Config::DEFAULT_FILE) ? JSON.parse(File.read(Config::DEFAULT_FILE)) : nil
14
18
  unless config.nil?
15
19
  section = config.find { |option| option['section'] == 'remotes' }
16
- unless section.nil?
20
+ if !section.nil?
17
21
  index = section['entries'].find_index { |entry| entry['env'] == env }
18
22
  if index.nil?
19
- puts "Specified environment does not exist"
23
+ puts 'Specified environment does not exist'
20
24
  elsif !section['entries'].delete_at(index).nil?
21
25
  puts "Removed \"#{env}\" entry"
22
26
  end
@@ -1,4 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'net/ftp'
4
+ require_relative '../../tools/check'
2
5
 
3
6
  module Organo
4
7
  module CLI
@@ -6,14 +9,15 @@ module Organo
6
9
  module Remote
7
10
 
8
11
  class Upload < Dry::CLI::Command
9
- desc "Upload data to the website FTP"
10
- argument :env, type: :string, required: true, desc: "Environment"
12
+ desc 'Upload data to the website FTP'
13
+ argument :env, type: :string, required: true, desc: 'Environment'
11
14
 
12
15
  def call(env:, **)
16
+ Check.init?
13
17
  config = File.exist?(Config::DEFAULT_FILE) ? JSON.parse(File.read(Config::DEFAULT_FILE)) : nil
14
18
  section = config.find { |option| option['section'] == 'remotes' }
15
19
  if section.nil?
16
- puts "No remote is configured in the configuration file"
20
+ puts 'No remote is configured in the configuration file'
17
21
  else
18
22
  credentials = section['entries'].find { |entry| entry['env'] == env }
19
23
  if credentials.nil?
@@ -1,23 +1,34 @@
1
- require_relative '../reader'
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../tools/reader'
4
+ require_relative '../tools/check'
2
5
 
3
6
  module Organo
4
7
  module CLI
5
8
  module Commands
6
9
 
7
10
  class Statistics < Dry::CLI::Command
8
- desc "Merge edited seasonal files into one main file"
11
+ desc 'Merge edited seasonal files into one main file'
9
12
 
10
13
  def call(*)
11
- i = 0
14
+ Check.init?
15
+ shows_num = 0
12
16
  total_size = 0
17
+ sequels_num = 0
13
18
  Dir["#{Config::DEFAULT_DIR}/*.json"].each do |file_path|
14
19
  shows = Reader.read_file(file_path)
15
20
  file_size = File.size(file_path)
16
- puts "#{File.basename(file_path)}: #{shows.count} (#{file_size} b)"
17
- i += shows.count
21
+ puts "#{File.basename(file_path)}: #{shows.count} (#{file_size.to_f / 1000} KB)"
22
+ shows_num += shows.count
23
+ shows.each do |show|
24
+ sequels_num += show.sequels.size
25
+ end
18
26
  total_size += file_size
19
27
  end
20
- puts "Total count: #{i} (#{total_size} o)"
28
+ puts '------------------------------'
29
+ puts "Shows count: #{shows_num}"
30
+ puts "Sequels count: #{sequels_num}"
31
+ puts "Total file size: #{total_size.to_f / 1000} KB"
21
32
  end
22
33
  end
23
34
 
@@ -1,10 +1,12 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative '../version'
2
4
 
3
5
  module Organo
4
6
  module CLI
5
7
  module Commands
6
8
  class Version < Dry::CLI::Command
7
- desc "Print version"
9
+ desc 'Print version'
8
10
 
9
11
  def call(*)
10
12
  puts Organo::VERSION
data/lib/organo/query.rb CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative 'jikan_api'
4
4
  require_relative 'request'
5
- require_relative 'search_show'
5
+ require_relative 'model/search_show'
6
6
 
7
7
  module Organo
8
8
  class Query
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'json'
4
- require_relative 'search_show'
5
- require_relative 'sequel'
4
+ require_relative 'model/search_show'
5
+ require_relative 'model/sequel'
6
6
  require_relative 'query'
7
7
 
8
8
  module Organo
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Organo
4
+ class Check
5
+ def self.init?
6
+ unless Dir.exist?('.organo')
7
+ puts "Directory is not initialized.\nYou can initialize the current directory with the following command:\n$ organo init"
8
+ exit
9
+ end
10
+ end
11
+ end
12
+ end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'json'
4
- require_relative '../reader'
4
+ require_relative 'reader'
5
5
 
6
6
  module Organo
7
7
  class LocalSearch
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'json'
4
- require_relative 'config'
5
- require_relative 'show'
4
+ require_relative '../config'
5
+ require_relative '../model/show'
6
6
 
7
7
  module Organo
8
8
  class Reader
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Organo
4
- VERSION = '0.3.4'
4
+ VERSION = '0.3.5'
5
5
  end
data/lib/organo.rb CHANGED
@@ -30,38 +30,33 @@ module Organo
30
30
 
31
31
  register 'version', Version, aliases: %w[v -v --version]
32
32
  register 'init', Init
33
-
34
- if Dir.exist?('.organo')
35
- register 'anime' do |prefix|
36
- prefix.register 'add', Anime::Add::AnimeEntry
37
- prefix.register 'add sequel', Anime::Add::SequelEntry
38
- prefix.register 'remove', Anime::Remove
39
- prefix.register 'show', Anime::Show
40
- prefix.register 'search', Anime::Search
41
- prefix.register 'update image', Anime::Update::Image
42
- prefix.register 'update search_query', Anime::Update::SearchQuery
43
- prefix.register 'get broken_links', Anime::Get::BrokenLinks
44
- end
45
- register 'api' do |prefix|
46
- prefix.register 'get anime', API::Get::Anime
47
- prefix.register 'get season', API::Get::Season
48
- prefix.register 'get sequels', API::Get::Sequels
49
- prefix.register 'search anime', API::Search::Anime
50
- prefix.register 'get schedule', API::Get::Schedule
51
- end
52
- register 'merge', Merge
53
- register 'statistics', Statistics
54
- register 'remote' do |prefix|
55
- prefix.register 'add', Remote::Add
56
- prefix.register 'remove', Remote::Remove
57
- prefix.register 'download', Remote::Download
58
- prefix.register 'upload', Remote::Upload
59
- end
60
- register 'schedule' do |prefix|
61
- prefix.register 'create', Schedule::Create
62
- end
63
- else
64
- puts 'This directory has not been initialized.'
33
+ register 'anime' do |prefix|
34
+ prefix.register 'add', Anime::Add::AnimeEntry
35
+ prefix.register 'add sequel', Anime::Add::SequelEntry
36
+ prefix.register 'remove', Anime::Remove
37
+ prefix.register 'show', Anime::Show
38
+ prefix.register 'search', Anime::Search
39
+ prefix.register 'update image', Anime::Update::Image
40
+ prefix.register 'update search_query', Anime::Update::SearchQuery
41
+ prefix.register 'get broken_links', Anime::Get::BrokenLinks
42
+ end
43
+ register 'api' do |prefix|
44
+ prefix.register 'get anime', API::Get::Anime
45
+ prefix.register 'get season', API::Get::Season
46
+ prefix.register 'get sequels', API::Get::Sequels
47
+ prefix.register 'search anime', API::Search::Anime
48
+ prefix.register 'get schedule', API::Get::Schedule
49
+ end
50
+ register 'merge', Merge
51
+ register 'statistics', Statistics
52
+ register 'remote' do |prefix|
53
+ prefix.register 'add', Remote::Add
54
+ prefix.register 'remove', Remote::Remove
55
+ prefix.register 'download', Remote::Download
56
+ prefix.register 'upload', Remote::Upload
57
+ end
58
+ register 'schedule' do |prefix|
59
+ prefix.register 'create', Schedule::Create
65
60
  end
66
61
  end
67
62
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: organo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Louis-Philippe Fortin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-26 00:00:00.000000000 Z
11
+ date: 2023-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli
@@ -110,16 +110,17 @@ files:
110
110
  - lib/organo/commands/version.rb
111
111
  - lib/organo/config.rb
112
112
  - lib/organo/jikan_api.rb
113
+ - lib/organo/model/search_show.rb
114
+ - lib/organo/model/sequel.rb
115
+ - lib/organo/model/show.rb
113
116
  - lib/organo/query.rb
114
- - lib/organo/reader.rb
115
117
  - lib/organo/request.rb
116
- - lib/organo/search_show.rb
117
- - lib/organo/sequel.rb
118
- - lib/organo/show.rb
119
118
  - lib/organo/show_list.rb
119
+ - lib/organo/tools/check.rb
120
120
  - lib/organo/tools/local_search.rb
121
+ - lib/organo/tools/reader.rb
122
+ - lib/organo/tools/writer.rb
121
123
  - lib/organo/version.rb
122
- - lib/organo/writer.rb
123
124
  homepage: https://gitlab.com/dkb-weeblets/organo
124
125
  licenses:
125
126
  - MIT
File without changes
File without changes
File without changes