Add self-update command for pipx
MODIFY
plextraktsync/cli.py
plextraktsync/cli.py
from plextraktsync.commands.inspect import inspect
from plextraktsync.commands.login import login
from plextraktsync.commands.plex_login import plex_login
+from plextraktsync.commands.self_update import self_update
from plextraktsync.commands.sync import sync
from plextraktsync.commands.trakt_login import trakt_login
from plextraktsync.commands.unmatched import unmatched
@@ -29,6 +30,7 @@ def cli(ctx):
cli.add_command(inspect)
cli.add_command(login)
cli.add_command(plex_login)
+cli.add_command(self_update)
cli.add_command(sync)
cli.add_command(trakt_login)
cli.add_command(unmatched)

ADD
plextraktsync/commands/self_update.py
+from os import system
+
+import click
+
+
+@click.command()
+def self_update():
+ """
+ Update PlexTraktSync to latest version using pipx
+
+ $ plextraktsync self-update
+ Updating PlexTraktSync to latest using pipx
+ upgraded package plextraktsync from 0.15.3 to 0.18.5 (location: /Users/glen/.local/pipx/venvs/plextraktsync)
+ """
+
+ click.echo('Updating PlexTraktSync to latest using pipx')
+ system('pipx upgrade PlexTraktSync')

Add self-update command for pipx