Giter Site home page Giter Site logo

tweet-blender's Introduction

#tweet-blender

A Python script that :

  1. Reports basics and funny stats about your Twitter usage
  2. Allows you to sort and export your tweets using advanced content filtering

##usage :

As soon as you get it from twitter.com, just unzip your twitter archive on your hard drive and save the common_words.txt_ file, common_domains.txt file, and tweet_blender.py script at the root of the archive folder to run it.

stats feature :

$ python tweet_blender.py
Runs the script to reports and print stats stdout.

The stats feature displays many tops 5 which look like this (example below lists most common uncommon words tweeted) :

× stop repeating yourself :
— 1.  fucking
— 2.  fuck
— 3.  code
— 4.  super
— 5.  cool

If you want to resize tops, please use -t option like this :

$ python tweet_blender.py -t 42 - whenever possible, this displays your 42 most tweeted smileys, internet domains, etc...

FYI : data used in previous example is courtesy of my boyfriend, and yes, in case you're wondering : I am very proud.

### sort and export feature :

All of the commands listed below will export selected tweets to the sorted.csv file.

$ python tweet_blender.py -aany pattern [pattern ...]
Adds to selection tweets containing pattern or pattern n. Patterns maybe a word, "an expression" or "a regexp?".

$ python tweet_blender.py -aall pattern [pattern ...]
Adds to selection tweets containing pattern and pattern n.

$ python tweet_blender.py -rany pattern [pattern ...]
Remove from selection tweets containing pattern or pattern n.

$ python tweet_blender.py -rall pattern [pattern ...]
Remove from selection tweets containing pattern and pattern n.

Both [-aany] or [-aall] inculsion options can be combined with [-rany] or [-rall] exclusion options.
For example :

$ python tweet_blender.py -aany pizza "video games" -rall programming coffee
Adds to selection tweets that contain 'pizza' or 'video games' and remove from selection tweets that contain both 'programming' and 'coffee'.

$ python tweet_blender.py -aall @binnie 'cof+e+' -rany pizza donut cookie
Adds to selection tweets that contain '@binnie' and match 'cof+e+' and remove from selection tweets that contain 'pizza' or 'donut' or 'cookie'.

To make your query case insensitive, add [-i] option

## help:

$ python tweet_blender.py -h   
usage: tweet_blender [-h] [-aany pattern [pattern ...] | -aall pattern
                     [pattern ...]] [-rany pattern [pattern ...] | -rall
                     pattern [pattern ...]] [-i] [-t size]

Process some tweets.

optional arguments:
  -h, --help            show this help message and exit
  -aany pattern [pattern ...]
                        Adds to selection each tweet containing any of the
                        listed expressions.
  -aall pattern [pattern ...]
                        Adds to selection each tweet containing all of the
                        listed expressions.
  -rany pattern [pattern ...]
                        Remove from selection each tweet containing any of the
                        listed expressions.
  -rall pattern [pattern ...]
                        Remove from selection each tweet containing all of the
                        listed expressions.
  -i                    Make command case insensitive.
  -t size               Define tops size.

notes:

  • Please feel free to edit the common_words.txt file or common_domains.txt file as you wish in order to obtain more accurate personal and funny results.
  • common_words.txt contains around 1000 french words so you may want to delete them if you tweet only in english, so the script can run quicker.

Dependencies : none.

tweet-blender's People

Contributors

binn1e avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.