Added version
This commit is contained in:
parent
ede8a4cd48
commit
b90cbb2b6c
9
main.go
9
main.go
@ -13,7 +13,10 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const VERSION = "v1"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
version bool
|
||||||
fromHour int
|
fromHour int
|
||||||
toHour int
|
toHour int
|
||||||
startDir string
|
startDir string
|
||||||
@ -28,6 +31,7 @@ func parseCommandLine() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
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(&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.IntVar(&toHour, "to", 24, "Hour each day to start picking images up to")
|
||||||
flag.StringVar(&startDir, "dir", workDir, "Directory to find date folders in")
|
flag.StringVar(&startDir, "dir", workDir, "Directory to find date folders in")
|
||||||
@ -179,6 +183,11 @@ func concatVideos(unsortedDates []string) { // {{{
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
parseCommandLine()
|
parseCommandLine()
|
||||||
|
if version {
|
||||||
|
fmt.Println(VERSION)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
files := findFiles(startDir)
|
files := findFiles(startDir)
|
||||||
slices.SortStableFunc(files, sortFiles)
|
slices.SortStableFunc(files, sortFiles)
|
||||||
sortedDays := separateDays(files)
|
sortedDays := separateDays(files)
|
||||||
|
Loading…
Reference in New Issue
Block a user