From ba2046941e0c9353a171d05d73a5f4397388d971 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 5 Jun 2023 23:11:29 +0200 Subject: [PATCH] Continued: - renamed command.py -> commands.py --- fba/__init__.py | 2 +- fba/boot.py | 16 ++++++++-------- fba/{command.py => commands.py} | 0 3 files changed, 9 insertions(+), 9 deletions(-) rename fba/{command.py => commands.py} (100%) diff --git a/fba/__init__.py b/fba/__init__.py index 888b8c3..70dc665 100644 --- a/fba/__init__.py +++ b/fba/__init__.py @@ -1,7 +1,7 @@ __all__ = [ 'boot', 'cache', - 'command', + 'commands', 'config', 'fba', 'instances' diff --git a/fba/boot.py b/fba/boot.py index b121562..05f9546 100644 --- a/fba/boot.py +++ b/fba/boot.py @@ -19,7 +19,7 @@ import os import sys import tempfile import zc.lockfile -from fba import command +from fba import commands from fba import fba # Lock file @@ -60,14 +60,14 @@ def init_parser(): 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=command.check_instance) + parser.set_defaults(command=commands.check_instance) ### Fetch from bka.li ### parser = subparser_command.add_parser( "fetch_bkali", help="Fetches domain names from bka.li API", ) - parser.set_defaults(command=command.fetch_bkali) + parser.set_defaults(command=commands.fetch_bkali) ### Fetch blocks from registered instances or given ### parser = subparser_command.add_parser( @@ -75,14 +75,14 @@ def init_parser(): help="Fetches blocks from registered instances (run command fetch_instances first!).", ) parser.add_argument("--domain", help="Instance name (aka. domain) to fetch blocks from") - parser.set_defaults(command=command.fetch_blocks) + parser.set_defaults(command=commands.fetch_blocks) ### Fetch blocks from chaos.social ### parser = subparser_command.add_parser( "fetch_cs", help="Fetches blocks from chaos.social's meta sub domain.", ) - parser.set_defaults(command=command.fetch_cs) + parser.set_defaults(command=commands.fetch_cs) ### Fetch blocks from a FBA-specific RSS feed ### parser = subparser_command.add_parser( @@ -90,14 +90,14 @@ def init_parser(): 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=command.fetch_fba_rss) + parser.set_defaults(command=commands.fetch_fba_rss) ### Fetch blocks from FBA's bot account ### parser = subparser_command.add_parser( "fetch_fbabot_atom", help="Fetches ATOM feed with domains from FBA's bot account. You may wish 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=command.fetch_fbabot_atom) + parser.set_defaults(command=commands.fetch_fbabot_atom) ### Fetch instances from given initial instance ### parser = subparser_command.add_parser( @@ -105,7 +105,7 @@ def init_parser(): help="Fetches instances (aka. \"domains\") from an initial instance.", ) parser.add_argument("--domain", help="Instance name (aka. domain) to fetch further instances from. Start with a large instance, e.g. mastodon.social .") - parser.set_defaults(command=command.fetch_instances) + parser.set_defaults(command=commands.fetch_instances) # DEBUG: print("DEBUG: init_parser(): EXIT!") diff --git a/fba/command.py b/fba/commands.py similarity index 100% rename from fba/command.py rename to fba/commands.py -- 2.39.5