maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   witter - a python twitter client (https://talk.maemo.org/showthread.php?t=35596)

skr0 2010-05-21 19:22

Re: witter - a python twitter client
 
Update following your suggestion - problems solved.
I am getting all tweets except ReTweets (!!) and the +20 and +50 work fine.

You did say "two interesting problems", do I need to do anything else and should I delete the .jpg s on a regular basis ?

As promised another pint is on it's way to you.
Great application.

dwould 2010-05-21 19:32

Re: witter - a python twitter client
 
Quote:

Originally Posted by skr0 (Post 669759)
Update following your suggestion - problems solved.
I am getting all tweets except ReTweets (!!) and the +20 and +50 work fine.

You did say "two interesting problems", do I need to do anything else and should I delete the .jpg s on a regular basis ?

As promised another pint is on it's way to you.
Great application.

great! the two problems where one empty file and one courrupted, probably both caused by same network blip. shouldn't need to clean cache unless you experience problems again. ande the next ver will have some defensive code to cope with this situation.

thanks again for the pint, i will certainly enjoy :-)

dwould 2010-05-23 12:03

Re: witter - a python twitter client
 
#witter 0.3.3-1 now in extras-devel. Details are on my blogs witter page. Some new stuff to try out with notifications and persisting where you were up to when you shut witter, to load only new tweets.

ivnvir 2010-05-23 22:56

Re: witter - a python twitter client
 
I dont like the new "feautures", I mean it should be configurable.. I dont like vibrating and notifications...

The "persisting where you were.." should be great if we had like a separator and the "old" tweets available under/after it. What if I want to read the old ones? Here I get an empty list if there's no tweets since I shutted it down... not a good deal!

CYPHERC 2010-05-24 06:13

Re: witter - a python twitter client
 
i think you are doing a great job! now i dont quite understand how to set up the account, but i manage to "set it up" not completely successful i may add, since im unable to see the trending topics, instead i get an error message every time i try saying: "Error retrieving trends Server returned 404: " can you please help me?

Thanks

nosa101 2010-05-24 06:18

Re: witter - a python twitter client
 
maybe the older tweets could get cached.
This way the older tweets show while witter looks for new tweets

dwould 2010-05-24 06:54

Re: witter - a python twitter client
 
Quote:

Originally Posted by ivnvir (Post 672348)
I dont like the new "feautures", I mean it should be configurable.. I dont like vibrating and notifications...

The "persisting where you were.." should be great if we had like a separator and the "old" tweets available under/after it. What if I want to read the old ones? Here I get an empty list if there's no tweets since I shutted it down... not a good deal!

if you read the detailed change history on my blog, you would see that i consider that version a half way point, i wanted to make it availiable but i know more is needed.
don't update from extras-devel if you don't want to pick up half steps that some may feel are backwards.

Hossie 2010-05-24 08:16

Re: witter - a python twitter client
 
Ok it's getting better now. What we (I ;)) would need now is portrait mode and lists. :D

dwould 2010-05-24 08:39

Re: witter - a python twitter client
 
Quote:

Originally Posted by CYPHERC (Post 672700)
i think you are doing a great job! now i dont quite understand how to set up the account, but i manage to "set it up" not completely successful i may add, since im unable to see the trending topics, instead i get an error message every time i try saying: "Error retrieving trends Server returned 404: " can you please help me?

Thanks

how have you configured it? Oauth/basic? I assume this is a twitter account rather than a twitter compatible service?
Is trends the only thing that gives you a bad response?
I did just check and it's working for me, so at least I've not managed to break it without noticing.

dwould 2010-05-24 08:41

Re: witter - a python twitter client
 
Quote:

Originally Posted by nosa101 (Post 672717)
maybe the older tweets could get cached.
This way the older tweets show while witter looks for new tweets

that is exactly the intention, but it is not a trivial task to persist the last set of tweets to disk and reload at startup.
currently I plan to only store the latest 20 tweets to reload, rather than attempt to store everything.

ilkka 2010-05-24 11:19

Re: witter - a python twitter client
 
Hey Daniel, where are you keeping the source these days? The Garage svn seems pretty stale. I'd tackle #5789 myself and offer up a patch if it weren't.

dwould 2010-05-24 12:06

Re: witter - a python twitter client
 
Quote:

Originally Posted by ilkka (Post 673087)
Hey Daniel, where are you keeping the source these days? The Garage svn seems pretty stale. I'd tackle #5789 myself and offer up a patch if it weren't.

Good point, I switched laptops for development a few weeks back, and havent' gotten around to getting it hooked back up to garage for source. I will try to get around to that this week.

In the mean time /opt/witter is where all the source goes on your device

ivnvir 2010-05-24 12:25

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 672784)
if you read the detailed change history on my blog, you would see that i consider that version a half way point, i wanted to make it availiable but i know more is needed.
don't update from extras-devel if you don't want to pick up half steps that some may feel are backwards.

My bad :(
I thought my devel was disabled but wasn't :P
Sorry!

talmage 2010-05-25 18:15

Re: witter - a python twitter client
 
Witter 0.3.1-9 is known to work with both twitter and identi.ca, right? I'm not able to make it do that. I have accounts on both services. Each account has the same name, 70mmlips. On my N900, witter always fetches from and posts to twitter, regardless of which account is the active one.

dwould 2010-05-25 18:38

Re: witter - a python twitter client
 
Quote:

Originally Posted by talmage (Post 676629)
Witter 0.3.1-9 is known to work with both twitter and identi.ca, right? I'm not able to make it do that. I have accounts on both services. Each account has the same name, 70mmlips. On my N900, witter always fetches from and posts to twitter, regardless of which account is the active one.

please run from x-term:
run-standalone.sh python2.5 /opt/witter/witter.py

this will give a clue as to whether witter is sucessfully really using the second set of details or not.

dwould 2010-05-26 12:59

Re: witter - a python twitter client
 
0.3.3-2 updated to extras-devel last night, since I updated to pr1.2 I added some limited 'support' of portrait mode, in so far as witter will now adjust the text wrap width to fit the portrait orientation.

it still comes with the same caveats of 0.3.3-1, there are some changes that not everyone will want until I do some more work

ZogG 2010-05-26 13:06

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 679283)
0.3.3-2 updated to extras-devel last night, since I updated to pr1.2 I added some limited 'support' of portrait mode, in so far as witter will now adjust the text wrap width to fit the portrait orientation.

it still comes with the same caveats of 0.3.3-1, there are some changes that not everyone will want until I do some more work

i think it's time to start new thread and add some screenies?

dwould 2010-05-26 13:22

Re: witter - a python twitter client
 
Quote:

Originally Posted by ZogG (Post 679312)
i think it's time to start new thread and add some screenies?

Why a new thread?
I'll try to spend some time taking some screenshots later in the week, but I'll probably end up putting them on the witter page on my blog rather than here.

corsac 2010-05-26 16:45

Re: witter - a python twitter client
 
Hmmh, it seems that I can't find how to configure a status.net account. I can't manage to configure properly the urls... Any help would be appreciated :)

dwould 2010-05-26 18:15

Re: witter - a python twitter client
 
Quote:

Originally Posted by corsac (Post 679989)
Hmmh, it seems that I can't find how to configure a status.net account. I can't manage to configure properly the urls... Any help would be appreciated :)

I would assume it would be much like identi.ca so :
http://status.net/api/
http://st
twitter is awkward and has a separate search base url, but most others have the same base url for search as it is there from day one.

does that not work?

corsac 2010-05-26 18:27

Re: witter - a python twitter client
 
http://status.net/api/ gives a 404 error in my browser, and doesn't do anything in witter

corsac 2010-05-26 18:31

Re: witter - a python twitter client
 
