stashapp / stash

An organizer for your porn, written in Go. Documentation: https://docs.stashapp.cc
https://stashapp.cc/
GNU Affero General Public License v3.0
9.29k stars 794 forks source link

[RFC] Command-line tasks (for power users) #2088

Open echo6ix opened 2 years ago

echo6ix commented 2 years ago

Scope

After reading some criticism of the settings page, namely regarding the management of a lot of unique library sources, it occurred to me that no ui/ux is going to be efficient for that specific use case. It reminded me of power users with a ton of zfs storage pools or vdevs in their zfs storage pools. In my experience those power users tend to prefer managing their zpools in the terminal rather than point-and-click in a web front end UI.

Similar to the zpool suite of commands, would it not be more efficient for power users with a lot of unique sources to manage their sources (and even initiate tasks) from the command line?

Example command-line tasks

Here are some example command-line tasks power users could perform

stash list

(aliases: ls) Lists all library sources managed by Stash along with their exclude settings.

# stash list
PATH                        VIDEOS  IMAGES
/mnt/videos                 -       Exclude
/mnt/images                 Exlude  -
/mnt/blah/blah/blah/crap    -       -

# stash ls
PATH                        VIDEOS  IMAGES
/mnt/videos                 -       Exclude
/mnt/images                 Exlude  -
/mnt/blah/blah/blah/crap    -       -

stash status

Show detailed status of Stash's task queue

# stash status
State: Idle
# stash status
State: Scanning [45%]

TASK            STATE       PATH
Scanning        Active      /mnt/videos
Auto-tagging    Pending     /mnt/videos

stash add

Add sources to Stash library

Usage: stash add <_path_> [ -v <_boolean value_> ] [ -i <_boolean value_> ]

Options:

Usage: stash remove <_path_>

stash clean

Cleans orphaned entries from content sources

Usage: stash clean [ -d ]

Options:

kermieisinthehouse commented 2 years ago

Might want to take a peek at #2077

echo6ix commented 2 years ago

Might want to take a peek at #2077

Yessssssss! Thanks, I missed that.

SmallCoccinelle commented 2 years ago

2077 isn't that far yet, but it provides a framework for doing something like this issue suggests. It's nice to be able to issue rsync -avr * /stash/library && stash scan for instance. At least, that is my primary use case for stuff like this.

The primary work on something like #2077 is to untangle the configuration from the command line and environment from the configuration file. In addition, to untangle the current amalgamation of the internal manager and configuration.