Thoughts on Rails

Riding the Train of Thought

Archive for the ‘software’ Category

Setting up Twitter Channels using Google App Engine and Python / Tweepy / Twaebot #geek

leave a comment »

Harshad_sharma_img_20111110_00

I had mentioned in July 2011 on my Google+ stream that I would like to see ‘channels’ for my posts.

I talk about various topics on my twitter account. My posts about traveling or food are irrelevant to someone who wants to follow me for my programming related updates. A friend who might be interested in the photos I upload has to bear all the geek talk and quotes and retweets. 

Of course, I’m unwilling to tweet from multiple accounts… choosing the right account every time!

No more!

I’m testing a small bot that watches my tweets from my main account ( @hiway ) and if any of the latest tweets contain certain keywords or hashtags, it relays the same tweet from a sub-account – what I call a channel… an account set up for topical tweets. For example, one can follow only my technology related tweets by following @hiwaybot instead of following the main account. Or you can choose to follow @harshadsharma for my photography related tweets. @biasedmonk is for travel tweets and @hiwaybaba is for miscellaneous gyaan, philosophy, poetry, quotations and other silly stuff. Of course, following my main account is more fun because you will get immediate response from me and I prefer to converse from that account. Other accounts are mostly for broadcast – for people who aren’t interested in the person, but only the content ;)

For now I’ll use twitter’s notifications and tweetdeck columns to monitor replies to the sub-accounts, in future I might also come up with a more streamlined approach… while hoping twitter beats me to it. Having twitter channels would be awesome. Assign hashtags to our channels and we’re set! People can choose to follow @hiway:geek instead of @hiway and every tweet I send with #geek in it will be posted to them, all else will be filtered out.

Your thoughts?

Written by hiway

November 10, 2011 at 1:34 am

Posted in software

Setting up Twitter Channels using Google App Engine and Python / Tweepy / Twaebot #geek

leave a comment »

Harshad_sharma_img_20111110_00

I had mentioned in July 2011 on my Google+ stream that I would like to see ‘channels’ for my posts.

I talk about various topics on my twitter account. My posts about traveling or food are irrelevant to someone who wants to follow me for my programming related updates. A friend who might be interested in the photos I upload has to bear all the geek talk and quotes and retweets. 

Of course, I’m unwilling to tweet from multiple accounts… choosing the right account every time!

No more!

I’m testing a small bot that watches my tweets from my main account ( @hiway ) and if any of the latest tweets contain certain keywords or hashtags, it relays the same tweet from a sub-account – what I call a channel… an account set up for topical tweets. For example, one can follow only my technology related tweets by following @hiwaybot instead of following the main account. Or you can choose to follow @harshadsharma for my photography related tweets. @biasedmonk is for travel tweets and @hiwaybaba is for miscellaneous gyaan, philosophy, poetry, quotations and other silly stuff. Of course, following my main account is more fun because you will get immediate response from me and I prefer to converse from that account. Other accounts are mostly for broadcast – for people who aren’t interested in the person, but only the content ;)

For now I’ll use twitter’s notifications and tweetdeck columns to monitor replies to the sub-accounts, in future I might also come up with a more streamlined approach… while hoping twitter beats me to it. Having twitter channels would be awesome. Assign hashtags to our channels and we’re set! People can choose to follow @hiway:geek instead of @hiway and every tweet I send with #geek in it will be posted to them, all else will be filtered out.

Your thoughts?

Written by hiway

November 10, 2011 at 1:34 am

Posted in software

Voicenote: App Idea: Landmark Tweets

leave a comment »

Sound clip 50.amr Listen on Posterous

Build an app that informs people before they reach landmark tweet count, such as 10,000, or 50k or a palindrome number or a number set by user.

Written by hiway

April 18, 2011 at 1:32 pm

Posted in software

Is there a service to transcribe voice to text automatically?

leave a comment »

I’m asking this because I would appreciate even the most rudimentary transcription for these voicenotes that I’ve been posting. It will help searching for text in the content.

The idea is to record voice as a .amr file (awesome compression/ voice quality and availability of native app to record in this format on phones) or mp3 and send it to an email address, where the dictation is transcribed into text using some speech to text software and this text is sent back as a reply to my email, with the amr file still attached… which I can then forward to people or my posterous blog for posting here.

Why reply with attachment? It ensures that the transcribed text is accompanied by original voice note – nobody should be made to hunt down the original file once transcribed text comes back on email, even if just to attach the sound and forward the message.

This gives us the ability to quickly create messages in a format we are comfortable in – speaking. Have it transcribed to text, with some errors acceptable. Review the text, correct errors that could change meaning of our words and forward the pair of voice and text to intended recipient.

This, if available, could be a great boon for blogging raw ideas, spontaneous thoughts, on the move notes.

I’m asking for transcribing whole message in one go. I’m aware there are services that let you make a phone call and dictate emails. But I want both voice and text available :)

Any luck for finding exact service? Or anyone game to make something like this? Should be trivial if a decent open source speech to text system is available. All that remains is glueing email and that app with some clever code and having some bandwidth and processing resources to spare. Or charge for the service! ;)

Written by hiway

April 18, 2011 at 4:20 am

Posted in software

Voicenote: The best user interface is invisible

leave a comment »

Sound clip 41.amr Listen on Posterous

Title says it all. The voicenote is a long wound rant about the simple title :)

