Update readme with info for --index-interval

This commit is contained in:
Seednode 2024-01-30 04:35:49 -06:00
parent 187a6569ff
commit c87453d2f8
2 changed files with 40 additions and 39 deletions

View File

@ -144,43 +144,44 @@ Usage:
roulette <path> [path]... [flags] roulette <path> [path]... [flags]
Flags: Flags:
--admin-prefix string string to prepend to administrative paths --admin-prefix string string to prepend to administrative paths
-a, --all enable all supported file types -a, --all enable all supported file types
--allow-empty allow specifying paths containing no supported files --allow-empty allow specifying paths containing no supported files
--audio enable support for audio files --audio enable support for audio files
--binary-prefix use IEC binary prefixes instead of SI decimal prefixes --binary-prefix use IEC binary prefixes instead of SI decimal prefixes
-b, --bind string address to bind to (default "0.0.0.0") -b, --bind string address to bind to (default "0.0.0.0")
--case-insensitive use case-insensitive matching for filters --case-insensitive use case-insensitive matching for filters
--code enable support for source code files --code enable support for source code files
--code-theme string theme for source code syntax highlighting (default "solarized-dark256") --code-theme string theme for source code syntax highlighting (default "solarized-dark256")
--concurrency int maximum concurrency for scan threads (default 1024) --concurrency int maximum concurrency for scan threads (default 1024)
-d, --debug display even more verbose logs -d, --debug display even more verbose logs
--disable-buttons disable first/prev/next/last buttons --disable-buttons disable first/prev/next/last buttons
--exit-on-error shut down webserver on error, instead of just printing error --exit-on-error shut down webserver on error, instead of just printing error
--fallback serve files as application/octet-stream if no matching format is registered --fallback serve files as application/octet-stream if no matching format is registered
-f, --filter enable filtering -f, --filter enable filtering
--flash enable support for shockwave flash files (via ruffle.rs) --flash enable support for shockwave flash files (via ruffle.rs)
--fun add a bit of excitement to your day --fun add a bit of excitement to your day
-h, --help help for roulette -h, --help help for roulette
--ignore skip all directories containing a specified filename --ignore skip all directories containing a specified filename
--ignore-file string filename used to indicate directory should be skipped (default ".roulette-ignore") --ignore-file string filename used to indicate directory should be skipped (default ".roulette-ignore")
--images enable support for image files --images enable support for image files
--index generate index of supported file paths at startup --index generate index of supported file paths at startup
--index-file string path to optional persistent index file --index-file string path to optional persistent index file
-i, --info expose informational endpoints --index-interval string interval at which to regenerate index (e.g. "3s" or "1h")
--max-file-count int skip directories with file counts above this value (default 2147483647) -i, --info expose informational endpoints
--min-file-count int skip directories with file counts below this value --max-file-count int skip directories with file counts above this value (default 2147483647)
-p, --port int port to listen on (default 8080) --min-file-count int skip directories with file counts below this value
--prefix string root path for http handlers (for reverse proxying) (default "/") -p, --port int port to listen on (default 8080)
--profile register net/http/pprof handlers --prefix string root path for http handlers (for reverse proxying) (default "/")
-r, --recursive recurse into subdirectories --profile register net/http/pprof handlers
--refresh enable automatic page refresh via query parameter -r, --recursive recurse into subdirectories
--russian remove selected images after serving --refresh enable automatic page refresh via query parameter
-s, --sort enable sorting --russian remove selected images after serving
--text enable support for text files -s, --sort enable sorting
-v, --verbose log accessed files and other information to stdout --text enable support for text files
-V, --version display version and exit -v, --verbose log accessed files and other information to stdout
--video enable support for video files -V, --version display version and exit
--video enable support for video files
``` ```
## Building the Docker container ## Building the Docker container

View File

@ -17,7 +17,7 @@ import (
const ( const (
AllowedCharacters string = `^[A-z0-9.\-_]+$` AllowedCharacters string = `^[A-z0-9.\-_]+$`
ReleaseVersion string = "6.4.0" ReleaseVersion string = "6.4.1"
) )
var ( var (
@ -137,7 +137,7 @@ func init() {
rootCmd.Flags().BoolVar(&Images, "images", false, "enable support for image files") rootCmd.Flags().BoolVar(&Images, "images", false, "enable support for image files")
rootCmd.Flags().BoolVar(&Index, "index", false, "generate index of supported file paths at startup") rootCmd.Flags().BoolVar(&Index, "index", false, "generate index of supported file paths at startup")
rootCmd.Flags().StringVar(&IndexFile, "index-file", "", "path to optional persistent index file") rootCmd.Flags().StringVar(&IndexFile, "index-file", "", "path to optional persistent index file")
rootCmd.Flags().StringVar(&IndexInterval, "index-interval", "", "regenerate index after this amount of time") rootCmd.Flags().StringVar(&IndexInterval, "index-interval", "", "interval at which to regenerate index (e.g. \"5m\" or \"1h\")")
rootCmd.Flags().BoolVarP(&Info, "info", "i", false, "expose informational endpoints") rootCmd.Flags().BoolVarP(&Info, "info", "i", false, "expose informational endpoints")
rootCmd.Flags().IntVar(&MaxFileCount, "max-file-count", math.MaxInt32, "skip directories with file counts above this value") rootCmd.Flags().IntVar(&MaxFileCount, "max-file-count", math.MaxInt32, "skip directories with file counts above this value")
rootCmd.Flags().IntVar(&MinFileCount, "min-file-count", 0, "skip directories with file counts below this value") rootCmd.Flags().IntVar(&MinFileCount, "min-file-count", 0, "skip directories with file counts below this value")