Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Python Perl
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
README.md
consumer.zip
rt-mweight.pl
rt_mweight.py

README.md

mikanspweight

Set up

  • Install Net::Twitter::Lite and Net::OAuth perl modules.

    # apt-get install libnet-twitter-lite-perl
    # apt-get install libnet-oauth-perl
    
  • Get following information from @moritapo

    • Consumer key
    • Consumer secret
    • Access token
    • Access token secret

    Now you can retweet the latest mikansp weight with the following command:

    $ ./rt-mweight.pl 'consumer key' 'consumer secret' 'access token' 'access token secret'
    

    Enjoy!

Automate retweets

  • Create /etc/cron.hourly/rt-mweight with permission 755

    #!/bin/sh
    
    /installed/path/rt-mweight.pl 'consumer key' 'consumer secret' 'access token' 'access token secret'
    

TODO items

  • Read the next timeline if we cannot find the latest mweight in the first page.
  • Avoid having secret tokens as plain text.
  • Daemonize rt-mweight.pl.
  • Implement more interesting features rather than simple retweeting.

mikanspweight.py

  • You need some default browser (like w3m, Safari, etc.), Python and virtualenv.

    $ sudo aptitude install python-virtualenv
    
  • Deflate the file consumer.zip

  • do the follwoing sequence:

    $ virtialenv .
    $ source bin/activate
    $ pip install twitter
    $ python rt_mweight.py
    
  • Then your default browser starts and authorize mikanspweight

  • Copy the PIN code

  • Paste to the command line

  • Enjoy the timeline from streaming of @mikansp.

TODO

refs

Something went wrong with that request. Please try again.