]> git.mxchange.org Git - fba.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Fri, 6 Oct 2023 13:59:34 +0000 (15:59 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 6 Oct 2023 13:59:34 +0000 (15:59 +0200)
- added some debug messages
- formatted command
- added alias 'hajkey' as 'misskey' alias

fba/boot.py
fba/database.py
fba/helpers/software.py

index 6b90614852e38e821609a1db5a4d91c51f6fda2f..a79e428902f610bdf4cdbee130e043a759aa551a 100644 (file)
@@ -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(
index 4a1ceb6244328c12d9892cca3d0888ed24a0dcef..23bfab08ce2f3502b81a56469b75f04679a824b1 100644 (file)
@@ -20,12 +20,14 @@ logging.basicConfig(level=logging.INFO)
 logger = logging.getLogger(__name__)
 
 # Connect to database
+logger.debug("Opening database file blocks.db ...")
 connection = sqlite3.connect("blocks.db")
 
 # Attach trace function
 #connection.set_trace_callback(print)
 
 # Init row factory
+logger.debug("connection='%s' - setting row factory ...", connection)
 connection.row_factory = sqlite3.Row
 
 # Get cursor
index 4ada4955d6494a73d6fb9722e1f7030dccea0d80..5f88dfdd0eb930debde5e5852049536e1b0bbdcc 100644 (file)
@@ -48,7 +48,7 @@ def alias(software: str) -> str:
     elif software in ["hometown", "ecko", "fedibird", "glitchcafe"] or "되는 마스토돈" in software or "mastodon" in software:
         logger.debug("Setting mastodon: software='%s'", software)
         software = "mastodon"
-    elif software in ["slipfox calckey", "calckey", "groundpolis", "foundkey", "cherrypick", "meisskey", "magnetar", "keybump", "dolphin", "calckey social", "azk.sns", "firefish", "qtmmsky", "iceshrimp", "owohub", "re+", "russkey", "loverskey"] or "shumihub" in software or "мисскей" in software or "milkey" in software or "misskey" in software:
+    elif software in ["slipfox calckey", "calckey", "groundpolis", "foundkey", "cherrypick", "meisskey", "magnetar", "keybump", "dolphin", "calckey social", "azk.sns", "firefish", "qtmmsky", "iceshrimp", "owohub", "re+", "russkey", "loverskey", "hajkey"] or "shumihub" in software or "мисскей" in software or "milkey" in software or "misskey" in software:
         logger.debug("Setting misskey: software='%s'", software)
         software = "misskey"
     elif software in ["runtube.re", "islameye"]: