You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.3 KiB

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