feat: Bump version to 0.2.5, enhance logging, normalize Cyrillic characters, and improve database info formatting

This commit is contained in:
sha
2025-12-27 02:55:34 +00:00
parent 95cbaee7fa
commit f2060b4a92
15 changed files with 136 additions and 37 deletions
+10
View File
@@ -1,4 +1,13 @@
from pathlib import Path
import logging
import os
# Set up logging conditionally
if os.getenv('FORMATTER_LOG', '0') == '1':
logging.basicConfig(filename='formatter.log', level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s')
else:
logging.basicConfig(level=logging.CRITICAL) # Disable logging
class FileInfoExtractor:
@@ -10,6 +19,7 @@ class FileInfoExtractor:
self._modification_time = file_path.stat().st_mtime
self._file_name = file_path.name
self._file_path = str(file_path)
logging.info(f"FileInfoExtractor: file_name={self._file_name!r}, file_path={self._file_path!r}")
def extract_size(self) -> int:
"""Extract file size in bytes"""