Git Product home page Git Product logo

mytweets's Introduction

mytweets
Forked by Phil Gyford
[email protected]

This is a fork of simonw's original mytweets script: 
http://github.com/simonw/mytweets/tree/master
via
http://github.com/blech/mytweets

mytweets is a script to back up all your (and/or your friends') tweets to 
local files.
It can save them in JSON or Python's pickle format.

Notes:
1) mytweets requires python-oauth2 from 
   http://github.com/simplegeo/python-oauth2
2) python-oauth2 in turn requires httplib2 from  
   http://code.google.com/p/httplib2/
3) mytweets requires simplejson (unless Python 2.6) from 
   http://pypi.python.org/pypi/simplejson/


Directions:
1) Put fetch.py in any directory

2) Run 'chmod +x fetch.py'

3) Create a file called config.py in the same directory as the fetchy.py 
   script.

4) Set up your Twitter account with a new app:
    a) Go to http://dev.twitter.com/ and log in with your Twitter account.
    b) Click 'Register an app' (or 'Your apps' and then 'Register a new
       app').
    c) Fill out the form.
        * Set 'Application Name' (it won't be publicly visible unless 
          you also use this app to post tweets).
        * Set 'Application website' (it's required).
        * Set 'Application Type' to 'Client'.
        * Set 'Default access type' to 'Read-only' (unless you're 
          going to post tweets using this app).
        * The other fields can be left blank if you like.

5) From the next page copy and paste the 'Consumer key' and 'Consumer 
   secret' into config.py. Then click the 'My Access Token' link on the
   right of the page and copy the 'Access Token (oauth_token)' and 
   'Access Token Secret (oauth_token_secret)' into config.py, eg:

    CONSUMER_KEY = 'Esdfy8iSDF89vdaDFSa789'
    CONSUMER_SECRET = 'DFYUK89fddsfadFDDFS789vsdCXUdfs789xcvDSFH'
    ACCESS_TOKEN = '74382-89FDSHJKjkdsfsfFDSY89SFDFES8978dfsfsda78fdl'
    ACCESS_TOKEN_SECRET = '0dfsYFDSs789SDF7uyfdshjksdf789SFSDFHJKSDF'
    
    or use the -k, -s, -o, -e options on the command line.

6) Add the FILE_PATH to where you want the resulting file of tweets to be 
   saved, into config.py: 

    FILE_PATH = '/path/to/the/file/we/will/create/'

    or use the -f option on the command line.
   
7) Optionally add the TIMELINE argument which can have either 'user'  
   (default) or 'friends', into config.py:

    TIMELINE = 'friends'
    
    or use the -m option on the command line.

8) Run the command like so:

   ./fetch.py [-k your-consumer-key -s your-consumer-secret 
   -o your-access-token -e your-access-token-secret 
   -f /path/to/the/file/we/will/create/ -m friends] [-t]
   
   It can take a long time to run first time round as later pages of 
   results can take a long time to be returned from Twitter.
   
9) Run the command again at any time to save any tweets created since you 
   last ran the script.

mytweets's People

Contributors

blech avatar ecarnevale avatar ewencp avatar philgyford avatar thisisaaronland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.