Added version
This commit is contained in:
parent
ede8a4cd48
commit
b90cbb2b6c
9
main.go
9
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)
|
||||
|
Loading…
Reference in New Issue
Block a user