X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=fba%2Fboot.py;h=9e8e91c84c4b2890bd473a4a9f1b3904a67096d9;hb=e3514bca65c3cf145a9eb923939d9284b06ed1ba;hp=7bd816aab3d8399723007ef4f6aee704c3e5fb7a;hpb=67d158a0baadf3f7dbd8deb65851a9253a6d751d;p=fba.git diff --git a/fba/boot.py b/fba/boot.py index 7bd816a..9e8e91c 100644 --- a/fba/boot.py +++ b/fba/boot.py @@ -40,7 +40,13 @@ def init_parser(): ) # Generic: - _PARSER.add_argument("--debug", action="store_const", dest="log_level", const=logging.DEBUG, help="Full debug output") + _PARSER.add_argument( + "--debug", + action="store_const", + dest="log_level", + const=logging.DEBUG, + help="Full debug output" + ) # Commands: subparser_command = _PARSER.add_subparsers( @@ -55,8 +61,8 @@ def init_parser(): "check_instance", help="Checks given instance if it exists and returns proper exit code" ) - parser.add_argument("--domain", required=True, help="Instance name (aka. domain) to check") parser.set_defaults(command=commands.check_instance) + parser.add_argument("--domain", required=True, help="Instance name (aka. domain) to check") ### Fetch from bka.li ### parser = subparser_command.add_parser( @@ -70,19 +76,20 @@ def init_parser(): "recheck_obfuscation", help="Checks all instance's obfuscated peers if they can be de-obfuscated now.", ) + parser.set_defaults(command=commands.recheck_obfuscation) parser.add_argument("--domain", help="Instance name (aka. domain)") parser.add_argument("--software", help="Name of software, e.g. 'lemmy'") parser.add_argument("--force", action="store_true", help="Include also already existing instances, otherwise only new are checked") - parser.set_defaults(command=commands.recheck_obfuscation) ### Fetch blocks from registered instances or given ### parser = subparser_command.add_parser( "fetch_blocks", help="Fetches blocks from registered instances (run command fetch_instances first!).", ) + parser.set_defaults(command=commands.fetch_blocks) parser.add_argument("--domain", help="Instance name (aka. domain)") parser.add_argument("--software", help="Name of software, e.g. 'lemmy'") - parser.set_defaults(command=commands.fetch_blocks) + parser.add_argument("--force", action="store_true", help="Forces update of data, no matter what.") ### Fetch blocks from chaos.social ### parser = subparser_command.add_parser( @@ -103,8 +110,8 @@ def init_parser(): "fetch_fba_rss", help="Fetches domains from a FBA-specific RSS feed.", ) - parser.add_argument("--feed", required=True, help="RSS feed to fetch domains from (e.g. https://fba.ryoma.agency/rss?domain=foo.bar).") parser.set_defaults(command=commands.fetch_fba_rss) + parser.add_argument("--feed", required=True, help="RSS feed to fetch domains from (e.g. https://fba.ryoma.agency/rss?domain=foo.bar).") ### Fetch blocks from FBA's bot account ### parser = subparser_command.add_parser( @@ -112,23 +119,32 @@ def init_parser(): help="Fetches ATOM feed with domains from FBA's bot account.", ) parser.set_defaults(command=commands.fetch_fbabot_atom) + parser.add_argument("--feed", required=True, help="RSS feed to fetch domains from (e.g. https://fba.ryoma.agency/rss?domain=foo.bar).") ### Fetch blocks from oliphant's GIT repository ### parser = subparser_command.add_parser( "fetch_oliphant", + help="Fetches CSV files from GIT generated by Oliphant 'member instances'.", + ) + parser.set_defaults(command=commands.fetch_oliphant) + parser.add_argument("--domain", help="Instance name (aka. domain) to check") + + ### Fetch blocks from other CSV files + parser = subparser_command.add_parser( + "fetch_csv", help="Fetches CSV files (block recommendations) for more possible instances to disover", ) + parser.set_defaults(command=commands.fetch_csv) parser.add_argument("--domain", help="Instance name (aka. domain) to check") - parser.set_defaults(command=commands.fetch_oliphant) ### Fetch instances from given initial instance ### parser = subparser_command.add_parser( "fetch_instances", help="Fetches instances (aka. \"domains\") from an initial instance. You may want to re-run this command several times (at least 3 with big instances) to have a decent amount of valid instances.", ) + parser.set_defaults(command=commands.fetch_instances) parser.add_argument("--domain", required=True, help="Instance name (aka. domain) to fetch further instances from. Start with a large instance, e.g. mastodon.social .") parser.add_argument("--single", action="store_true", help="Only fetch given instance.") - parser.set_defaults(command=commands.fetch_instances) ### Fetch blocks from static text file(s) ### parser = subparser_command.add_parser( @@ -138,11 +154,18 @@ def init_parser(): parser.set_defaults(command=commands.fetch_txt) ### Fetch blocks from joinfediverse.wiki ### + #parser = subparser_command.add_parser( + # "fetch_joinfediverse", + # help="Fetches FediBlock page from joinfediverse.wiki", + #) + #parser.set_defaults(command=commands.fetch_joinfediverse) + + ### Fetch instances JSON from instances.joinmobilizon.org parser = subparser_command.add_parser( - "fetch_joinfediverse", - help="Fetches FediBlock page from joinfediverse.wiki", + "fetch_joinmobilizon", + help="Fetches instances from joinmobilizon", ) - parser.set_defaults(command=commands.fetch_joinfediverse) + parser.set_defaults(command=commands.fetch_joinmobilizon) ### Fetch blocks from misskey.page ### parser = subparser_command.add_parser( @@ -197,7 +220,11 @@ def init_parser(): parser.set_defaults(command=commands.update_nodeinfo) parser.add_argument("--domain", help="Instance name (aka. domain)") parser.add_argument("--software", help="Name of software, e.g. 'lemmy'") + parser.add_argument("--mode", help="Name of detection mode, e.g. 'auto_discovery'") parser.add_argument("--force", action="store_true", help="Forces update of data, no matter what.") + parser.add_argument("--no-software", action="store_true", help="Checks only entries with no software type detected.") + parser.add_argument("--no-auto", action="store_true", help="Checks only entries with other than AUTO_DISCOVERY as detection mode.") + parser.add_argument("--no-detection", action="store_true", help="Checks only entries with no detection mode set.") ### Fetch instances from instances.social ### parser = subparser_command.add_parser( @@ -219,6 +246,23 @@ def init_parser(): help="Fetches instances from ActivityPub relays", ) parser.set_defaults(command=commands.fetch_relays) + parser.add_argument("--domain", help="Instance name (aka. 'relay')") + parser.add_argument("--software", help="Name of software, e.g. 'lemmy'") + parser.add_argument("--force", action="store_true", help="Forces update of data, no matter what.") + + ### Fetches relay list from relaylist.com + parser = subparser_command.add_parser( + "fetch_relaylist", + help="Fetches relay list from relaylist.com", + ) + parser.set_defaults(command=commands.fetch_relaylist) + + ### Remove invalid domains ### + parser = subparser_command.add_parser( + "remove_invalid", + help="Removes invalid domains.", + ) + parser.set_defaults(command=commands.remove_invalid) logger.debug("EXIT!")