(in my case it's a subdomain of pantoufle.net but still, no /api/ )

dwould 2010-05-26 18:45

Re: witter - a python twitter client
 
Quote:

Originally Posted by corsac (Post 680299)
(in my case it's a subdomain of pantoufle.net but still, no /api/ )

pantoufle.net shows up as a domain for sale, and status.net obviously only hosts a service for other domains
Do you have web access to this account? another client which gets access?

basically you should be able to go to the timeline in a browser, or using curl and get a response, once you can do that, you have the base url you need.

corsac 2010-05-26 18:51

Re: witter - a python twitter client
 
Hmh, not sure why I told pantoufle which is unrelated :)

I meant a subdomain of status.net. I'll try to play with it but I'm not exactly sure about how it works, especially since it's not open, so one needs to be logged in to access the feeds (which might not be supported by witter?)

corsac 2010-05-26 18:57

Re: witter - a python twitter client
 
Seems that the correct url for timeline is:

https://<domain>.status.net/api/statuses/public_timeline.rss so I guess I should use an identi.ca type account, and enter as url: https://<domain>.status.net/api/ but it doesn't seem to work :) Sorry for bothering

dwould 2010-05-26 19:05

Re: witter - a python twitter client
 
Quote:

Originally Posted by corsac (Post 680380)
Seems that the correct url for timeline is:

https://<domain>.status.net/api/statuses/public_timeline.rss so I guess I should use an identi.ca type account, and enter as url: https://<domain>.status.net/api/ but it doesn't seem to work :) Sorry for bothering

can you go to
https://<domain>.status.net/api/statuses/public_timeline.json
and get a json reponse?
or try just http via the browser?
I know identi'ca works, so it should be possible, but I don't know how much variance there is in the hosted sites etc.

corsac 2010-05-26 19:59

Re: witter - a python twitter client
 
Hhmh, using tcpdump on the n900 I'm trying to debug things. When starting witter, it seems that it requests:

/api/statuses/friend_timeline.json
/api/statuses/replies.json
/api/statuses/direct_messages.json

and the server replies with 200OK but the json look empty. It doesn't seem to request public_timeline.json.

dwould 2010-05-26 20:05

Re: witter - a python twitter client
 
Quote:

Originally Posted by corsac (Post 680590)
Hhmh, using tcpdump on the n900 I'm trying to debug things. When starting witter, it seems that it requests:

/api/statuses/friend_timeline.json
/api/statuses/replies.json
/api/statuses/direct_messages.json

and the server replies with 200OK but the json look empty. It doesn't seem to request public_timeline.json.

ok, so all of those requests should have worked, they are teh ones that would provide you your user timeline, mentions of you and dms, public timeline is something available but you'd have to manually refresh in the public timeline.

but if the server is responding with 200's but not sending anything, presumably witter is no longer reporting 404s?

obviously if witter isn't being sent any content, there is not a lot it can do about it.

corsac 2010-05-26 20:14

Re: witter - a python twitter client
 
Yeah, I don't have 404s anymore, but what would really interest me on that particular installation is the public timeline. I'm not at all a twitter user (sorry for being a newbie), so I need to manually refresh it, I guess. But I have no idea how to do that using witter.

dwould 2010-05-26 20:20

Re: witter - a python twitter client
 
Quote:

Originally Posted by corsac (Post 680631)
Yeah, I don't have 404s anymore, but what would really interest me on that particular installation is the public timeline. I'm not at all a twitter user (sorry for being a newbie), so I need to manually refresh it, I guess. But I have no idea how to do that using witter.


select the icon that has lots of little 'people' on it, the title bar will show 'Witter - public'
Then hit the bottom left refresh button to trigger a request for the public timeline.

RGS 2010-05-27 03:54

Re: witter - a python twitter client
 
Since Pr1.2 witter does not work correctly. The timeline seems to work fine but DM's and @'s do not show up anymore in the corresponding views. I tried to use the +n buttons but to no avail. All other views just work fine.

Am I the only one with this problem?

version 0.3.3-2

BTW it's appreciated that you put all this work into a decent twitter application.

nosa101 2010-05-27 04:21

Re: witter - a python twitter client
 
works fine for me

corsac 2010-05-27 07:57

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 680641)
select the icon that has lots of little 'people' on it, the title bar will show 'Witter - public'
Then hit the bottom left refresh button to trigger a request for the public timeline.

Thanks you for your time, it does work fine :)

For people looking for info about status.net stuff:

Account type: Identi.ca
Username: <username>
Password: <password>
https://<domain>.status.net/api/
https://<domain>.status.net/api/

are the parameters which seem to work fine for me. The final / is important, or the connection will fail.

dwould 2010-05-27 09:04

Re: witter - a python twitter client
 
Quote:

Originally Posted by corsac (Post 681948)
Thanks you for your time, it does work fine :)

For people looking for info about status.net stuff:

Account type: Identi.ca
Username: <username>
Password: <password>
https://<domain>.status.net/api/
https://<domain>.status.net/api/

are the parameters which seem to work fine for me. The final / is important, or the connection will fail.

you should not have needed to set account type to identi.ca, you should be able to set it to 'other' and set teh same urls, that said the account types are just a short hand to allow me to pre-populate the urls with 'known' values

glad it's working for you

dwould 2010-05-27 09:06

Re: witter - a python twitter client
 
Quote:

Originally Posted by RGS (Post 681490)
Since Pr1.2 witter does not work correctly. The timeline seems to work fine but DM's and @'s do not show up anymore in the corresponding views. I tried to use the +n buttons but to no avail. All other views just work fine.

Am I the only one with this problem?

version 0.3.3-2

BTW it's appreciated that you put all this work into a decent twitter application.

There is a bug in witter for loading older mentions it seems, I get the same thing so I'll tak ea look at fixing it later.

appreciation can be shown in the form of pints bought for me via my blog....;-)

talmage 2010-05-27 19:41

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 676713)
please run from x-term:
run-standalone.sh python2.5 /opt/witter/witter.py

this will give a clue as to whether witter is sucessfully really using the second set of details or not.


I did as you suggested. Based on the output, I don't believe that witter contacts identi.ca at all. There are two places in the output where witter says he's fetching tweets. Both times, he's getting them from twitter.com.

I can't tell from the output if he contacts identi.ca when I make a tweet. I can tell you that when I tweet with the active account set to identi.ca, my little message shows up on twitter.com but not on identi.ca.

