diff --git a/main.go b/main.go index 3dd5f50..6882ead 100644 --- a/main.go +++ b/main.go @@ -13,7 +13,10 @@ import ( "time" ) +const VERSION = "v1" + var ( + version bool fromHour int toHour int startDir string @@ -28,6 +31,7 @@ func parseCommandLine() { if err != nil { panic(err) } + flag.BoolVar(&version, "version", false, "Display version and exit") flag.IntVar(&fromHour, "from", 0, "Hour each day to start picking images from") flag.IntVar(&toHour, "to", 24, "Hour each day to start picking images up to") flag.StringVar(&startDir, "dir", workDir, "Directory to find date folders in") @@ -179,6 +183,11 @@ func concatVideos(unsortedDates []string) { // {{{ func main() { parseCommandLine() + if version { + fmt.Println(VERSION) + return + } + files := findFiles(startDir) slices.SortStableFunc(files, sortFiles) sortedDays := separateDays(files)