Written by hiway

April 18, 2011 at 4:11 am

Posted in software

The sms-email two-way gateway in action:

leave a comment »

Screen_shot_2011-04-16_at_1

What you see here: Pritam sent me an SMS on my phone, which was forwarded to my email. I replied to that email, it was magically converted into a text message and sent from my phone.

Works seamlessly and beautifully. As a user, there is _nothing_ extra to be learned to use this solution.

Refer to http://post.ly/1u60P for details.

Do tell: Would you pay a small fee to get this functionality, put into one single app on your phone, securely?

Written by hiway

April 16, 2011 at 2:49 pm

Posted in software

Phone-SMS to Gmail 2-way Gateway

leave a comment »

Scan_154

Problem:

  1. I don’t like to type messages on mobile’s touchscreen keyboard when at computer.
  2. I want a backup of all my communication – including text messages, received and sent.

Solution:

  1. Forward all text messages to email.
  2. Reply sent to this email generates a sms from phone and is sent to the original text sender.

Actual Implementation:

Receiving:

  1. Install PythonS60 + PythonScriptShell on mobile
  2. Install Sydewynder framework
  3. Modify the wefeelfine.py example script in Sydewynder to send data to a url via http GET.
  4. Add a small patch to find out the phone number of the message sender (workaround for PyS60 API limitation)
  5. Create a Google App Engine application to handle the http GET request.
  6. Grab the data, dump into email subject and body and send to my email address.
  1. Subject format: Firstname Lastname [+91phonenumber]
  2. Body: message
  • Set up gmail filters to label incoming message as SMS and never send to spam.
  • Replying/Sending:

    1. Install and set up FromSMS on your Symbian phone ( http://fromsms.net )
    2. Set up app engine to receive and process emails.
    3. Reply to the received email, remember to remove all extra text (inline quote, signatures)
    4. Catch the email in appengine application, parse the phone number from the subject.
    5. Using the fromsms api-id, phone number and body content send data to FromSMS API via urlfetch https/POST.
    6. Assuming you have set up FromSMS properly, it will send out the text message to the phone number.

    The complexity of this whole setup is not in coding: the code is barely few lines, but it is in the overhead – of knowing Python APIs for S60 and for Google App Engine, and installing three pieces of software on phone (+ installing Sydewynder needs copying a bunch of files to memory card), and finally using Python scriptshell to ensure the app keeps running at all times.

    Anybody with a little inclination can build this project in a short amount of time. I took about 90 minutes, from idea to implementation, including research on available solutions (and finding FromSMS). About 45 minutes to write this down.

    Why am I not sharing this code right away? Because I’m going to share more and more ideas from now on. Ideas are more powerful than code. And they make you think. If you are building this for yourself, feel free to contact me for help.

    If you are a non-geek friend, and have read till here… and you want this feature, let me know – but beware, theoretically, I will be able to read all your sms correspondence. It is another matter if I’m even interested – have more than enough on my own phone!

    Written by hiway

    April 16, 2011 at 6:15 am

    Posted in software

    Hiwaybot: What perfect timing!

    leave a comment »

    So I get this message at 4:48pm:

    About the same moment as TweetDeck refreshed and showed me the spam update, I got a new mail notification… “It can’t be” I thought as I guessed what the email could be. But there it was…

    Screen_shot_2011-04-08_at_4

    Hehe, I’m pretty happy this this bot v/s bot game I’m playing – and so far it hasn’t blocked any legitimate users, but has missed some bots though. Still needs work to make it better.

    Note: my bot checks my twitter mentions every ten minutes, so this timing is a rare occasion, it won’t happen all the time.

    Written by hiway

    April 8, 2011 at 5:01 pm

    Posted in software

    Updates to @BigLoserApp #bigloser

    leave a comment »

    Screen_shot_2011-04-07_at_4

    If you have registered with @bigloserapp and are tracking your weight, you can monitor your progress here…

    http://bigloserapp.appspot.com/user/[your-twitter-username]

    If you are sponsoring someone or others are sponsoring you, you can check the statistics too. This update should make it easy to monitor your team easily.

    There will be bugs, please don’t hesitate to leave a comment if something is amiss. I’ll fix ASAP.

    Written by hiway

    April 7, 2011 at 4:16 pm

    Posted in python, software

    Software: Torrent Finder

    leave a comment »

    torrentfinder.swf Download this file

    Sometime in the near future, I want to queue torrents for downloading via email/chat/sms, which are picked up by my workstation for downloading. The whole setup will be fairly complex, so I’m working on smaller components – first being able to get a torrent file form given keywords.

    First thing to do is search if someone else has solved your problem, I found this: http://danfolkes.com/2008/02/06/torrent-search/ . It gave me direction and ideas to begin writing code.

    My current script looks nothing like it though, and can be used as a library to get list of torrents, their seeders, size and comment count. Do note that this will break when the site changes design.

    If run as a standalone, tfind.py simply takes in command line arguments, performs a search, gets the torrent url, downloads the file in current directory and exits. No fuss, no questions.

    You can grab app/source code here: https://bitbucket.org/hiway/torrentfinder/

    I’ll leave you with a quote: “You are what you don’t automate.”

    Written by hiway

    April 7, 2011 at 11:15 am

    Posted in python, software

    Follow

    Get every new post delivered to your Inbox.