add deprecation notice to parser

This commit is contained in:
kvan7
2025-05-30 18:40:40 -05:00
parent 744d911603
commit 099bb1a9ad
2 changed files with 9 additions and 0 deletions

View File

@@ -326,6 +326,8 @@ def first_non_negated(matchers):
class Parser:
"""@deprecated This parser is deprecated and is not being maintained. It may not work as expected."""
def get_script_dir(self):
"""Returns the directory where the script is located."""
return os.path.dirname(os.path.realpath(__file__))

View File

@@ -9,7 +9,14 @@ SUPPORTED_LANGUAGES = ["en", "ru", "ko", "cmn-Hant", "ja", "de", "es"]
if __name__ == "__main__":
logger.info("Starting parser")
set_log_level(logging.WARNING)
logger.critical(
"This parser is deprecated and is not being maintained. It may not work as expected."
)
for lang in SUPPORTED_LANGUAGES:
logger.info(f"Generating {lang} tables")
parser = Parser(lang)
parser.run()
logger.critical(
"This parser is deprecated and is not being maintained. It may not work as expected."
)