2018-08-25 12:25:39 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'thor'
|
|
|
|
require_relative 'mastodon/media_cli'
|
2018-08-26 15:53:06 +01:00
|
|
|
require_relative 'mastodon/emoji_cli'
|
2018-08-26 19:21:03 +01:00
|
|
|
require_relative 'mastodon/accounts_cli'
|
2018-09-14 16:42:22 +01:00
|
|
|
require_relative 'mastodon/feeds_cli'
|
2019-03-28 01:16:11 +00:00
|
|
|
require_relative 'mastodon/search_cli'
|
2018-10-04 15:05:54 +01:00
|
|
|
require_relative 'mastodon/settings_cli'
|
2019-03-11 12:45:17 +00:00
|
|
|
require_relative 'mastodon/statuses_cli'
|
2018-10-27 21:56:16 +01:00
|
|
|
require_relative 'mastodon/domains_cli'
|
2019-01-17 20:32:55 +00:00
|
|
|
require_relative 'mastodon/version'
|
2018-09-14 16:42:22 +01:00
|
|
|
|
2018-08-25 12:25:39 +01:00
|
|
|
module Mastodon
|
|
|
|
class CLI < Thor
|
2018-10-25 15:05:33 +01:00
|
|
|
def self.exit_on_failure?
|
|
|
|
true
|
|
|
|
end
|
|
|
|
|
2018-08-26 19:21:03 +01:00
|
|
|
desc 'media SUBCOMMAND ...ARGS', 'Manage media files'
|
2018-08-25 12:25:39 +01:00
|
|
|
subcommand 'media', Mastodon::MediaCLI
|
2018-08-26 15:53:06 +01:00
|
|
|
|
2018-08-26 19:21:03 +01:00
|
|
|
desc 'emoji SUBCOMMAND ...ARGS', 'Manage custom emoji'
|
2018-08-26 15:53:06 +01:00
|
|
|
subcommand 'emoji', Mastodon::EmojiCLI
|
2018-08-26 19:21:03 +01:00
|
|
|
|
|
|
|
desc 'accounts SUBCOMMAND ...ARGS', 'Manage accounts'
|
|
|
|
subcommand 'accounts', Mastodon::AccountsCLI
|
2018-09-14 16:42:22 +01:00
|
|
|
|
|
|
|
desc 'feeds SUBCOMMAND ...ARGS', 'Manage feeds'
|
|
|
|
subcommand 'feeds', Mastodon::FeedsCLI
|
2018-10-04 15:05:54 +01:00
|
|
|
|
2019-03-28 01:16:11 +00:00
|
|
|
desc 'search SUBCOMMAND ...ARGS', 'Manage the search engine'
|
|
|
|
subcommand 'search', Mastodon::SearchCLI
|
|
|
|
|
2018-10-04 15:05:54 +01:00
|
|
|
desc 'settings SUBCOMMAND ...ARGS', 'Manage dynamic settings'
|
|
|
|
subcommand 'settings', Mastodon::SettingsCLI
|
2018-10-27 21:56:16 +01:00
|
|
|
|
2019-03-11 12:45:17 +00:00
|
|
|
desc 'statuses SUBCOMMAND ...ARGS', 'Manage statuses'
|
|
|
|
subcommand 'statuses', Mastodon::StatusesCLI
|
|
|
|
|
2018-10-27 21:56:16 +01:00
|
|
|
desc 'domains SUBCOMMAND ...ARGS', 'Manage account domains'
|
|
|
|
subcommand 'domains', Mastodon::DomainsCLI
|
2019-01-17 20:32:55 +00:00
|
|
|
|
|
|
|
map %w(--version -v) => :version
|
|
|
|
|
|
|
|
desc 'version', 'Show version'
|
|
|
|
def version
|
|
|
|
say(Mastodon::Version.to_s)
|
|
|
|
end
|
2018-08-25 12:25:39 +01:00
|
|
|
end
|
|
|
|
end
|