pystardust / ani-cli

A cli tool to browse and play anime
GNU General Public License v3.0
7.34k stars 530 forks source link

log anime playback #1363

Open port19x opened 4 weeks ago

port19x commented 4 weeks ago

Is your feature request related to a problem? Please describe.

Some people don't yet use a plattform like anilist to track their anime. Assuming users don't distrohop all the time, having info in the systemd log could be useful.

Describe the solution you'd like

We can extend our player mechanics to do a logger -t ani-cli $NAMEofEP before playback. The tag ani-cli means users can then review via journalctl -t ani-cli An opt-out environment variable would also be a good idea.

Describe alternatives you've considered

We could also just not

Additional context

logger is part of util-linux

71zenith commented 3 weeks ago

I don't get how this is supposed to be used. Mind expanding on this

71zenith commented 3 weeks ago

nvm, a second late realisation hits hard. we can certainly do this but as with most ani-cli features, we will need to properly inform of its existence. doubt anyone lurks around random code to find available feat.

71zenith commented 3 weeks ago

looks like this is also available for mac os

71zenith commented 3 weeks ago

what do u think should trigger this? any type of invocation(download, debug links) or just playback?

port19x commented 3 weeks ago

Good question. I believe just playback is enough

71zenith commented 3 weeks ago

i'd prefer a builtin flag for a journalctl and log wrapper . smth like this

        -l | --logview)
            case "$(uname -s)" in
                Darwin*) log show --predicate 'eventMessage contains "ani-cli"' --info ;;
                Linux*) journalctl -t ani-cli ;;
            esac
            exit 0
            ;;
port19x commented 3 weeks ago

That would really round off the feature, yes. This should then make it into the help text and man page as well

71zenith commented 3 weeks ago

i have the basic structure ready, i can start off after merging #1366

justchokingaround commented 3 weeks ago

i'm highly in favor of this