Here is the output from witter. For the sake of brevity, I have replaced some of the lines that were repeated several times in a row with text of the form

[previous <n> lines repeated <m> times]

Code:

#6b6bd3d3ffff
#00007575b5b5
no service setting
No more users to load
Establishing api for Twitter using basic auth
Establishing api for Twitter using oauth
Connection working ok
Establishing api for Identi.ca using basic auth
Establishing api for Identi.ca using oauth
Connection working ok
running tasks: 1
getting tweets with 70mmlips
base url = http://identi.ca/api/
base url of api object = https://twitter.com/
fetching tweets from https://twitter.com/statuses/friends_timeline.json
running tasks: 2
getting dms
running tasks: 3
getting mentions
end refresh setup
error
Error retrieving mentions (8, 'EOF occurred in violation of protocol')
running tasks: 2
loaded pixbuf from file
loaded pixbuf from file
re-using file already loaded
loaded pixbuf from file
re-using file already loaded
  [previous message repeated four more times]
loaded pixbuf from file
re-using file already loaded
  [previous message repeated four more times]
reply to pjutter
re-using file already loaded
  [previous message repeated four more times]
refreshing avatar for 35969532
[Errno 2] No such file or directory: ''
failed to retreive picture for  : 35969532.jpg
  [previous three messages repeated four times]
loaded pixbuf from file
re-using file already loaded
refreshing avatar for 35969532
[Errno 2] No such file or directory: ''
failed to retreive picture for  : 35969532.jpg
  [previous three messages repeated seven times]
running tasks: 1
re-using file already loaded
re-using file already loaded
re-using file already loaded
refreshing avatar for 35969532
fetched image
updating all stored images for 35969532
Found pixbuf to update
  [previous message repeated 23 times]
running tasks: 0
running tasks: 1
sending tweet
Tweet Sent
Tweet successful
running tasks: 0
running tasks: 1
sending tweet
Tweet Sent
Tweet Failed
running tasks: 0
running tasks: 1
sending tweet
Tweet Sent
Tweet successful
running tasks: 0
running tasks: 1
getting tweets with 70mmlips
base url = http://identi.ca/api/
base url of api object = https://twitter.com/
refreshing since14712684725
fetching tweets from https://twitter.com/statuses/friends_timeline.json
re-using file already loaded
re-using file already loaded
running tasks: 0
Stop Wittering
shutting down refresh loop
written config object to file
stopping thread
stopping thread
stopping thread
killing thread
killing thread
killing thread


dwould 2010-05-27 22:08

Re: witter - a python twitter client
 
Quote:

Originally Posted by talmage (Post 683859)
I did as you suggested. Based on the output, I don't believe that witter contacts identi.ca at all. There are two places in the output where witter says he's fetching tweets. Both times, he's getting them from twitter.com.

I can't tell from the output if he contacts identi.ca when I make a tweet. I can tell you that when I tweet with the active account set to identi.ca, my little message shows up on twitter.com but not on identi.ca.

Here is the output from witter. For the sake of brevity, I have replaced some of the lines that were repeated several times in a row with text of the form

[previous <n> lines repeated <m> times]

[CODE]#6b6bd3d3ffff
#00007575b5b5
no service setting
No more users to load
Establishing api for Twitter using basic auth
Establishing api for Twitter using oauth
Connection working ok
Establishing api for Identi.ca using basic auth
Establishing api for Identi.ca using oauth
Connection working ok
running tasks: 1
getting tweets with 70mmlips
base url = http://identi.ca/api/
base url of api object = https://twitter.com/
fetching tweets from https://twitter.com/statuses/friends_timeline.json

so do you have 2 accounts defined? one twitter, and one identi.ca?
and if you look at the accounts view which does witter think is active?
I have a twitter and identi'ca account and it works fine for me, I can switch between them etc, so it *can* work. just need to figure what is different about your setup.

talmage 2010-05-28 02:23

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 684179)
so do you have 2 accounts defined? one twitter, and one identi.ca?
and if you look at the accounts view which does witter think is active?

Yes, I have two accounts. Both have the same name, 70mmlips. Witter thinks that the identi.ca account is the active one.

dwould 2010-05-30 12:30

Re: witter - a python twitter client
 
Quote:

Originally Posted by talmage (Post 684527)
Yes, I have two accounts. Both have the same name, 70mmlips. Witter thinks that the identi.ca account is the active one.

could you send me the contents of /home/user/.witterUser

please redact the password fields, but the rest will help understand what's going on.

dwould 2010-05-30 17:26

Re: witter - a python twitter client
 
0.3.3-4 in extras-devel, see my blogs witter page for change history


All times are GMT. The time now is 08:16.

vBulletin® Version 3.8.8