Happy New Year All.
I thought what could be a better way to wish Happy New Year than to release a new Android app ... and make the source open.
So here is a fun little app TwitSpeak.
Just tap the icon and it will read your latest twit to you. How's that? Give it a shot.
And as I said, the complete source code of the app is out in the open, under Android's favorite licese APL 2.0.
http://code.google.com/p/twitspeak
(Tip for developers: If you were looking forward to integrating Twitter in your app and found the OAuth tricky to implement, you have ready to use code now. and it is under APL 2.0. Go, grab it).
You can get it from Android Market or get the apk.
Showing posts with label twitter. Show all posts
Showing posts with label twitter. Show all posts
Saturday, January 02, 2010
Tuesday, December 29, 2009
Talking Twitter client
So I learnt this afternoon about this Linux utility called festival. It's a text to speech conversion program. Running it is as simple as
Moreover, installing it on Fedora is as easy as
After that, a bit of a bash and a bit of a python and I had a twit-to-speech utility running.
The code is simply this much:
The above script will ask your twitter credentials, fetch latest 20 twits in friends' timeline, save into a JSON file. A short python script parses the JSON, extracts twit text and user's name from it and outputs in a sanitized format (it removes URLs, because there is no use hearing them).
The sanitized output is saved in another text file, which is piped one line at a time to festival. In case the speech is not clear, it also shows the text in a pop-up using notify-send.
A full script with some error checking can be found here.
echo "Hello world" | festival --tts
Moreover, installing it on Fedora is as easy as
sudo yum install -y festival
After that, a bit of a bash and a bit of a python and I had a twit-to-speech utility running.
The code is simply this much:
#!/bin/bash TWITTERURL="http://twitter.com/statuses/friends_timeline.json" JSON="/tmp/twittline.json" SPEECH="/tmp/twt.message" PYCODE="/tmp/twt2speech.py" read -p "Username: " TUSER && \ read -sp "Password: " TPASS && \ curl -s -u $TUSER:$TPASS $TWITTERURL > $JSON cat > $PYCODE << "EOF" import json import sys import re urlp="(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]" twits = json.load(open(sys.argv[1])) for twit in twits: text = twit['user']['name']+' says: '+twit['text'] text = re.sub(urlp, '', text) print text EOF python $PYCODE $JSON > $SPEECH while read line do notify-send -t 15000 "$line" echo $line | festival --tts sleep 1 done < $SPEECH echo "THE END" | festival --tts
The above script will ask your twitter credentials, fetch latest 20 twits in friends' timeline, save into a JSON file. A short python script parses the JSON, extracts twit text and user's name from it and outputs in a sanitized format (it removes URLs, because there is no use hearing them).
The sanitized output is saved in another text file, which is piped one line at a time to festival. In case the speech is not clear, it also shows the text in a pop-up using notify-send.
A full script with some error checking can be found here.
Labels:
bash,
desktop,
festival,
hack,
linux,
python,
text-to-speech,
text2speech,
twitter
Friday, November 06, 2009
ReaderScope v1.3.2 - Social Channels
Few months back I realized that all the stories I read in my slashdot or ars-technica feeds seemed kinda ... stale. Why? Because most of the interesting ones I had already read - through links posted by the people I follow on Twitter. It is now a cliché to say that Twitter is the fastest medium of spreading news. Consequently, it's the news channel that delivers the latest news. Moreover, it's the news that you care about most; because it is coming from the people you have chosen to follow.
So how can a modern news reader be complete without incorporating this real time news channel.
In v1.3.2, ReaderScope introduces Social Channels.

You will see a third tab "Social" when you start the upgraded ReaderScope. You will find a preset Twitter subscription there. When you tap on it, you will be asked to login to Twitter (if you haven't already). Once it gets Twitter credentials, you can tap it again and it will download you twitter timeline. It won't show you all the twits (that is for dedicated twitter clients). Instead, it will go through all the twits and will pick the ones that have embedded links in them. ReaderScope will fetch the stories/pictures/videos pointed to by those links and when it's done, they will be presented to you as news items (with the original twits as yellow subtext).


How do you like that?
You can also schedule the Twitter subscription for periodic download.
You will see lot of other improvements in this version too, especially the item list (it now has author and timestamp, right in the list). The news fetched from Google News channels, looks fresh (unread) now; instead of dull in color. The unread counts have been fixed too.
On Podcast front: the ones that take too long "Preparing" (because of long time in buffering over slow network) can now be stopped.
So download the upgrade and enjoy.
And yes... in case you haven't noticed yet, ReaderScope is now accepting donations. ReaderScope is available FREE of cost for everyone to use. Some users who are avid news readers, will see great value in it. While others may not. So it's up to you to decide what's ReaderScope worth to you. If you can express it in terms of $$, you will help towards further development of ReaderScope. You can find the donate button on this page
... better yet, let me paste that button right here. :)
Thanks for all your support. More features are coming to ReaderScope. Show your support and help it improve.
Cheers!
So how can a modern news reader be complete without incorporating this real time news channel.
In v1.3.2, ReaderScope introduces Social Channels.

