Pywitter Improvements Proposal

Presented by Alejandro Cadavid to WinLibre

Alejandro Cadavid López
Medellín, Antioquia, Colombia.
Timezone: GMT -5
Usual Nickname: acadavid
Mail/Gtalk: acadavid@gmail.com
Skype: alejandro.cadavid
MSN: ale_cad_lop@hotmail.com


Synopsis
Pwytter is an application keep track of your Twitter.com account.
As of today, the application is using the Twitter API and a UI built with Tk. The main goals of this proposal is to rewrite the communication layer of Pwytter, in order to open it to other microblogging applications, like FriendFeed, identi.ca, Blep.fm and any other similar services. As a long term project, the support for services like Seesmic is scheduled. In the other hand, a possible Qt rewrite for the GUI has been issued and the idea would be discussed after some prototyping has been done. Finally, the rest of the time would be invested in completing the task list and adding more microblogging services on the application.

Benefits to the WinLibre Community
Pwytter is a very cool project. Is an small application, useful for all those Twitters around. In the process of searching for new ideas, I found that other twitter clients are not Open Source or are based in some private frameworks, and of course, they just support Twitter as blogging platform. Pwytter would become a fully Open Source application with a wide range of support for this kind of services, not only Twitter.

Deliverables

* The first deliverable will be Pwytter with it's communication layer rewritten to support different APIs.

* A prototype of the Qt UI will be written That prototype would let us evaluate how well suited Qt is to handle the project. The prototype will be tested in Mac OS, which is the main worry.  If the prototype is accepted, then the entire UI is ported to Qt. The porting will contain features like: Scrolling, Minimizing to tray icon and Keyboard hotkeys. That's the second deliverable.

* In case the Qt port is not accepted, then the development process will focus on modifying the actual UI written in Tk so it become really separated from program's logic. Besides, features like Scrolling and Tray minimization will be added to the actual Tk UI.

* The following deliverables will have features added. I will deliver a couple of features every week. Some features may be over/under estimated by my proposal so this could be changed for the sake of the project. Basically those features are:

* Clever and dynamic use of APIs limited by calls per hour.
* Multi account support (For each service)
* Support for Graphical Notification (Linux, Mac and Windows)
* Sound notification
* Search support (For self posts, answers, and others which can be developed)
* Automatic URL shortening. (tinyURL.com or some other services).
* Retweeting
* Text highlighting: Specific Retweet or copy/paste
* Support latest twitter API
* Finalize setup.py
* Conversation mode
* Filtering : filter your @replies, DMs, certain users, by text string, etc.
* TwitPic upload
* Topic Tracking and Untracking.
* Pause Button : remain quite during a given time
* Help button

*UI Improvements
- Minimization to tray.
- Post scrolling
- Hotkey support.

If there is enough time, this features could be added:
    * Friends manager.
    * Windows and Linux installers (NSIS, RPM, DEB, etc)
    * Any other idea that may come up.


Project Details
 

My development process
 
To get my ideas clear, I first write them on paper, and I try to solve the problem using concepts. I research by myself and ask for recommendations on the issue if necessary. I write a possible solution on paper and then I like discussing them to get feedback. When I feel that I'm sure of what's going to be done, I write some pseudo-code and if no issue arise, I go into implementation. I'll keep all the process into documents so there is useful information after the project. I like doing unit test, and we could use [1] to automate the process. I ask for code review if necessary, and then commit. I like documenting a lot, and actually i prefer writing the documentation for each method in order to make a clearer idea of what is it going to do. Then i write it's code. Basically I can work comfortably with SVN and Git, but I don't have any problem on learning to use any other cvs. I would recommend Review Board to keep track of the code and a Wiki to keep all the knowledge gathered from the development process, If I find another tool of interest, I'd recommend it. I'm willing to learn to use any other tool that you consider it's a good idea to use along the project. I like committing often, at least once daily, and of course, keeping the weekly deliver promise to keep myself motived and keep worries away from the project.

 
Logic and GUI separation

This is the very first task to be done. Even if we stay with Tk or port to Qt, this is necessary to write a correct Communication layer. Pwytter logic and GUI should be clearly separated, so this is the first thing to do. This means that we could easily write a fast command line interface for Pwytter, totally independent from any GUI. This requires a deep study of the source code, and this will be done in the weeks prior to GSoC coding phase. In this process, code documentation will be added to make Pwytter easier to understand for possible new coming developers.
 

Communication layer.

Pwytter uses python-twitter library [2] to communicate with Twitter's API. This library was expanded to support Identi.ca. What this proposal pretends to do is to rewrite this communication layer so it allow us to use any other microblogging service. In order to communicate with each API, we will write a virtualization layer, which means that we will have a standard way to communicate in between Pwytter and the libraries which provide access to external services. We will write a provider for each service, and each provider will import a proper library which allows it to communicate with the external API. There will be a controller, which will communicate commands from the program to each provider, and the provider will get it's information from the service API.

Port to Qt.

Qt is a good possibility to rewrite Pwytter GUI, but the main problem is Qt in Mac. First, a prototype will be written

The prototype will be a functional program, which will allow us to test how Qt works. As this prototype will work with the same Pwytter's logic, it will provide many of its features (posting a tweet, watching answers, and some other features considered useful to test). At this point, logic was clearly separated from the GUI so, there should be no problem with it.

