updated locales and readmes i guess goober instances would download them on next update unless someone manually runs git pull or gets it for the first time

This commit is contained in:
WhatDidYouExpect 2025-07-01 23:22:38 +02:00
parent a8c520002e
commit 642aa3480c
9 changed files with 273 additions and 124 deletions

8
modules/README.MD Normal file
View file

@ -0,0 +1,8 @@
# Modules Directory
This folder contains core module files for the project.
**Important:**
Do **not** modify the files in this directory if you plan to update the project in the future. Any changes made here may be overwritten during updates, or may cause Git to detect modifications and refuse to update properly.
If you need to make changes, consider contributing upstream or using extension mechanisms provided by the project.

0
modules/logger.py Normal file
View file

View file

@ -249,6 +249,11 @@ def start_checks():
check_memory()
check_memoryjson()
check_cpu()
if os.path.exists(".env"):
pass
else:
print(f"{YELLOW}{get_translation(LOCALE, 'env_file_not_found')}{RESET}")
sys.exit(1)
print(get_translation(LOCALE, "continuing_in_seconds").format(seconds=5))
presskey2skip(timeout=5)
os.system('cls' if os.name == 'nt' else 'clear')

View file

@ -15,7 +15,7 @@ def check_resources():
for resource, path in resources.items():
try:
nltk.data.find(path)
print(f"{resource} is already installed.")
logger.info(f"{resource} is already installed.")
except Exception:
nltk.download(str(resource))
@ -30,14 +30,14 @@ analyzer = SentimentIntensityAnalyzer()
def is_positive(sentence):
"""
Determines if the sentiment of the sentence is positive.
Prints debug information and returns True if sentiment score > 0.1.
logger.infos debug information and returns True if sentiment score > 0.1.
"""
scores = analyzer.polarity_scores(sentence)
sentiment_score = scores['compound']
# Print debug message with sentiment score
# logger.info debug message with sentiment score
debug_message = f"{DEBUG}{get_translation(LOCALE, 'sentence_positivity')} {sentiment_score}{RESET}"
print(debug_message)
logger.info(debug_message)
return sentiment_score > 0.1