]> git.mxchange.org Git - fba.git/blobdiff - fba/boot.py
Continued:
[fba.git] / fba / boot.py
index d72c8e4c59279340d360378da00dc439834575f9..ebde9f28c09a102418a54a255649463f69c5a0d3 100644 (file)
@@ -36,7 +36,7 @@ def init_parser():
     logger.debug("Initializing parser ...")
     _PARSER = argparse.ArgumentParser(
         description="Fetches block reasons from the fediverse",
-        epilog="Please note that some commands have optional arguments, you may want to try fba.py <command> --help to find them out.",
+        epilog="Please note that some commands have optional arguments, you may want to try fba.py <command> --help to find them out. Please DO NOT overdose requests that are not limited by themselves. Typically parameters like --domain, --software and --all are unlimited. \"Unlimited\" here means that there is no \"is recently accessed?\" limitation.",
     )
 
     # Generic:
@@ -72,6 +72,7 @@ def init_parser():
     )
     parser.add_argument("--domain", help="Instance name (aka. domain)")
     parser.add_argument("--software", help="Name of software, e.g. 'lemmy'")
+    parser.add_argument("--all", 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 ###
@@ -165,6 +166,38 @@ def init_parser():
     )
     parser.set_defaults(command=commands.fetch_pixelfed_api)
 
+    ### Check nodeinfo ###
+    parser = subparser_command.add_parser(
+        "check_nodeinfo",
+        help="Checks if domain is part of nodeinfo.",
+    )
+    parser.set_defaults(command=commands.check_nodeinfo)
+
+    ### Fetch CSV from fedilist.com ###
+    parser = subparser_command.add_parser(
+        "fetch_fedilist",
+        help="Fetches CSV from fedilist.com",
+    )
+    parser.set_defaults(command=commands.fetch_fedilist)
+    parser.add_argument("--software", help="Name of software, e.g. 'lemmy'")
+    parser.add_argument("--all", action="store_true", help="Include also already existing instances, otherwise only new are checked")
+
+    ### Update nodeinfo ###
+    parser = subparser_command.add_parser(
+        "update_nodeinfo",
+        help="Updates nodeinfo for all instances",
+    )
+    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'")
+
+    ### Fetch instances from instances.social ###
+    parser = subparser_command.add_parser(
+        "fetch_instances_social",
+        help="Fetch instances from instances.social, you need an API key to access the API. Please consider donating to them when you want to more frequent use their API!",
+    )
+    parser.set_defaults(command=commands.fetch_instances_social)
+
     logger.debug("EXIT!")
 
 def run_command():