Bump version to 0.6.0 and add artist tag processing functionality
All checks were successful
Gitea/kapitanbooru-uploader/pipeline/head This commit looks good

This commit is contained in:
2025-03-16 01:28:47 +01:00
parent 0978dd8e3c
commit 96597a4e2b
5 changed files with 225 additions and 172 deletions

View File

@@ -142,7 +142,7 @@ class ImageBrowser(tk.Tk):
super().__init__()
self.title("Kapitanbooru Uploader")
self.geometry("900x600")
self.version = "0.5.2"
self.version = "0.6.0"
self.acknowledged_version = parse_version(self.version)
self.settings = Settings()
@@ -217,6 +217,10 @@ class ImageBrowser(tk.Tk):
# Check every 5 minutes (300,000 ms)
self.after(300000, self._schedule_update_check)
def is_installed_via_pipx(self):
"""Check if the application is installed via pipx"""
return os.environ.get("__PIPX_ORIGIN") == "pipx"
def _check_for_update(self):
"""Check for updates in a background thread"""
@@ -263,7 +267,11 @@ class ImageBrowser(tk.Tk):
formatted_message = message_template.format(
new_version=new_version,
current_version=self.version,
update_command="pip install --upgrade kapitanbooru-uploader",
update_command=(
"pipx upgrade kapitanbooru-uploader"
if self.is_installed_via_pipx()
else "pip install --upgrade kapitanbooru-uploader"
),
)
messagebox.showinfo(title, formatted_message)
@@ -513,7 +521,9 @@ class ImageBrowser(tk.Tk):
]
for text in content:
ttk.Label(frame, text=text).grid(row=next(row_counter), column=0, sticky=tk.W)
ttk.Label(frame, text=text).grid(
row=next(row_counter), column=0, sticky=tk.W
)
# Repository link
repo_frame = ttk.Frame(frame)