arnaucube
arnaucube/argosPublic Self-hosted repository
argos/main.go
main.goRaw
 1package main
 2
 3import (
 4	"bufio"
 5	"fmt"
 6	"os"
 7	"strings"
 8)
 9
10const version = "0.1-dev"
11const minNumWords = 10
12const minNumHashtag = 2
13const iterationsCount = 3
14
15func main() {
16	c.Yellow("Argos Panoptes")
17	fmt.Println("---------------")
18	c.Cyan("argos initialized")
19	c.Purple("https://github.com/arnaucode/argos")
20	fmt.Println("version " + version)
21	fmt.Println("Reading twitterConfig.json file")
22	client := readConfigTokensAndConnect()
23	fmt.Println("---------------")
24	newcommand := bufio.NewReader(os.Stdin)
25	fmt.Print("Please select command number")
26	options := `
27	1 - Analyze username
28	2 - Delete Tweets & Rretweets
29	3 - Unfollow all
30	4 - Follow random
31	0 - Exit script
32option to select: `
33	for {
34		fmt.Print(options)
35
36		option, _ := newcommand.ReadString('\n')
37		option = strings.TrimSpace(option)
38
39		switch option {
40		case "1":
41			fmt.Println("selected 1 - Analyze username")
42			optionGetUserTweets(client)
43			break
44		case "2":
45			fmt.Println("selected 2 - Delete Tweets")
46			optionDeleteTweets(client)
47			break
48		case "3":
49			fmt.Println("selected 3 - Unfollow all")
50			optionUnfollowAll(client)
51			break
52		case "4":
53			fmt.Println("selected 4 - Follow random")
54			optionFollowRandom(client)
55			break
56		case "0":
57			fmt.Println("selected 0 - exit script")
58			os.Exit(3)
59			break
60		default:
61			fmt.Println("Invalid option")
62			break
63		}
64	}
65}