argos/main.go
main.goRaw
1package main
2
3import (
4 "bufio"
5 "fmt"
6 "os"
7 "strings"
8)
9
10const minNumWords = 10
11const iterationsCount = 3
12
13func main() {
14 fmt.Println("---------------")
15 fmt.Println("goTweetsAnalyze initialized")
16 fmt.Println("Reading twitterConfig.json file")
17 client := readConfigTokensAndConnect()
18
19 fmt.Println("---------------")
20 newcommand := bufio.NewReader(os.Stdin)
21 fmt.Print("Please select command number:")
22 options := `
23 1 - Analyze username
24 0 - Exit script
25option to select: `
26 for {
27 fmt.Print(options)
28 option, _ := newcommand.ReadString('\n')
29 option = strings.TrimSpace(option)
30
31 switch option {
32 case "1":
33 fmt.Println("selected 1 - Analyze username")
34 getUserTweets(client)
35 break
36 case "2":
37 fmt.Println("selected 2 - Delete all Favs")
38 break
39 case "3":
40 fmt.Println("selected 3 - Delete all Tweets and Favs")
41 break
42 case "0":
43 fmt.Println("selected 0 - exit script")
44 os.Exit(3)
45 break
46 default:
47 fmt.Println("Invalid option")
48 break
49 }
50 }
51}