-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
43 lines (39 loc) · 968 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package main
import (
"log"
"os"
command "github.com/abinashphulkonwar/Textify/Command"
"github.com/abinashphulkonwar/Textify/app"
"github.com/urfave/cli/v2"
)
func main() {
app := &cli.App{
Name: "text extractor",
Usage: "make an explosive entrance",
Action: app.CMDHandler,
Flags: []cli.Flag{
&cli.StringFlag{
Name: command.INPUT,
Aliases: []string{"i"},
Usage: "input file path (image JPG, PNG, JPGE)",
},
&cli.StringFlag{
Name: command.OUTPUT,
Value: "output",
Aliases: []string{"o"},
Usage: "input file will be a .txt file with ***new page*** separated the pages",
DefaultText: "output",
},
&cli.StringFlag{
Name: command.IS_UPLOAD,
Value: "upload",
Aliases: []string{"u"},
Usage: "should input file to be stored in azure",
DefaultText: "false",
},
},
}
if err := app.Run(os.Args); err != nil {
log.Fatal(err)
}
}