mirror of
https://github.com/arnaucube/argos.git
synced 2026-02-07 02:56:41 +01:00
small update
This commit is contained in:
26
README.md
26
README.md
@@ -1,17 +1,27 @@
|
|||||||
# goTweetsAnalyze
|
# goTweetsAnalyze
|
||||||
twitter analyzer written in Go lang, insipired on the Python tweets_analyzer by x0rz https://github.com/x0rz/tweets_analyzer
|
twitter analyzer written in Go lang, insipired on the Python tweets_analyzer by x0rz https://github.com/x0rz/tweets_analyzer
|
||||||
|
|
||||||
|
#### Argus Panoptes
|
||||||
|
https://en.wikipedia.org/wiki/Argus_Panoptes
|
||||||
|
|
||||||
|
https://en.wikipedia.org/wiki/Panopticon
|
||||||
|
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
[under development]
|
[under development]
|
||||||
|
|
||||||
#### Current analysis
|
#### Current features
|
||||||
- word count
|
- User analyzer
|
||||||
- weekly activity distribution
|
- word count
|
||||||
- daily activity distribution
|
- weekly activity distribution
|
||||||
- devices used
|
- daily activity distribution
|
||||||
|
- devices used
|
||||||
|
- Delete Tweets and Favs
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
needs a twitterConfig.json file on the /build folder with the content:
|
needs a twitterConfig.json file on the /build folder with the content:
|
||||||
```
|
```
|
||||||
@@ -29,6 +39,6 @@ to run it:
|
|||||||
- open terminal
|
- open terminal
|
||||||
- execute the script with:
|
- execute the script with:
|
||||||
```
|
```
|
||||||
./goTweetsAnalyze
|
./argus
|
||||||
```
|
```
|
||||||
- follow the instructions that appears on the terminal
|
- follow the instructions that appears on the terminal
|
||||||
|
|||||||
Binary file not shown.
16
color.go
16
color.go
@@ -6,8 +6,8 @@ type Color struct{}
|
|||||||
|
|
||||||
var c Color
|
var c Color
|
||||||
|
|
||||||
func (c Color) Cyan(t string) {
|
func (c Color) DarkGray(t string) {
|
||||||
fmt.Print("\x1b[36;1m") //cyan
|
fmt.Print("\x1b[30;1m") //red
|
||||||
fmt.Println(t)
|
fmt.Println(t)
|
||||||
fmt.Print("\x1b[0m") //defaultColor
|
fmt.Print("\x1b[0m") //defaultColor
|
||||||
}
|
}
|
||||||
@@ -24,6 +24,12 @@ func (c Color) Green(t string) {
|
|||||||
fmt.Print("\x1b[0m") //defaultColor
|
fmt.Print("\x1b[0m") //defaultColor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c Color) Yellow(t string) {
|
||||||
|
fmt.Print("\x1b[33;1m") //green
|
||||||
|
fmt.Println(t)
|
||||||
|
fmt.Print("\x1b[0m") //defaultColor
|
||||||
|
}
|
||||||
|
|
||||||
func (c Color) Blue(t string) {
|
func (c Color) Blue(t string) {
|
||||||
fmt.Print("\x1b[34;1m") //blue
|
fmt.Print("\x1b[34;1m") //blue
|
||||||
fmt.Println(t)
|
fmt.Println(t)
|
||||||
@@ -35,3 +41,9 @@ func (c Color) Purple(t string) {
|
|||||||
fmt.Println(t)
|
fmt.Println(t)
|
||||||
fmt.Print("\x1b[0m") //defaultColor
|
fmt.Print("\x1b[0m") //defaultColor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c Color) Cyan(t string) {
|
||||||
|
fmt.Print("\x1b[36;1m") //cyan
|
||||||
|
fmt.Println(t)
|
||||||
|
fmt.Print("\x1b[0m") //defaultColor
|
||||||
|
}
|
||||||
|
|||||||
@@ -35,11 +35,15 @@ func getAndPrintUserData(client *twitter.Client) *twitter.User {
|
|||||||
}
|
}
|
||||||
func deleteTweets(client *twitter.Client, user *twitter.User) {
|
func deleteTweets(client *twitter.Client, user *twitter.User) {
|
||||||
tweets := getTweets(client, user.ScreenName, iterationsCount)
|
tweets := getTweets(client, user.ScreenName, iterationsCount)
|
||||||
|
count := 0
|
||||||
|
fmt.Println(tweets)
|
||||||
for _, v := range tweets {
|
for _, v := range tweets {
|
||||||
c.Red("deleting: [id: " + v.IDStr + "] " + v.Text)
|
c.Red("deleting: [id: " + v.IDStr + "] " + v.Text)
|
||||||
deleted, _, _ := client.Statuses.Destroy(v.ID, nil)
|
deleted, _, _ := client.Statuses.Destroy(v.ID, nil)
|
||||||
c.Green("deleting: [id: " + deleted.IDStr + "] " + deleted.Text)
|
c.Green("DELETED: [id: " + deleted.IDStr + "] " + deleted.Text)
|
||||||
|
count++
|
||||||
}
|
}
|
||||||
|
c.Red("Deleted " + strconv.Itoa(count) + " tweets")
|
||||||
}
|
}
|
||||||
func deleteFavs(client *twitter.Client) {
|
func deleteFavs(client *twitter.Client) {
|
||||||
|
|
||||||
|
|||||||
8
main.go
8
main.go
@@ -13,12 +13,10 @@ const minNumHashtag = 2
|
|||||||
const iterationsCount = 3
|
const iterationsCount = 3
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
c.DarkGray("Argus Panoptes")
|
||||||
fmt.Println("---------------")
|
fmt.Println("---------------")
|
||||||
fmt.Print("\x1b[36;1m") //cyan
|
c.Cyan("argus initialized")
|
||||||
fmt.Println("goTweetsAnalyze initialized")
|
c.Purple("https://github.com/arnaucode/argus")
|
||||||
fmt.Print("\x1b[35;1m") //cyan
|
|
||||||
fmt.Println("https://github.com/arnaucode/goTweetsAnalyze")
|
|
||||||
fmt.Print("\x1b[0m") //defaultColor
|
|
||||||
fmt.Println("version " + version)
|
fmt.Println("version " + version)
|
||||||
fmt.Println("Reading twitterConfig.json file")
|
fmt.Println("Reading twitterConfig.json file")
|
||||||
client := readConfigTokensAndConnect()
|
client := readConfigTokensAndConnect()
|
||||||
|
|||||||
Reference in New Issue
Block a user