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.

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