Update Kapitanbooru Uploader to version 0.9.0 with significant changes
All checks were successful
Gitea/kapitanbooru-uploader/pipeline/head This commit looks good

- Updated version number in pyproject.toml and messages.po files.
- Added new translations and updated existing ones in messages.po for better localization.
- Implemented core functionality in Core.py, including image processing, tagging, and upload logic.
- Enhanced the autotagging feature to support multiple image formats (PNG, JPEG, WebP, AVIF, GIF).
- Improved error handling and logging for file operations and network requests.
- Added functionality to check for uploaded files and manage tag updates for existing posts.
- Introduced threading for background processing to improve application responsiveness.
This commit is contained in:
2025-06-26 17:22:34 +02:00
parent 0987fbbed0
commit 67df3ea793
6 changed files with 1463 additions and 1123 deletions

View File

@@ -1,11 +1,43 @@
"""kapitanbooru_uploader.__main__: executed
when kapitanbooru_uploader directory is called as script."""
from .Core import Core
from .settings import Settings
from .ImageBrowser import ImageBrowser
import argparse
def main():
app = ImageBrowser()
app.mainloop()
parser = argparse.ArgumentParser(
prog="kapitanbooru-uploader", description="KapitanBooru Uploader"
)
group = parser.add_mutually_exclusive_group()
# Add arguments to the group
group.add_argument(
"--autotag-files",
nargs="+",
metavar="PATH",
help="Specify one or more files to process",
)
group.add_argument(
"--autotag-dir", metavar="PATH", help="Specify a directory to process"
)
args = parser.parse_args()
# Determine which function to call
if args.autotag_files:
core = Core(Settings(), gui_mode=False)
core.autotag_files(args.autotag_files)
core.wait_for_completion() # Wait for threads to finish
elif args.autotag_dir:
core = Core(Settings(), gui_mode=False)
core.autotag_dir(args.autotag_dir)
core.wait_for_completion() # Wait for threads to finish
else:
app = ImageBrowser()
app.mainloop()
if __name__ == "__main__":