maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Off Topic (https://talk.maemo.org/forumdisplay.php?f=19)
-   -   Beaker: twitter web service project proposal (https://talk.maemo.org/showthread.php?t=37458)

Texrat 2009-12-16 21:34

Beaker: twitter web service project proposal
 
I've decided to learn Python, Qt, and related technologies because they make the most sense for where I am going.

I want to start with a web service since I will need to get up to speed on wsdl, etc, fairly quickly for work. (EDIT: see note below)

I'll sketch out my idea here first because I want to capture thoughts in a place I almost live (:D) but second because I want to expose the idea in case others are interested in participating.

The basic idea of Beaker is a twitter web service that could be integrated into discussion pages. The program would capture lengthy post content, partition it into 2 or more twitter-length chunks that include key metadata and then submit the tweets.

Chunks would be prefixed by "x/y" whereas "x" is the number of the chunk from first to last, and "y" is the total number of chunks. Chunks would be suffixed by a bit.ly url pointing back to the original comment, article, etc.

I'm fairly adept at building logical parsing engines in general so I can model this easily-- but I'm very new to Python and related tools so it will take me a while to get going on implementation. Again, I am not opposed to anyone stepping in for that BUT in a transparent way that will help me (and others) learn.

Later I will write up some pseudo code to get the modeling underway.

EDIT: it occurred to me it makes more sense to do this in javascript I think...

hypnotik 2009-12-16 21:42

Re: Beaker: twitter web service project proposal
 
You might want to consider a RESTful API for webservices instead of going with a full blown SOAP/WSDL interface - will make things more lightweight.

Texrat 2009-12-16 21:47

Re: Beaker: twitter web service project proposal
 
I'll look into that, thanks!

Texrat 2009-12-16 22:18

Re: Beaker: twitter web service project proposal
 
Pseudocode:

Code:

Chunk count = 0 //x
Chunk total = 0 //y
Capture text content of comment form
  Trigger POST method of comment form
    Capture page url after update
    Create short url of page url via bit.ly
    Save length of bit.ly url in numeric variable
    authenticate user in twitter
      While not end of comment text
        chunk count = chunk count + 1
          parse comment text until chunk is built:
            chunk max length = 140 - ((bit.ly url + 1) + len("x/y") + 1)
            // x = chunk number
            // y = chunk total
          // chunk needs to take spaces into account--
          // break chunks on spaces, never any other character
          // this means chunks will often be less than 140 characters
          chunk = x/y + " " + tempchunk + " " +bit.ly.url
        end parse
        chunk total = chunk total + 1
        delete chunk text from overall comment
        submit chunk as tweet
      end while
 
cleanup/close

let me know if I missed anything! This is pretty rough

Texrat 2009-12-23 20:23

Re: Beaker: twitter web service project proposal
 
I could sure use some help on this.

I have almost zero experience with web service development, so I'm not really sure where to start other than the pseudocode I posted above. I only know that I want this to work like other utilities, such as those for facebook, twitter, et al, that can be hosted on a web page and Just Work.

Ideas?

EIPI 2010-02-08 01:59

Re: Beaker: twitter web service project proposal
 
Texrat - I started a python/qt application from scratch less than 2 weeks ago. That included installing a full ubuntu partition on my laptop, the maemo sdk, learning python, qt and integrating with a webservice. My app works - just packaging problems (lots) that I am struggling with.

The webservice I used was based upon SOAP, and that was very easy to do with some googling and using the python-suds module. Let me know if you need some help - I may be able to muddle my way through. Cheers!

Texrat 2010-02-08 02:44

Re: Beaker: twitter web service project proposal
 
I just saw your packaging post-- hope someone can figure it out!

With this project I mainly wanted to create a web service app/plugin/whatever, but I'm also going to get it to run on the N900 if I can. Maybe the witter developer or others could find a use for the result.

EIPI 2010-02-08 02:50

Re: Beaker: twitter web service project proposal
 
Ahhh - I missed that - mea culpa. In any case, the offer (as little as it may be), still stands

RevdKathy 2010-02-08 07:54

Re: Beaker: twitter web service project proposal
 
I think I understood the word 'twitter'.

When you have time, a quick explanation of what this will do and why I might want it in words comprehensible to a bear of very little brain would be gratefully received.

I'm a user of twitter (among other things, I try to greet every single person who announces a new #n900!) so anything to make twitter easier is good for me. I currrently use Witter, and am very grateful to Daniel for it. :)

Texrat 2010-02-08 07:56

Re: Beaker: twitter web service project proposal
 
The idea is a utility that will break big posts into serialized twitter messages.


All times are GMT. The time now is 11:07.

vBulletin® Version 3.8.8