If this prototype is good enough and there are no big problems with it, and we find a way to solve the problem of installing Qt in a Mac easily (i.e making our Pwytter mac installer which includes Qt), then we rewrite the entire GUI with PyQt [3]. There are no big problems in this process, basically because this libraries are easy to use and Qt Designer could be used to build the UI. All GUI improvements will be added at this points, those like: Scrolling, Minimization to tray bar, etc.

If the port is not accepted, and keep Tk as the toolkit, then the actual Tk GUI will be improved. First, it will be fixed to work in a more Pythonic way (Any PEPs [4] useful for this will be checked). The same GUI improvements of Qt will be added to Tk interface. As there is no necessity to rewrite the entire GUI, there will be more time to implement other features.


Project Schedule


This proposal is written to invest the entire GSoC time on it. I will start working on the project around April 20th, if accepted. From April 20th to May 23th I'll focus mainly in understanding Pwytter code, relearning Python and doing more research on how to implement each feature the best way. This is due my classes are not finished until May 23th.

From May 23th to July 13th I will be working from 8 to 10 hours a day. I expect to be working at least 40 hours per week on the project. From July 13th to August 24th I will be working 6 hours a day. That's because my University starts again in July 13th, but this is not a big issue because the first classes month is not that hard, and I'll have enough time to work on the proyect, and i expect to have a big part of it done for that date.

Weekly milestones.

There are two possible ways to go into week delivers, depending on the Qt port accepted or not.

Week 1: Making logic clearly separated from GUI.
Week 2: Communication layer writing.
Week 3: If communication layer is done, then I'll start prototyping Qt UI. Otherwise, I'll keep working on Communication layer until finished and I'll prototype Qt UI interface in this week anyway.

If prototype is accepted:

Week 4: Porting to Qt (Main window rewrite, multi account support for UI, scrolling, hotkey support).
Week 5: Porting to Qt (Details added (tray minimization, text highlighting) and Qt port is finished).

Each week I'll deliver Pwytter with features added:

Week 6: Clever and dynamic use of APIs limited by calls per hour, support for Graphical Notification (Linux, Mac and Windows)
Week 7: Sound notification, Automatic URL shortening. (tinyURL.com or some other services). Retweeting
Week 8: Search support (For self posts, answers, and others which can be developed), Conversation mode, Filtering : filter your @replies, DMs, certain users, by text string, etc.,
Week 9: Support latest twitter API, Finalize setup.py
Week 10: TwitPic upload, Topic Tracking and Untracking.
Week 11: Pause Button : remain quite during a given time, Help button
Week 12: Testing and Documenting.

If prototype is not accepted:

Week 4: Improving Tk UI (Pythonic mode, features added)

Each week I'll deliver Pwytter with features added:

Week 5: Clever and dynamic use of APIs limited by calls per hour, support for Graphical Notification (Linux, Mac and Windows)
Week 6: Sound notification, Automatic URL shortening. (tinyURL.com or some other services). Retweeting
Week 7: Search support (For self posts, answers, and others which can be developed), Conversation mode, Filtering : filter your @replies, DMs, certain users, by text string, etc.,
Week 8: Support latest twitter API, Finalize setup.py
Week 9: TwitPic upload, Topic Tracking and Untracking.
Week 10: Friends manager.
Week 11: Pause Button, Help button
Week 12: Testing and Documenting.

This is just a Schedule proposal, if mentor consider changes to this schedule, changes are welcome.

If jobs are done before the end of the week, I'll start working on the next week feature, to get everything done as soon as possible. Anyway testing will be done before any release.


Who am I?

I was born in Medellín, Colombia. On March 26th 1989. So right know I'm 20 years old. I study Systems Engineering (Similar curriculum to Computer Science) at Universidad EAFIT. This is my first time at GsOC, and the first time working on an Open Source project as well. I'm interested in programming, mathematics and music. I'm part of a group at my University where we develop techniques to solve programming problems (ACM, SPOJ.pl, TopCoder, etc). I'm a very open minded person. I like sharing ideas and i like discussing them. I usually work by my own, I find my own ways to solve issues things before asking. If it's getting so hard or it's taking more than the planned time, I'll ask for help. Yet, I like reporting myself to get feedback and to feel motivated. That's why I pretend to make a weekly deliver, that keeps me focused and self-motived to keep working.

My Experience:

I mainly use Linux as my Operating System. I use Windows as well. My experience with programming languages is not so wide, I have used Java, C++ and Python in my University projects. I made a Python project with a classmate in my University called Rigo [4] (It was basically a code parser and executer.. it was something like Karel but lighter). I'm showing this code just as a prove that I've coded in Python but it's not actually the best code to show. My coding practices there, are really awful. That's not the kind of code I'd like to develop for WinLibre. I'm not a Python expert, actually I'm almost a beginner, but I find in this project a great opportunity to learn, to get involved in the process of developing real life software. I'm willing to do research. I don't want my mentor to teach me Python, I'll relearn it by myself before the coding phase starts and on the go.


[1] http://docs.python.org/library/unittest.html
[2] http://code.google.com/p/python-twitter/
[3] http://www.riverbankcomputing.co.uk/software/pyqt/intro
[3] http://www.python.org/dev/peps/
[4] http://acadavid.nfshost.com/uploads/rigo.tar.gz

Sign in  |  Recent Site Activity  |  Terms  |  Report Abuse  |  Print page  |  Powered by Google Sites