diff options
author | Keuin <[email protected]> | 2022-09-08 14:03:00 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-09-08 14:03:00 +0800 |
commit | 1fe452a147ed6a7e77a4d03ec4ce5fc8a4bd3d63 (patch) | |
tree | 17e9d2659805dbcedf7f730f54dee8af859f6cfd /main.go | |
parent | a792a818dc1ed57c65a253aaa2b0ce2c246a289a (diff) |
Remove redundant ".". Better default values.
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -33,30 +33,33 @@ func getTasks() (tasks []recording.TaskConfig) { "c", "config", &argparse.Options{ Required: false, - Help: "Specify which configuration file to use. JSON, TOML and YAML are all supported.", + Help: "Specify which configuration file to use. JSON, TOML and YAML are all supported", }, ) rooms := parser.IntList( "s", "room", &argparse.Options{ Required: false, - Help: "The room id to record. Set this to run without config file", + Help: "Specify which room to record. " + + "The ID is included in bilibili live webpage url. " + + "Set this to run without config file", }, ) saveToPtr := parser.String( "o", "save-to", &argparse.Options{ Required: false, - Help: "Specify which configuration file to use", - Default: ".", + Help: "Specify the directory where to save records. " + + "If not set, process working directory is used", }, ) diskBufSizePtr := parser.Int( "b", "disk-write-buffer", &argparse.Options{ Required: false, - Help: "Specify disk write buffer size (bytes). The real minimum buffer size is determined by OS", - Default: -1, + Help: "Specify disk write buffer size (bytes). " + + "The real minimum buffer size is determined by OS", + Default: 4194304, }, ) @@ -107,7 +110,7 @@ func getTasks() (tasks []recording.TaskConfig) { // generate task list from cli taskCount := len(*rooms) tasks = make([]recording.TaskConfig, taskCount) - saveTo := *saveToPtr + saveTo := common.Zeroable[string](*saveToPtr).OrElse(".") diskBufSize := *diskBufSizePtr for i := 0; i < taskCount; i++ { tasks[i] = recording.TaskConfig{ |