2018-08-25 20:25:39 +09:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-05-24 18:55:40 +09:00
|
|
|
require_relative 'base'
|
|
|
|
|
2023-05-23 23:08:26 +09:00
|
|
|
require_relative 'accounts'
|
2023-05-24 18:55:40 +09:00
|
|
|
require_relative 'cache'
|
|
|
|
require_relative 'canonical_email_blocks'
|
|
|
|
require_relative 'domains'
|
|
|
|
require_relative 'email_domain_blocks'
|
|
|
|
require_relative 'emoji'
|
2023-11-30 19:48:46 +09:00
|
|
|
require_relative 'federation'
|
2023-05-23 23:08:26 +09:00
|
|
|
require_relative 'feeds'
|
2023-05-24 18:55:40 +09:00
|
|
|
require_relative 'ip_blocks'
|
|
|
|
require_relative 'maintenance'
|
|
|
|
require_relative 'media'
|
|
|
|
require_relative 'preview_cards'
|
2023-05-23 23:08:26 +09:00
|
|
|
require_relative 'search'
|
|
|
|
require_relative 'settings'
|
|
|
|
require_relative 'statuses'
|
|
|
|
require_relative 'upgrade'
|
|
|
|
|
|
|
|
module Mastodon::CLI
|
2023-05-24 18:55:40 +09:00
|
|
|
class Main < Base
|
2018-08-27 03:21:03 +09:00
|
|
|
desc 'media SUBCOMMAND ...ARGS', 'Manage media files'
|
2023-05-23 23:08:26 +09:00
|
|
|
subcommand 'media', Media
|
2018-08-26 23:53:06 +09:00
|
|
|
|
2018-08-27 03:21:03 +09:00
|
|
|
desc 'emoji SUBCOMMAND ...ARGS', 'Manage custom emoji'
|
2023-05-23 23:08:26 +09:00
|
|
|
subcommand 'emoji', Emoji
|
2018-08-27 03:21:03 +09:00
|
|
|
|
|
|
|
desc 'accounts SUBCOMMAND ...ARGS', 'Manage accounts'
|
2023-05-23 23:08:26 +09:00
|
|
|
subcommand 'accounts', Accounts
|
2018-09-15 00:42:22 +09:00
|
|
|
|
|
|
|
desc 'feeds SUBCOMMAND ...ARGS', 'Manage feeds'
|
2023-05-23 23:08:26 +09:00
|
|
|
subcommand 'feeds', Feeds
|
2018-10-04 23:05:54 +09:00
|
|
|
|
2019-03-28 10:16:11 +09:00
|
|
|
desc 'search SUBCOMMAND ...ARGS', 'Manage the search engine'
|
2023-05-23 23:08:26 +09:00
|
|
|
subcommand 'search', Search
|
2019-03-28 10:16:11 +09:00
|
|
|
|
2018-10-04 23:05:54 +09:00
|
|
|
desc 'settings SUBCOMMAND ...ARGS', 'Manage dynamic settings'
|
2023-05-23 23:08:26 +09:00
|
|
|
subcommand 'settings', Settings
|
2018-10-28 05:56:16 +09:00
|
|
|
|
2019-03-11 21:45:17 +09:00
|
|
|
desc 'statuses SUBCOMMAND ...ARGS', 'Manage statuses'
|
2023-05-23 23:08:26 +09:00
|
|
|
subcommand 'statuses', Statuses
|
2019-03-11 21:45:17 +09:00
|
|
|
|
2018-10-28 05:56:16 +09:00
|
|
|
desc 'domains SUBCOMMAND ...ARGS', 'Manage account domains'
|
2023-05-23 23:08:26 +09:00
|
|
|
subcommand 'domains', Domains
|
2019-01-18 05:32:55 +09:00
|
|
|
|
2019-07-28 20:48:19 +09:00
|
|
|
desc 'preview_cards SUBCOMMAND ...ARGS', 'Manage preview cards'
|
2023-05-23 23:08:26 +09:00
|
|
|
subcommand 'preview_cards', PreviewCards
|
2019-07-28 20:48:19 +09:00
|
|
|
|
2019-05-04 08:02:57 +09:00
|
|
|
desc 'cache SUBCOMMAND ...ARGS', 'Manage cache'
|
2023-05-23 23:08:26 +09:00
|
|
|
subcommand 'cache', Cache
|
2019-05-04 08:02:57 +09:00
|
|
|
|
2020-04-27 06:29:08 +09:00
|
|
|
desc 'upgrade SUBCOMMAND ...ARGS', 'Various version upgrade utilities'
|
2023-05-23 23:08:26 +09:00
|
|
|
subcommand 'upgrade', Upgrade
|
2020-04-27 06:29:08 +09:00
|
|
|
|
2020-06-27 04:28:40 +09:00
|
|
|
desc 'email_domain_blocks SUBCOMMAND ...ARGS', 'Manage e-mail domain blocks'
|
2023-05-23 23:08:26 +09:00
|
|
|
subcommand 'email_domain_blocks', EmailDomainBlocks
|
2020-06-25 19:17:10 +09:00
|
|
|
|
2020-10-12 23:33:49 +09:00
|
|
|
desc 'ip_blocks SUBCOMMAND ...ARGS', 'Manage IP blocks'
|
2023-05-23 23:08:26 +09:00
|
|
|
subcommand 'ip_blocks', IpBlocks
|
2020-10-12 23:33:49 +09:00
|
|
|
|
2021-12-18 07:02:14 +09:00
|
|
|
desc 'canonical_email_blocks SUBCOMMAND ...ARGS', 'Manage canonical e-mail blocks'
|
2023-05-23 23:08:26 +09:00
|
|
|
subcommand 'canonical_email_blocks', CanonicalEmailBlocks
|
2021-12-18 07:02:14 +09:00
|
|
|
|
2020-11-20 01:37:49 +09:00
|
|
|
desc 'maintenance SUBCOMMAND ...ARGS', 'Various maintenance utilities'
|
2023-05-23 23:08:26 +09:00
|
|
|
subcommand 'maintenance', Maintenance
|
2020-11-20 01:37:49 +09:00
|
|
|
|
2023-11-30 19:48:46 +09:00
|
|
|
include Federation
|
2019-03-29 01:56:25 +09:00
|
|
|
|
2019-01-18 05:32:55 +09:00
|
|
|
map %w(--version -v) => :version
|
|
|
|
|
|
|
|
desc 'version', 'Show version'
|
|
|
|
def version
|
|
|
|
say(Mastodon::Version.to_s)
|
|
|
|
end
|
2018-08-25 20:25:39 +09:00
|
|
|
end
|
|
|
|
end
|