Also available on Github: https://github.com/Seednode/roulette
Go to file
Seednode 84038440af Cleaned up responsewriter and request pointer handling, and added return values when missing after 404 responses 2022-10-03 21:35:02 -05:00
cmd Cleaned up responsewriter and request pointer handling, and added return values when missing after 404 responses 2022-10-03 21:35:02 -05:00
licenses Added licenses 2022-09-09 19:01:52 -05:00
vendor Moved from manually checking magic numbers to github.com/h2non/filetype 2022-09-09 19:00:02 -05:00
.gitignore Initial commit 2022-09-08 10:12:06 -05:00
LICENSE Initial commit 2022-09-08 10:12:06 -05:00
README.md Added argument to filter displayed results 2022-09-24 17:17:56 -05:00
build.sh Replaced unquoted variable expansion with explicit splitting, to make shellcheck happy 2022-09-21 23:15:45 -05:00
go.mod Moved from manually checking magic numbers to github.com/h2non/filetype 2022-09-09 19:00:02 -05:00
go.sum Moved from manually checking magic numbers to github.com/h2non/filetype 2022-09-09 19:00:02 -05:00
main.go Initial commit 2022-09-08 10:12:06 -05:00

README.md

About

Sometimes, you just need a way to randomly display your files in the browser.

Simply point this tool at one or more directories, and then open the specified port (default 8080) in your browser.

A new file will be selected if you open the root URI directly, or if you click on any displayed image.

Browser history is preserved, so you can always go back to any previously displayed image.

Builds available here.

[-s, --successive]

This option is tailored specifically for my own use case.

When loading a new image, it checks for a sequentially-numbered file in the same directory.

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.

The expected format is filename###.extension.

Usage output

Usage:
  roulette <path> [path2]... [flags]
  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

Use "roulette [command] --help" for more information about a command.