You will see a third tab "Social" when you start the upgraded ReaderScope. You will find a preset Twitter subscription there. When you tap on it, you will be asked to login to Twitter (if you haven't already). Once it gets Twitter credentials, you can tap it again and it will download you twitter timeline. It won't show you all the twits (that is for dedicated twitter clients). Instead, it will go through all the twits and will pick the ones that have embedded links in them. ReaderScope will fetch the stories/pictures/videos pointed to by those links and when it's done, they will be presented to you as news items (with the original twits as yellow subtext).


How do you like that?
You can also schedule the Twitter subscription for periodic download.
You will see lot of other improvements in this version too, especially the item list (it now has author and timestamp, right in the list). The news fetched from Google News channels, looks fresh (unread) now; instead of dull in color. The unread counts have been fixed too.
On Podcast front: the ones that take too long "Preparing" (because of long time in buffering over slow network) can now be stopped.
So download the upgrade and enjoy.
And yes... in case you haven't noticed yet, ReaderScope is now accepting donations. ReaderScope is available FREE of cost for everyone to use. Some users who are avid news readers, will see great value in it. While others may not. So it's up to you to decide what's ReaderScope worth to you. If you can express it in terms of $$, you will help towards further development of ReaderScope. You can find the donate button on this page
... better yet, let me paste that button right here. :)
Thanks for all your support. More features are coming to ReaderScope. Show your support and help it improve.
Cheers!
Labels:
altcanvas,
android,
googlereader,
readerscope,
social,
twitter
Tuesday, May 19, 2009
Cutewit (preview)
This blog has been quiet lately despite all the things I have to share. The main culprit is Twitter. Everything there is to share, trickles away 140 characters a time and nothing is left for a long blog post.
Well, here is an update. I spent the last month applying all the ideas from the inkface library to the Android platform. During the exercise I have written an Android App - a Twitter client - Cutewit. Few hours ago I uploaded a preview version of the app, to Android market and SlideMe. Here are some screenshots:
All the GUI was developed in Inkscape as SVG images. The app lacks many features, but they will soon be coming in the 1.0 release.
If you have Android phone, give it a shot. Even if you don't have a phone (not unlike me) you can still try it in Android emulator that's part of the SDK. I myself plan to use it as a desktop app, running in the emulator window.
That's all for now... follow me on twitter (@jyro) if you are interested in updates.
Well, here is an update. I spent the last month applying all the ideas from the inkface library to the Android platform. During the exercise I have written an Android App - a Twitter client - Cutewit. Few hours ago I uploaded a preview version of the app, to Android market and SlideMe. Here are some screenshots:
All the GUI was developed in Inkscape as SVG images. The app lacks many features, but they will soon be coming in the 1.0 release.
If you have Android phone, give it a shot. Even if you don't have a phone (not unlike me) you can still try it in Android emulator that's part of the SDK. I myself plan to use it as a desktop app, running in the emulator window.
That's all for now... follow me on twitter (@jyro) if you are interested in updates.
Thursday, March 12, 2009
Twitter client with inkface-pygame v0.2.2
Here is an update on the Inkface library. But before that let me give a background of the project for the benefit of new readers that will be reading this post via Planet Maemo.
Inkface is an SVG based GUI framework. Unlike the desktops - where GUI components need to be keyboard/mouse friendly; the handheld GUIs need to be finger friendly. Therefore the handheld GUI components should be naturally manipulatable - like parts of an image. Therefore inkface provides a framework in which, GUI is composed in an image editor like Inkscape, instead of rigidly coded in the program. The various elements of SVG image are presented as python objects to the programmer who can then write his program logic using these elements as widgets.
The current version of inkface uses pycairo for vector graphics rendering and uses pygame as backend surface to draw on. A clutter backend is in the plans.
With that background, let me show a demo of an app that I designed (in Inkscape) and coded (in python) using inkface-pygame library v0.2.2. It's a twitter client. The demo shows how the GUI can be changed vastly by merely changing the SVG files and doing no change in the code at all. (the --theme option tells the app to just use a different set of SVG files) The first one is the default theme and the later has a vintage look.
The whole GUI consists of only 2 SVG images (corresponding to 2 screens - login and main twits page). So to create a new theme one only needs to create/change these two SVG files in Inkscape. Compare this to the traditional approach where a theme consists of tens of PNG images of specific sizes.
I was aiming to release it as an app for diablo, but I had to postpone the plan. For improving the performance during animation, I used pygame's features that are only available in v1.8.x and I later found that Diablo ships with pygame v1.7.x. So I need to work around this incompatibility before I release it for n8x0 devices.
For more information on the project check out the wiki. You can download v0.2.2 tarball from here. It is pure python code and can be tried on desktop. For details on the changelog of v0.2.2 check my post on the mailing list here.
Inkface is an SVG based GUI framework. Unlike the desktops - where GUI components need to be keyboard/mouse friendly; the handheld GUIs need to be finger friendly. Therefore the handheld GUI components should be naturally manipulatable - like parts of an image. Therefore inkface provides a framework in which, GUI is composed in an image editor like Inkscape, instead of rigidly coded in the program. The various elements of SVG image are presented as python objects to the programmer who can then write his program logic using these elements as widgets.
The current version of inkface uses pycairo for vector graphics rendering and uses pygame as backend surface to draw on. A clutter backend is in the plans.
With that background, let me show a demo of an app that I designed (in Inkscape) and coded (in python) using inkface-pygame library v0.2.2. It's a twitter client. The demo shows how the GUI can be changed vastly by merely changing the SVG files and doing no change in the code at all. (the --theme option tells the app to just use a different set of SVG files) The first one is the default theme and the later has a vintage look.
The whole GUI consists of only 2 SVG images (corresponding to 2 screens - login and main twits page). So to create a new theme one only needs to create/change these two SVG files in Inkscape. Compare this to the traditional approach where a theme consists of tens of PNG images of specific sizes.
I was aiming to release it as an app for diablo, but I had to postpone the plan. For improving the performance during animation, I used pygame's features that are only available in v1.8.x and I later found that Diablo ships with pygame v1.7.x. So I need to work around this incompatibility before I release it for n8x0 devices.
For more information on the project check out the wiki. You can download v0.2.2 tarball from here. It is pure python code and can be tried on desktop. For details on the changelog of v0.2.2 check my post on the mailing list here.
Wednesday, February 25, 2009
Inkface+pygame v0.2.0
As per the plan for v0.2, I am ready with a working implementation of inkface. I also made few more design decisions after my last design post. Here are the highlights:
1. All code is in python
2. For X11 surfaces, pygame is used.
I found that pygame (python bindings for SDL) is a mature library for drawing on X11 surfaces. It also has some optimizations which help in 2D animations. There is also OpenGL support, but I do not plan to use it inside inkface library. It is also well supported on Maemo.
I have written my favorite twitter client app with the new inkface-pygame library. The following video demo shows, how I could quickly code 2D scrolling animation with the help of pygame.
The v0.2.0 is delivered as a tarball. I have also updated the inkface wiki with some getting-started tips.
1. All code is in python
2. For X11 surfaces, pygame is used.
I found that pygame (python bindings for SDL) is a mature library for drawing on X11 surfaces. It also has some optimizations which help in 2D animations. There is also OpenGL support, but I do not plan to use it inside inkface library. It is also well supported on Maemo.
I have written my favorite twitter client app with the new inkface-pygame library. The following video demo shows, how I could quickly code 2D scrolling animation with the help of pygame.
The v0.2.0 is delivered as a tarball. I have also updated the inkface wiki with some getting-started tips.
Saturday, January 10, 2009
Inkface v0.1.2, Twitter-inkface client
Finally it is ready. Actually it has been ready for more than couple of weeks now, but I wanted to make sure the bugs in my demo app were not due to problems in core library.
The demo app is a client I wrote for the Twitter service. The intention was to demonstrate how an intuitive GUI can be designed using an Image editor. With the GUI designed using Inkscape and an off-the-shelf python library to talk to Twitter service (Thanks to DeWitt for python-twitter), I only had to write simple glue code to get the whole app working. Check out the video.
Good news is I have setup a debian repo to host packages for this app.
In the Maemo Application Manager, add following Catalog:
Name: Altcanvas
Web Address: http://repo.altcanvas.com
Distribution: testing
Components: main
Refresh the application list. You should see 'twitter-inkface' app in the list. All the dependencies will be automatically pulled from the repo.
Since the repository implementation is currently experimental (No it's not a standard web server! I will save it for a separate post), you may face a problem while installing or I may have to take it offline for modifications. In that case, you can download following four packages and install them with dpkg ("dpkg -i *.deb")
libaltsvg,inkface-python, inklib, twitter-inkface.
For more info on Inkface project, visit the project page.
The demo app is a client I wrote for the Twitter service. The intention was to demonstrate how an intuitive GUI can be designed using an Image editor. With the GUI designed using Inkscape and an off-the-shelf python library to talk to Twitter service (Thanks to DeWitt for python-twitter), I only had to write simple glue code to get the whole app working. Check out the video.
Good news is I have setup a debian repo to host packages for this app.
In the Maemo Application Manager, add following Catalog:
Name: Altcanvas
Web Address: http://repo.altcanvas.com
Distribution: testing
Components: main
Refresh the application list. You should see 'twitter-inkface' app in the list. All the dependencies will be automatically pulled from the repo.
Since the repository implementation is currently experimental (No it's not a standard web server! I will save it for a separate post), you may face a problem while installing or I may have to take it offline for modifications. In that case, you can download following four packages and install them with dpkg ("dpkg -i *.deb")
libaltsvg,inkface-python, inklib, twitter-inkface.
For more info on Inkface project, visit the project page.
Subscribe to:
Posts (Atom)