Skip to content

Instantly share code, notes, and snippets.

@tateisu
Created May 16, 2020 23:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tateisu/ba11d71cb15d3edcd768064cbdc254c0 to your computer and use it in GitHub Desktop.
Save tateisu/ba11d71cb15d3edcd768064cbdc254c0 to your computer and use it in GitHub Desktop.

help of parent commands

$ docker-compose run --rm web tootctl
Commands:
  tootctl accounts SUBCOMMAND ...ARGS             # Manage accounts
  tootctl cache SUBCOMMAND ...ARGS                # Manage cache
  tootctl domains SUBCOMMAND ...ARGS              # Manage account domains
  tootctl email-domain-blocks SUBCOMMAND ...ARGS  # Manage E-mail domain blocks
  tootctl emoji SUBCOMMAND ...ARGS                # Manage custom emoji
  tootctl feeds SUBCOMMAND ...ARGS                # Manage feeds
  tootctl help [COMMAND]                          # Describe available commands or one specific command
  tootctl media SUBCOMMAND ...ARGS                # Manage media files
  tootctl preview_cards SUBCOMMAND ...ARGS        # Manage preview cards
  tootctl search SUBCOMMAND ...ARGS               # Manage the search engine
  tootctl self-destruct                           # Erase the server from the federation
  tootctl settings SUBCOMMAND ...ARGS             # Manage dynamic settings
  tootctl statuses SUBCOMMAND ...ARGS             # Manage statuses
  tootctl upgrade SUBCOMMAND ...ARGS              # Various version upgrade utilities
  tootctl version                                 # Show version

using hyphen 'email-domain-blocks'

$ docker-compose run --rm web tootctl email-domain-blocks
Commands:
  tootctl email_domain_blocks add [DOMAIN...]     # add E-mail domain blocks
  tootctl email_domain_blocks help [COMMAND]      # Describe subcommands or one specific subcommand
  tootctl email_domain_blocks list                # list E-mail domain blocks
  tootctl email_domain_blocks remove [DOMAIN...]  # remove E-mail domain blocks

using underscore 'email_domain_blocks'

$ docker-compose run --rm web tootctl 
Commands:
  tootctl email_domain_blocks add [DOMAIN...]     # add E-mail domain blocks
  tootctl email_domain_blocks help [COMMAND]      # Describe subcommands or one specific subcommand
  tootctl email_domain_blocks list                # list E-mail domain blocks
  tootctl email_domain_blocks remove [DOMAIN...]  # remove E-mail domain blocks

missing arguments

$ docker-compose run --rm web tootctl email_domain_blocks add
No domain(s) given
$ docker-compose run --rm web tootctl email_domain_blocks remove
No domain(s) given

add single entry

$ docker-compose run --rm web tootctl email_domain_blocks add ikt.jp
Added 1, skipped 0

add multiple entry, one is already added

$ docker-compose run --rm web tootctl email_domain_blocks add ikt.jp jetable.org
ikt.jp is already blocked.
Added 1, skipped 1

unblock single entry, other entry will not removed

$ docker-compose run --rm web tootctl email_domain_blocks remove ikt.jp
Removed 1, skipped 0, failed 0
$ docker-compose run --rm web tootctl email_domain_blocks list
jetable.org

block single entry that is already added

$ docker-compose run --rm web tootctl email_domain_blocks add jetable.org
jetable.org is already blocked.
Added 0, skipped 1

unblock multiple entry, ont is already removed.

$ docker-compose run --rm web tootctl email_domain_blocks remove ikt.jp jetable.org
ikt.jp is not yet blocked.
Removed 1, skipped 1, failed 0

add multiple entry with --with-dns-records

$ docker-compose run --rm web tootctl email_domain_blocks add --with-dns-records sosiska.top sute.jp
Added 21, skipped 0

$ docker-compose run --rm web tootctl email_domain_blocks list
sosiska.top
  mx37.mb5p.com
  mx37.m1bp.com
  192.64.147.150
  192.110.255.237
  192.110.255.239
  192.110.255.238
  192.110.255.240
  192.110.255.229
  192.110.255.234
  192.110.255.242
  192.110.255.243
  192.110.255.230
  192.110.255.235
  192.110.255.231
  192.110.255.232
  2001:430:fff6::3
  2001:430:fff6::2
sute.jp
  mx1.sute.jp
  219.94.255.160

remove multiple domain and its children

$ docker-compose run --rm web tootctl email_domain_blocks remove sosiska.top sute.jp
Removed 21, skipped 0, failed 0

$ docker-compose run --rm web tootctl email_domain_blocks list
(no lines)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment