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)

ofels 2010-03-18 16:55

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 570916)
so for avatars...how often should they be re-downloaded? daily? weekly? would monthly be enough?
or would it be preferable to have a specific button to clear out saved ones and force redownload?

Looking at Thwirl and Mauku it seems it reflects avatar changes immediately with the next tweet. However I would make it configurable:
Next tweet and per minute/hour/day/...

dwould 2010-03-18 17:33

Re: witter - a python twitter client
 
Quote:

Originally Posted by ofels (Post 572155)
Looking at Thwirl and Mauku it seems it reflects avatar changes immediately with the next tweet. However I would make it configurable:
Next tweet and per minute/hour/day/...

The problem with 'configurable' is that it == more code which == more time required.

maybe I'm just over sensitive to the idea of pulling new images every time you do anything. I guess the cost isn't that much, but for someone roaming on 3g its a lot of needless data movement.
I'm thinking I might settle on weekly, but potentially update for anyone you @reply/mention on the basis that you are probably more interested in their stuff being up to date.

Ideally I'm looking for a strategy that will minimise wasted bandwidth, not require lots of code to implement, and keep people moderately up to date with avatars.

at the moment I just look for a file which is twitter_id.jpg and if it doesn't exist then download avatar pic and store it in file of twitter_id.jpg
this was nice and simple. I'm sure I can come up with something lightweight to compromise between the above factors.

ofels 2010-03-18 18:45

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 572200)

Ideally I'm looking for a strategy that will minimise wasted bandwidth, not require lots of code to implement, and keep people moderately up to date with avatars.

I am wondering how other apps handle this issue. I actually havenīt coped with the Twitter API but could imagine that there is a mean of detecting an avatar change.
On the other hand it might be that all apps just download the avatar each time together with the tweet.
Could be worth checking.

sondjata 2010-03-18 18:49

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 570970)
sorry, in theory the code in svn is easier than ever for an enthusiastic person to port back for n8*0, but I have little enough time for development as it is.

Somebody? Anybody? Please.

tywtyw2002 2010-03-20 16:16

Re: witter - a python twitter client
 
The witter has a bug. The one chinese word occupancy 3 word.
but in web twitter one chinese word only occupancy 1 word.
http://www.twitpic.com/19sisx this is website of twitter
http://www.twitpic.com/19sjmh witter
http://www.twitpic.com/19sjrk mukan

dwould 2010-03-20 18:36

Re: witter - a python twitter client
 
Quote:

Originally Posted by tywtyw2002 (Post 574865)
The witter has a bug. The one chinese word occupancy 3 word.
but in web twitter one chinese word only occupancy 1 word.
http://www.twitpic.com/19sisx this is website of twitter
http://www.twitpic.com/19sjmh witter
http://www.twitpic.com/19sjrk mukan

weird, witter just asks for the length of the string in the entry box. presumably gtk thinks it*'s three characters.
i was considering switching from a hard limit to a warned limit which would let you send and just get truncated if twitter doesn't like it.

do you have any experience coding for chinese characters? any special calculation to get the o****ing 'right'?

evil_m0nkey 2010-03-20 21:06

Re: witter - a python twitter client
 
whoa, okay i seem to have a bug.
my witter hasn't updated for quite a while. i still don't have avatars. I have 29 percent rootfs space, all my repositories are working fine, yet it won't update.

any idea guys??

evil_m0nkey 2010-03-20 21:13

Re: witter - a python twitter client
 
nevermind
i just skimmed and assumed there was sth wrong
my bad :P

tywtyw2002 2010-03-21 08:06

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 575024)
weird, witter just asks for the length of the string in the entry box. presumably gtk thinks it*'s three characters.
i was considering switching from a hard limit to a warned limit which would let you send and just get truncated if twitter doesn't like it.

do you have any experience coding for chinese characters? any special calculation to get the o****ing 'right'?

sorry i'm not understand the code of n900.
chinese characters in linux we always use utf8,
In website we use utf8 unicode and other china criterion.
i just know php, i can give you some code of php

$str = "我sadasdas" // this must use utf8 code .
for ($i=0 ; $i<strlen($str);$i++)
{
if(ord( $str{$i} )> 127)
{
$length++;
i++;
}else{
$length++;
}

}
echo $str." length is ".$length; //我sadasdas length is 9

dwould 2010-03-21 21:57

Re: witter - a python twitter client
 
witter 0.3.1 is now available in extras-devel.
see http://danielwould.wordpress.com/witter for details

tywtyw2002, I've not figured out anything yet, but I have made 140 a 'soft' limit so it might mean you can just submit wiht something witter things is much longer but which twitter will be fine with.

Seraphic 2010-03-22 01:15

Re: witter - a python twitter client
 
Loving the 0.3.1 release, awesome job with the avatars.

One more request (though its no biggie) - would it be possible to have the option of display full names in place of the twitter usernames for each contact? A few other clients do this, just think it'd be a nice addition.

Keep up the good work.

evil_m0nkey 2010-03-22 03:37

Re: witter - a python twitter client
 
woot

love the newer version :D

nosa101 2010-03-22 04:25

Re: witter - a python twitter client
 
Is my phone going to explode if I get this from extras devel

digittante 2010-03-22 04:39

Re: witter - a python twitter client
 
D,

Love this new release. The app runs much faster, the layout/theme is much cleaner (and matches the white-text-on-black-background of the OS), and the new navigation paradigm (moving left to see options on a tweet, then back-arrow to the main window) also matches the standard OS nav.

Thanks so much for sticking with it. I know Tweego's got a team of folks behind it, but you've accomplished a lot in short amount of time on your own.

Keep up the great work!

digittante

evil_m0nkey 2010-03-22 08:11

Re: witter - a python twitter client
 
Just downloaded the latest update

glad my advice got heard and double tapping a tweet gets a new page like logpost

keep up the good work

cduv 2010-03-22 08:28

Re: witter - a python twitter client
 
Great update. Now is easy to read and with avatars you get better twitter experience.

Thanks

anapospastos 2010-03-22 08:48

Re: witter - a python twitter client
 
My mentions are not sorted by date. Is this a known bug?

dwould 2010-03-22 09:50

Re: witter - a python twitter client
 
Quote:

Originally Posted by anapospastos (Post 576744)
My mentions are not sorted by date. Is this a known bug?

No it is not. mine are sorted by date. Is this with the latest version? 0.3.1-1?
actually they are sorted by id number, and an assumption that larger number == more recent. if this assumption is false then I may need to think differently

dwould 2010-03-22 09:52

Re: witter - a python twitter client
 
Thinking about promoting 0.3.1-1 to extras-testing
Please let me know about any serious issues if you think it's not ready for that

anapospastos 2010-03-22 09:52

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 576833)
No it is not. mine are sorted by date. Is this with the latest version? 0.3.1-1?
actually they are sorted by id number, and an assumption that larger number == more recent. if this assumption is false then I may need to think differently

Yes I m using the latest version, 0.3.1-1. I opened and closed the prog some times but the problem remains.

dwould 2010-03-22 10:52

Re: witter - a python twitter client
 
Quote:

Originally Posted by anapospastos (Post 576835)
Yes I m using the latest version, 0.3.1-1. I opened and closed the prog some times but the problem remains.

at least it's consistent ;-)
I suppose I might presume that id numbers don't necessarily always go up, so I can consider doing some parsing/processing of the time stamp. I had wanted to avoid that, but it might prove more robust.

Seraphic 2010-03-22 11:39

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 576895)
at least it's consistent ;-)
I suppose I might presume that id numbers don't necessarily always go up, so I can consider doing some parsing/processing of the time stamp. I had wanted to avoid that, but it might prove more robust.

Yep, same issue here, mentions for me are jumbled also so date sorting might be a better bet.

dwould 2010-03-22 15:18

Re: witter - a python twitter client
 
Quote:

Originally Posted by Seraphic (Post 576946)
Yep, same issue here, mentions for me are jumbled also so date sorting might be a better bet.

ok seems like I need to fix that, and the fact I forgot to put RT in the new actions stackable window. and do that before I promote to extras-testing

dwould 2010-03-22 21:47

Re: witter - a python twitter client
 
Frustratingly parsing the UTC timestamp with offset from twitter isn't working properly, the python utilities available on fremantly appear to parse everything except the actual time, returning the right day/date but 00:00:00 for the time. So currently no fix for ensuring sort order is correct.
However I have uploaded a couple of new versions to extras-devel with some minor updates
http://danielwould.wordpress.com/witter for changelog

mscarrot 2010-03-23 01:50

Re: witter - a python twitter client
 
First of all, Daniel: thanks for the update, it looks much better and it seem to work much smoother also. Am impressed how good it looks and is working now. (although I would like an option for changing the background color and tekst color myself, but that is only a personal preference :)....)

I do have a question: is it normal that when you do a search it only shows the avatar's from people in your friend's list. All others are having the Witter Icon in front of them?? don't know if this is done on purpose or if it is a a bug??

dwould 2010-03-23 07:54

Re: witter - a python twitter client
 
Quote:

Originally Posted by mscarrot (Post 578082)
First of all, Daniel: thanks for the update, it looks much better and it seem to work much smoother also. Am impressed how good it looks and is working now. (although I would like an option for changing the background color and tekst color myself, but that is only a personal preference :)....)

I do have a question: is it normal that when you do a search it only shows the avatar's from people in your friend's list. All others are having the Witter Icon in front of them?? don't know if this is done on purpose or if it is a a bug??


that is intentional, twitter search results don't include user info like the avatar url. so to retrieve it would require an additional lookup for each unknown. currently I'm working on the basis that it sufficient for avatars for friends and people talking directly to you. also if you open a users history it will fetch their avatar.

mece 2010-03-23 08:16

Re: witter - a python twitter client
 
Yhis one might just be ready for testing. Very smooth and stable compared to earlier versions.

dwould 2010-03-23 11:04

Re: witter - a python twitter client
 
Quote:

Originally Posted by mece (Post 578288)
Yhis one might just be ready for testing. Very smooth and stable compared to earlier versions.

Not quite, it seems I've broken the replyAll function.
Also follow/unfollow don't work at all with OAUth and I have no idea why ;-(

mscarrot 2010-03-23 13:56

Re: witter - a python twitter client
 
