init
This commit is contained in:
36
main.go
Normal file
36
main.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var (
|
||||
paramsXML string
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "SJY01Preprocessing",
|
||||
Short: "Preprocessing tools for SJY01 dataset",
|
||||
Long: `Preprocessing tools for SJY01 dataset`,
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
fmt.Println("preprocessing tools for SJY01 dataset")
|
||||
p := Params{
|
||||
InputData: "demo/050722.dat",
|
||||
OutputPath: "demo/output",
|
||||
TempPath: "demo/temp",
|
||||
DataId: "050722",
|
||||
}
|
||||
// preprocess(&p)
|
||||
exractImageData(&p)
|
||||
},
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.PersistentFlags().StringVarP(¶msXML, "params", "p", "params.xml", "parameters file path")
|
||||
}
|
||||
|
||||
func main() {
|
||||
rootCmd.Execute()
|
||||
}
|
||||
Reference in New Issue
Block a user