cdzombak / groupme-tools Goto Github PK
View Code? Open in Web Editor NEW[NO LONGER MAINTAINED] Tools for fetching and analyzing a GroupMe group chat transcript in its entirety.
License: MIT License
[NO LONGER MAINTAINED] Tools for fetching and analyzing a GroupMe group chat transcript in its entirety.
License: MIT License
I'm totally lost with this kind of stuff, I have no clue where I'm supposed to enter in my group's access token and ID. Any help is appreciated, thanks!
➜ groupme-tools git:(master) python groupme-fetch.py --resumePrevious MYID MYTOKEN
starting on page 1
starting on page 2
starting on page 3
starting on page 4
starting on page 5
starting on page 6
starting on page 7
starting on page 8
starting on page 9
Reached the end/beginning!
Transcript contains 166127 messages from 2013-08-13 16:53:40 to 2015-09-16 17:17:59
➜ groupme-tools git:(master) python groupme-fetch.py --resumePrevious MYID MYTOKEN
starting on page 1
starting on page 2
starting on page 3
starting on page 4
starting on page 5
starting on page 6
starting on page 7
starting on page 8
starting on page 9
starting on page 10
starting on page 11
Reached the end/beginning!
Transcript contains 166344 messages from 2013-08-12 20:28:14 to 2015-09-16 17:17:59
➜ groupme-tools git:(master)
Notice the numbers are different! If I keep doing it, I keep getting more and more messages, but only a few pages at a time!
I've downloaded my transcript and its pretty large: over 164,000 messages in a 74mb file. When I open index.html in graph/ what I see is:
Additionally, there is a temp-transcript-groupID.json file that is left over. Is this normal?
Also, Ive used the --resumePrevious and --resumeNext arguments and they both report they are done, however, he first message seems to be continuing a conversation. How can I verify that it is indeed the oldest message?
This is an awesome project!
Is it be possible you can release it under the MIT license so others can build off of it? (See choosealicense.com for more details.
sachinrudr You should probably not post your personal Groupme Access token in the Credential section of the documentation.
Just want to say thanks for a great collection of tools! You're the man!
(closing this because there isn't a real issue)
Here's a patch to fix some issues where users who have ONLY done likes and have not posted messages create problems for the stat script:
With the current script we get KeyError: u'<id>', but when that was fixed some of the division by zero errors came out. This uses a small function to allow anything divided by zero to be zero-- probably close enough for this purpose.
diff --git a/stat/posts-by-user.py b/stat/posts-by-user.py
index b0bf462..054153e 100644
--- a/stat/posts-by-user.py
+++ b/stat/posts-by-user.py
@@ -6,6 +6,11 @@ sys.setdefaultencoding("utf-8")
import json
import datetime
+def divideWhereDivZeroIsZero(dividend,divisor):
+ try:
+ return dividend/divisor
+ except ZeroDivisionError:
+ return 0
def main():
"""Usage: posts-by-user.py filename.json
@@ -45,18 +50,22 @@ Assumes filename.json is a JSON GroupMe transcript.
}
for id, stats in counts.items():
- name = names[id]
+ try:
+ name = names[id]
+ except KeyError:
+ names[id] = 'UID ' + str(id)
+ name = names[id]
count = stats['messages']
like_given_count = stats['likes_given']
like_received_count = stats['likes_received']
output['messages'].append(u'{name}: messages: {count} ({msg_pct:.1f}%)'.format(
- name=name, count=count, msg_pct=count/float(totalMessages) * 100,
+ name=name, count=count, msg_pct=divideWhereDivZeroIsZero(count,float(totalMessages) * 100),
))
output['likes_received'].append(u'{name}: likes received: {like_count} ({like_pct:.1f} per message)'.format(
- name=name, like_count=like_received_count, like_pct=like_received_count/float(count),
+ name=name, like_count=like_received_count, like_pct=divideWhereDivZeroIsZero(like_received_count,float(count)),
))
output['likes_given'].append(u'{name}: likes given: {like_count} ({like_pct:.1f}%)'.format(
- name=name, like_count=like_given_count, like_pct=like_given_count/float(totalLikes) * 100
+ name=name, like_count=like_given_count, like_pct=divideWhereDivZeroIsZero(like_given_count,float(totalLikes) * 100)
))
for category, values in output.items():
print '\n'
groupme-fetch.py runs and command prompt shows that it reaches the end/beginning! and gives me the total messages, but the file is never created for me to look at.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.