small update, code cleaned
arnaucode idoctnef@openmailbox.org
Fri, 21 Apr 2017 10:21:17 +0200
10 files changed,
7 insertions(+),
13 deletions(-)
M
README.md
→
README.md
@@ -1,6 +1,6 @@
http://arnaucode.com/argos/ -# argos +# argos [](https://goreportcard.com/report/github.com/arnaucode/argos) twitter analyzer written in Go lang, insipired on the Python tweets_analyzer by x0rz https://github.com/x0rz/tweets_analyzer #### Argos Panoptes@@ -21,10 +21,10 @@ - Daily activity distribution
- Devices used - Hashtags most used count - Interactions with other users count -2. Delete Tweets -3. Unfollow all -4. Random follow +2. Unfollow all +3. Random follow - selects n number of accounts to follow, and follows n random accounts +4. Delete Tweets 5. Random tweet - post a tweet with content from a selected account
M
analyzeDates.go
→
analyzeDates.go
@@ -59,7 +59,6 @@ }
func analyzeDays(tweets []twitter.Tweet) { var days = make(map[string]int) for _, v := range tweets { - //fmt.Println(v.CreatedAt) day := strings.Split(v.CreatedAt, " ")[0] if _, ok := days[day]; ok { days[day] = days[day] + 1
M
optionDeleteTweets.go
→
optionDeleteTweets.go
@@ -39,7 +39,6 @@ }
func deleteTweets(client *twitter.Client, user *twitter.User) { tweets := getTweets(client, user.ScreenName, iterationsCount) count := 0 - //fmt.Println(tweets) for _, v := range tweets { c.Red("deleting: [id: " + v.IDStr + "] " + v.Text) deleted, _, _ := client.Statuses.Destroy(v.ID, nil)
M
optionFollowRandom.go
→
optionFollowRandom.go
@@ -28,9 +28,8 @@ fmt.Println(err)
} if httpResp.Status != "200 OK" { c.Red(httpResp.Status) + c.Purple("maybe twitter has blocked the account, CTRL+C, wait 15 minutes and try again") } - //fmt.Println(friends.Users) - //c.Green("@" + friends.Users[0].ScreenName) return friends.Users[0].ScreenName }@@ -44,7 +43,6 @@ }
func followRandom(client *twitter.Client, nFollow int, screenName string) { fmt.Println("Starting to follow " + strconv.Itoa(nFollow) + " users") - //screenName := firstScreenName for i := 0; i < nFollow; i++ { userToFollow := getUserToFollowFromUser(client, screenName) followUser(client, userToFollow)
M
optionTweetRandom.go
→
optionTweetRandom.go
@@ -17,6 +17,7 @@ fmt.Println(err)
} if httpResp.Status != "200 OK" { c.Red("error: " + httpResp.Status) + c.Purple("maybe twitter has blocked the account, CTRL+C, wait 15 minutes and try again") } fmt.Print("tweet posted: ") c.Green(tweet.Text)
M
optionUnfollowAll.go
→
optionUnfollowAll.go
@@ -37,7 +37,6 @@ }
if httpResp.Status != "200 OK" { c.Red(httpResp.Status) } - //fmt.Println(following) for _, k := range following.Users { unfollowUser(client, k.ScreenName) //wait to avoid the twitter api limitation
M
printSortedMapStringInt.go
→
printSortedMapStringInt.go
@@ -22,7 +22,6 @@ }
sort.Sort(sort.Reverse(sort.IntSlice(a))) for _, k := range a { for _, s := range n[k] { - //fmt.Printf("%d (%d)- %s,\n", k, tantPerCent, s) fmt.Println(strconv.Itoa(k) + " - " + s) } }
M
readConfigTokensAndConnect.go
→
readConfigTokensAndConnect.go
@@ -24,7 +24,6 @@ fmt.Println("error:", e)
} content := string(file) json.Unmarshal([]byte(content), &config) - //fmt.Printf("%+v\n", config) fmt.Println("twitterConfig.json read comlete") fmt.Print("connecting to twitter api --> ")