roulette/README.md

47 lines
1.6 KiB
Markdown
Raw Normal View History

2022-09-16 19:52:59 +00:00
## About
2022-09-16 19:54:23 +00:00
Sometimes, you just need a way to randomly display your files in the browser.
2022-09-16 19:52:59 +00:00
2022-09-16 19:54:23 +00:00
Simply point this tool at one or more directories, and then open the specified port (default 8080) in your browser.
2022-09-16 19:52:59 +00:00
2022-09-16 19:54:23 +00:00
A new file will be selected if you open the root URI directly, or if you click on any displayed image.
2022-09-16 19:52:59 +00:00
Browser history is preserved, so you can always go back to any previously displayed image.
Builds available [here](https://cdn.seedno.de/builds/roulette).
## [-s, --successive]
2022-09-17 16:09:49 +00:00
This option is tailored specifically for my own use case.
2022-09-17 16:13:32 +00:00
When loading a new image, it checks for a sequentially-numbered file in the same directory.
2022-09-17 16:09:49 +00:00
For example, let's say `/mnt/photos/MyVacation001.jpg` is being displayed.
If you click on the image, `roulette` will attempt to display `/mnt/photos/MyVacation002.jpg`.
If that matching file is not found, it will select a random file as usual.
2022-09-17 16:13:32 +00:00
The expected format is `filename###.extension`.
2022-09-16 19:52:59 +00:00
## Usage output
```
Usage:
2022-09-16 19:57:40 +00:00
roulette <path> [path2]... [flags]
2022-09-16 19:52:59 +00:00
roulette [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
version Print version
Flags:
-f, --filter string only display images matching specified pattern (case-insensitive)
-h, --help help for roulette
-p, --port int port to listen on (default 8080)
-r, --recursive recurse into subdirectories
-s, --successive load the next sequential file, if possible
-v, --verbose log accessed files to stdout
2022-09-16 19:52:59 +00:00
Use "roulette [command] --help" for more information about a command.
```