Change --theme to --code-theme
This commit is contained in:
parent
90a480fad4
commit
ba827430bb
|
@ -118,6 +118,7 @@ Flags:
|
||||||
-c, --cache generate directory cache at startup
|
-c, --cache generate directory cache at startup
|
||||||
--cache-file string path to optional persistent cache file
|
--cache-file string path to optional persistent cache file
|
||||||
--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")
|
||||||
-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)
|
||||||
--handlers display registered handlers (for debugging)
|
--handlers display registered handlers (for debugging)
|
||||||
|
@ -135,7 +136,6 @@ Flags:
|
||||||
--russian remove selected images after serving
|
--russian remove selected images after serving
|
||||||
-s, --sort enable sorting
|
-s, --sort enable sorting
|
||||||
--text enable support for text files
|
--text enable support for text files
|
||||||
--theme string theme for source code syntax highlighting (default "solarized-dark256")
|
|
||||||
-v, --verbose log accessed files and other information to stdout
|
-v, --verbose log accessed files and other information to stdout
|
||||||
-V, --version display version and exit
|
-V, --version display version and exit
|
||||||
--video enable support for video files
|
--video enable support for video files
|
||||||
|
|
|
@ -11,7 +11,7 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
ReleaseVersion string = "0.86.0"
|
ReleaseVersion string = "0.87.0"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -21,6 +21,7 @@ var (
|
||||||
Cache bool
|
Cache bool
|
||||||
CacheFile string
|
CacheFile string
|
||||||
Code bool
|
Code bool
|
||||||
|
CodeTheme string
|
||||||
Filtering bool
|
Filtering bool
|
||||||
Flash bool
|
Flash bool
|
||||||
Handlers bool
|
Handlers bool
|
||||||
|
@ -37,7 +38,6 @@ var (
|
||||||
Russian bool
|
Russian bool
|
||||||
Sorting bool
|
Sorting bool
|
||||||
Text bool
|
Text bool
|
||||||
Theme string
|
|
||||||
Verbose bool
|
Verbose bool
|
||||||
Version bool
|
Version bool
|
||||||
Videos bool
|
Videos bool
|
||||||
|
@ -71,6 +71,7 @@ func init() {
|
||||||
rootCmd.Flags().BoolVarP(&Cache, "cache", "c", false, "generate directory cache at startup")
|
rootCmd.Flags().BoolVarP(&Cache, "cache", "c", false, "generate directory cache at startup")
|
||||||
rootCmd.Flags().StringVar(&CacheFile, "cache-file", "", "path to optional persistent cache file")
|
rootCmd.Flags().StringVar(&CacheFile, "cache-file", "", "path to optional persistent cache file")
|
||||||
rootCmd.Flags().BoolVar(&Code, "code", false, "enable support for source code files")
|
rootCmd.Flags().BoolVar(&Code, "code", false, "enable support for source code files")
|
||||||
|
rootCmd.Flags().StringVar(&CodeTheme, "code-theme", "solarized-dark256", "theme for source code syntax highlighting")
|
||||||
rootCmd.Flags().BoolVarP(&Filtering, "filter", "f", false, "enable filtering")
|
rootCmd.Flags().BoolVarP(&Filtering, "filter", "f", false, "enable filtering")
|
||||||
rootCmd.Flags().BoolVar(&Flash, "flash", false, "enable support for shockwave flash files (via ruffle.rs)")
|
rootCmd.Flags().BoolVar(&Flash, "flash", false, "enable support for shockwave flash files (via ruffle.rs)")
|
||||||
rootCmd.Flags().BoolVar(&Handlers, "handlers", false, "display registered handlers (for debugging)")
|
rootCmd.Flags().BoolVar(&Handlers, "handlers", false, "display registered handlers (for debugging)")
|
||||||
|
@ -87,7 +88,6 @@ func init() {
|
||||||
rootCmd.Flags().BoolVar(&Russian, "russian", false, "remove selected images after serving")
|
rootCmd.Flags().BoolVar(&Russian, "russian", false, "remove selected images after serving")
|
||||||
rootCmd.Flags().BoolVarP(&Sorting, "sort", "s", false, "enable sorting")
|
rootCmd.Flags().BoolVarP(&Sorting, "sort", "s", false, "enable sorting")
|
||||||
rootCmd.Flags().BoolVar(&Text, "text", false, "enable support for text files")
|
rootCmd.Flags().BoolVar(&Text, "text", false, "enable support for text files")
|
||||||
rootCmd.Flags().StringVar(&Theme, "theme", "solarized-dark256", "theme for source code syntax highlighting")
|
|
||||||
rootCmd.Flags().BoolVarP(&Verbose, "verbose", "v", false, "log accessed files and other information to stdout")
|
rootCmd.Flags().BoolVarP(&Verbose, "verbose", "v", false, "log accessed files and other information to stdout")
|
||||||
rootCmd.Flags().BoolVarP(&Version, "version", "V", false, "display version and exit")
|
rootCmd.Flags().BoolVarP(&Version, "version", "V", false, "display version and exit")
|
||||||
rootCmd.Flags().BoolVar(&Videos, "video", false, "enable support for video files")
|
rootCmd.Flags().BoolVar(&Videos, "video", false, "enable support for video files")
|
||||||
|
|
|
@ -331,7 +331,7 @@ func ServePage(args []string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if Code || All {
|
if Code || All {
|
||||||
formats.Add(code.New(Theme))
|
formats.Add(code.New(CodeTheme))
|
||||||
}
|
}
|
||||||
|
|
||||||
if Flash || All {
|
if Flash || All {
|
||||||
|
|
Loading…
Reference in New Issue