nyastodon/lib/mastodon/cli/main.rb

79 lines
2.2 KiB
Ruby
Raw Normal View History

# frozen_string_literal: true
require_relative 'base'
require_relative 'accounts'
require_relative 'cache'
require_relative 'canonical_email_blocks'
require_relative 'domains'
require_relative 'email_domain_blocks'
require_relative 'emoji'
require_relative 'federation'
require_relative 'feeds'
require_relative 'ip_blocks'
require_relative 'maintenance'
require_relative 'media'
require_relative 'preview_cards'
require_relative 'search'
require_relative 'settings'
require_relative 'statuses'
require_relative 'upgrade'
module Mastodon::CLI
class Main < Base
desc 'media SUBCOMMAND ...ARGS', 'Manage media files'
subcommand 'media', Media
desc 'emoji SUBCOMMAND ...ARGS', 'Manage custom emoji'
subcommand 'emoji', Emoji
desc 'accounts SUBCOMMAND ...ARGS', 'Manage accounts'
subcommand 'accounts', Accounts
desc 'feeds SUBCOMMAND ...ARGS', 'Manage feeds'
subcommand 'feeds', Feeds
desc 'search SUBCOMMAND ...ARGS', 'Manage the search engine'
subcommand 'search', Search
desc 'settings SUBCOMMAND ...ARGS', 'Manage dynamic settings'
subcommand 'settings', Settings
desc 'statuses SUBCOMMAND ...ARGS', 'Manage statuses'
subcommand 'statuses', Statuses
desc 'domains SUBCOMMAND ...ARGS', 'Manage account domains'
subcommand 'domains', Domains
2019-01-17 21:32:55 +01:00
desc 'preview_cards SUBCOMMAND ...ARGS', 'Manage preview cards'
subcommand 'preview_cards', PreviewCards
2019-05-04 01:02:57 +02:00
desc 'cache SUBCOMMAND ...ARGS', 'Manage cache'
subcommand 'cache', Cache
2019-05-04 01:02:57 +02:00
desc 'upgrade SUBCOMMAND ...ARGS', 'Various version upgrade utilities'
subcommand 'upgrade', Upgrade
desc 'email_domain_blocks SUBCOMMAND ...ARGS', 'Manage e-mail domain blocks'
subcommand 'email_domain_blocks', EmailDomainBlocks
2020-10-12 16:33:49 +02:00
desc 'ip_blocks SUBCOMMAND ...ARGS', 'Manage IP blocks'
subcommand 'ip_blocks', IpBlocks
2020-10-12 16:33:49 +02:00
desc 'canonical_email_blocks SUBCOMMAND ...ARGS', 'Manage canonical e-mail blocks'
subcommand 'canonical_email_blocks', CanonicalEmailBlocks
desc 'maintenance SUBCOMMAND ...ARGS', 'Various maintenance utilities'
subcommand 'maintenance', Maintenance
include Federation
2019-01-17 21:32:55 +01:00
map %w(--version -v) => :version
desc 'version', 'Show version'
def version
say(Mastodon::Version.to_s)
end
end
end