11"""
22Fetches redirect definitions from indie-wiki-buddy and safes them as plain text list of subdomain names.
3- Datasource: https://github.com/KevinPayravi/indie-wiki-buddy
3+ Tool: https://github.com/KevinPayravi/indie-wiki-buddy
4+ Datasource: https://github.com/KevinPayravi/indie-wiki-buddy-data
45"""
56
67import argparse
@@ -26,8 +27,8 @@ class ChangeLog(Enum):
2627MY_DESCRIPTION = (
2728 "Fetches redirect definitions from indie-wiki-buddy and safes them as plain text list of subdomain names."
2829)
29- SOURCE_URL_FOLDER = "https://raw.githubusercontent.com/KevinPayravi/indie-wiki-buddy/refs/heads/main/data/"
30- SOURCE_TREE = "https://api.github.com/repos/KevinPayravi/indie-wiki-buddy/git/trees/main"
30+ SOURCE_URL_FOLDER = "https://raw.githubusercontent.com/KevinPayravi/indie-wiki-buddy-data /refs/heads/main/data/"
31+ SOURCE_TREE = "https://api.github.com/repos/KevinPayravi/indie-wiki-buddy-data /git/trees/main"
3132ROOT_PATH = Path (__file__ ).parent .parent
3233IMPORT_PREFIX = "import_from_indie_wiki"
3334IMPORT_FOLDER = Path (ROOT_PATH , "sources" )
@@ -61,14 +62,14 @@ def create_list_from_json(json_object, site_import_file, args: argparse.Namespac
6162 text = []
6263 for wiki in json_object :
6364 if isinstance (wiki , list ):
64- print (type (wiki ))
65- print (f"Not implemented for { wiki } " )
65+ print (f"Found: { type (wiki )} " )
66+ print (f" Not implemented for { wiki } " )
6667 elif isinstance (wiki , dict ):
6768 for origin in wiki .get ("origins" , []):
6869 text .append (get_unwanted_from_origin (origin ))
6970 else :
70- print (type (wiki ))
71- print (f"Strange things happened with { wiki } " )
71+ print (f"Found: { type (wiki )} " )
72+ print (f" Strange things happened with { wiki } " )
7273
7374 # optimized_list = sorted(set(text.split("\n")))
7475 optimized_list = sorted (set (filter (None , text )))
@@ -306,7 +307,7 @@ def process_sites_with_changes(sites_with_changes: dict, args: argparse.Namespac
306307 else :
307308 critical_errors .append (f"UPD: { filename } " )
308309
309- if len (critical_errors ) = = 0 :
310+ if len (critical_errors ) ! = 0 :
310311 print (critical_errors )
311312
312313 return len (critical_errors ) == 0
0 commit comments