Since the new update I can't post a new tweet at all, tried all day and it looks like it is posting but no conformation and when looking on the web it hasn't post anything :(. Don't know if more users have the same? or is it just me??
The not be able to follow bug I have too...


Thanks for the avatar explanation Daniel !!

Still very happy about this new version !!

dwould 2010-03-23 15:10

Re: witter - a python twitter client
 
Quote:

Originally Posted by mscarrot (Post 578718)
Since the new update I can't post a new tweet at all, tried all day and it looks like it is posting but no conformation and when looking on the web it hasn't post anything :(. Don't know if more users have the same? or is it just me??
The not be able to follow bug I have too...


Thanks for the avatar explanation Daniel !!

Still very happy about this new version !!

erm, that is weird, I've certianly been posting away no problem
if you run witter from a terminal it outputs quite a lot of diagnostic information that might give a hint as to what is going wrong.
open xterm
run:
run-standalone.sh python2.5 /opt/witter/witter.py

see if there are any clues in the output when you attempt to tweet.

mscarrot 2010-03-23 16:04

Re: witter - a python twitter client
 
It doesn't register anything..
it says from running standalone: (and tried to (twice) send a tweet)

getting tweets with PaulaN900
base url = https://twitter.com/
base url of api object = https://twitter.com/statuses/friends_timeline.json
running tasks 0
fetched image
updating all stored images for 41692369

So it seems like it isn't noticing my tweet at all right??

dwould 2010-03-23 16:09

Re: witter - a python twitter client
 
so is that what output after you hit the W button to tweet? or was that already output and nothing additional output when you hit the W button?

mscarrot 2010-03-23 16:17

Re: witter - a python twitter client
 
that was already the output and no additional output after I've hit the W button (tried several times)

dwould 2010-03-23 16:51

Re: witter - a python twitter client
 
Quote:

Originally Posted by mscarrot (Post 578965)
that was already the output and no additional output after I've hit the W button (tried several times)

I'm totally flummoxed, There should be no way to press the button and get no response at all, either you would get a banner saying success or one saying failure.
As it turns out there isn't any diagnostic output on that path that would go to the terminal (though I just added some to the source for future needs)

I can't even guess at what is wrong, since it should be impossible to get no feedback at all from pressing the button.
I'll keep thinking

mscarrot 2010-03-23 17:07

Re: witter - a python twitter client
 
Thanks, but I also don't get a banner at all,
it only shows the moving circle (next to the for a while but that changes to nothing soon, don't get a failure banner after that...

But am wondering if I am the only one with this problem hmmm strange...

Update: even after configure Oauth again problem still exists :(

dwould 2010-03-23 17:19

Re: witter - a python twitter client
 
Quote:

Originally Posted by mscarrot (Post 579035)
Thanks, but I also don't get a banner at all,
it only shows the moving circle (next to the for a while but that changes to nothing soon, don't get a failure banner after that...

But am wondering if I am the only one with this problem hmmm strange...

Update: even after configure Oauth again problem still exists :(

how comfortable are you with a little hacking...?
if you want to try to get more informaiton go to xterm
sudo gainroot (or however you prefer to get root access)
vi /opt/witter/witter.py
scroll down to line 219 which should be the 'enterPressed' method

go into insert mode (i)
and add some print lines either side of the call to newTweet, like so:
print "sending tweet"

result = self.activeAccount.newTweet(self.ui.getEntryText() , reply_to_name=self.reply_to_name, reply_to_id=self.reply_to)

print "Tweet Sent"

then press ESC, and then :wq
to save and exit vi
Then re-run witter. This should at least show if the event notification is triggering the method at all.
also in that method immediately after that there is an if (result=True)
statement, if you put in there
print "tweet successful"
and in the else block
print "tweet failed"
then if for some reason the banner stuff isn't working, then the output should at least show whether witter things it's succeeding in posting or not.

If you don't fancy doing that, then you may have to wait until I get around to a 0.3.1-6 at which point I have put those changes in the code.

mscarrot 2010-03-23 17:26

Re: witter - a python twitter client
 
Daniel,

Will look into that later, am not sure I'm into the hacking stuff but if you described it correctly I can't go wrong right??

Of course would like to provide you more info about this problem,
you are giving us a great (and free) program so it is only a little effort to help you in return !!

dwould 2010-03-23 18:33

Re: witter - a python twitter client
 
Quote:

Originally Posted by mscarrot (Post 579065)
Daniel,

Will look into that later, am not sure I'm into the hacking stuff but if you described it correctly I can't go wrong right??

Of course would like to provide you more info about this problem,
you are giving us a great (and free) program so it is only a little effort to help you in return !!

nevermind...just uploaded 0.3.1-6 to fix twitpic and it contains those new log statements.
give it a whirl and see what it says

nosa101 2010-03-23 18:54

Re: witter - a python twitter client
 
Witter is looking good. Sent you a follow request on Twitter. Glad to help with the testing
there is no auto refresh, right?

dwould 2010-03-23 19:01

Re: witter - a python twitter client
 
Quote:

Originally Posted by nosa101 (Post 579188)
Witter is looking good. Sent you a follow request on Twitter. Glad to help with the testing
there is no auto refresh, right?

look under preferences...


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

vBulletin® Version 3.8.8