Browse Source

small update

master
arnaucode 7 years ago
parent
commit
ee7caca895
7 changed files with 16 additions and 2 deletions
  1. +3
    -1
      README.md
  2. +2
    -0
      analyzeDates.go
  3. BIN
      build/goTweetsAnalyze
  4. +10
    -0
      getUser.go
  5. +1
    -1
      main.go
  6. BIN
      screen2.png
  7. BIN
      screen3.png

+ 3
- 1
README.md

@ -2,7 +2,9 @@
twitter analyzer written in Go lang
![Alt text](https://raw.githubusercontent.com/arnaucode/goTweetsAnalyze/master/screen1.png "screen")
![Alt text](https://raw.githubusercontent.com/arnaucode/goTweetsAnalyze/master/screen3.png "screen")
![Alt text](https://raw.githubusercontent.com/arnaucode/goTweetsAnalyze/master/screen2.png "screen")
needs a twitterConfig.json file on the /build folder with the content:
```

+ 2
- 0
analyzeDates.go

@ -66,7 +66,9 @@ func analyzeHours(tweets []twitter.Tweet) {
}
func analyzeDates(tweets []twitter.Tweet) {
fmt.Println("Weekly activity distribution (per day)")
analyzeDays(tweets)
fmt.Println(" ")
fmt.Println("Daily activity distribution (per hour)")
analyzeHours(tweets)
}

BIN
build/goTweetsAnalyze


+ 10
- 0
getUser.go

@ -23,7 +23,17 @@ func getUser(client *twitter.Client) {
Count: 200,
})
fmt.Println("word count")
analyzeWords(tweets)
analyzeDates(tweets)
fmt.Println(" ")
fmt.Print("first tweet analyzed: ")
fmt.Println(tweets[len(tweets)-1].CreatedAt)
fmt.Print("last tweet analyzed: ")
fmt.Println(tweets[0].CreatedAt)
fmt.Println(" ")
fmt.Println("User @" + username + " analysis finished")
}

+ 1
- 1
main.go

@ -7,7 +7,7 @@ import (
"strings"
)
const minNumWords = 10
const minNumWords = 3
func main() {
fmt.Println("---------------")

BIN
screen2.png

Before After
Width: 411  |  Height: 920  |  Size: 51 KiB

BIN
screen3.png

Before After
Width: 442  |  Height: 861  |  Size: 44 KiB

Loading…
Cancel
Save