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)

dwould 2010-06-03 20:08

Re: witter - a python twitter client
 
Quote:

Originally Posted by lostintime (Post 698264)
Hi all,

after upgrading to the latest version (0.3.3-9) of Witter unfortunately the app has stopped working on my N900.

Code:

$ run-standalone.sh python2.5 /opt/witter/witter.py
gives me:

Code:

Traceback (most recent call last)
File "/opt/witter/witter.py", line 41, in <module> import dbus
ImportError: No module named dbus

Any advice would be greatly appreciated. Witter is definitely the best twitter app for the N900.

means i screwed up and missed a dependancy in the install package. probably because most people have it alrerady for some reason.
to fix in xterm assuming you can do gainroot:
sudo gainroot
apt-get install python-dbus
(probably, i can't check the exact package name right now)
i need to add it as a dependancy to get things pulling in properly at insall time

Snotick 2010-06-03 21:17

Re: witter - a python twitter client
 
Great app, I have only had my N900 for about a week. Witter was one of the first apps I installed.

I have one question. Is Witter suppose to give some type of audible notification when a new tweet is received. The only way to know if a new tweet has arrived is to check Witter. If I happen to be using the phone, I do get a popup banner that says I have received "X" number of updates.

Keep up the great work. I am very new to Maemo, but let me know if I can do anything to help.

dwould 2010-06-03 23:02

Re: witter - a python twitter client
 
Quote:

Originally Posted by Snotick (Post 698395)
Great app, I have only had my N900 for about a week. Witter was one of the first apps I installed.

I have one question. Is Witter suppose to give some type of audible notification when a new tweet is received. The only way to know if a new tweet has arrived is to check Witter. If I happen to be using the phone, I do get a popup banner that says I have received "X" number of updates.

Keep up the great work. I am very new to Maemo, but let me know if I can do anything to help.

I assume you are using the vesion from the main extras repository. the latest versions in testing/devel have a vibrate and led flash alert for mentions and dm's (but still no sound yet)
i'm hoping to get a new version to the main repository in the next few weeks

Snotick 2010-06-03 23:48

Re: witter - a python twitter client
 
I'm using 0.3.1. Thanks for the update. I look forward to the new version.

euanandrews 2010-06-04 04:19

Re: witter - a python twitter client
 
I am using the latest version with the portrait on-screen qwerty....very nice work Daniel....

Is it possible you can make the qwerty function whenever a user types/presses in the tweet/text box....rather than having to press the + to make it appear?
Exactly as done when in landscape mode.

gerrymoth 2010-06-04 06:13

Re: witter - a python twitter client
 
Witter has stopped working for me with the latest version :(

When I try to open its just closing again and I can't seem to get to launching via xterm?

When I run run-standalone.sh python2.5 /opt/witter/witter.py

I'm getting ConfigParser.MissingSectionHeadinError: File contains no section headers.
file: /home/user/.witter

Rob1n 2010-06-04 08:36

Re: witter - a python twitter client
 
Quote:

Originally Posted by gerrymoth (Post 698957)
I'm getting ConfigParser.MissingSectionHeadinError: File contains no section headers.
file: /home/user/.witter

That looks like your .witter config file has become corrupted. Renaming/deleting it should fix the issue (though you'll need to reconfigure everything again).

nosa101 2010-06-04 09:09

Re: witter - a python twitter client
 
Is it possible to disable the portrait mode?

lostintime 2010-06-04 09:44

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 698267)
means i screwed up and missed a dependancy in the install package. probably because most people have it alrerady for some reason.
to fix in xterm assuming you can do gainroot:
sudo gainroot
apt-get install python-dbus

Thanks so much dwould, that did the trick (the missing package is indeed called python-dbus).

You've made me one happy Witter user again :-)

Taomyn 2010-06-04 10:23

Re: witter - a python twitter client
 
Liking what's been happening to Witter the past few months, I tended to stay away from it as I felt it a little difficult to use. A combination of your hard work and PR1.2 seems to be helping a great deal.

If I had one wish, that would be for the text input area to only appear when I want it - having to hit refresh, thus wasting API calls, is a pain and I really don't see why it should be there by default seeing as it's simple enough to get it to reappear once it's gone.

Keep up the great work.

P.S. Please update the first post of this thread - your blog post is, to be exact the comments section, very difficult to read at times with it's almost random layout - it's not obvious where the latest messages are.

Laughing Man 2010-06-04 12:30

Re: witter - a python twitter client
 
I'm having trouble myself..

Code:

$ run-standalone.sh python2.5 /opt/witter/witter.py
no service setting
No more users to load
Establishing api for Twitter using basic auth
Connection working ok
Failed to load cached timeline
Failed to load cached timeline
Traceback (most recent call last):
  File "/opt/witter/witter.py", line 1148, in <module>
    app = Witter()
  File "/opt/witter/witter.py", line 171, in __init__
    self.activeAccount.dmstore = self.reload_timeline_data('/home/user/.witterdm',self.activeAccount.getDmsList())
  File "/opt/witter/witter.py", line 644, in reload_timeline_data
    tweetstore.append([senderName,senderId,tweet,"",tweet_long_id,type,createdAt,replyTo,source,avatar,formattedTweet])
UnboundLocalError: local variable 'avatar' referenced before assignment


dwould 2010-06-04 18:11

Re: witter - a python twitter client
 
Quote:

Originally Posted by Taomyn (Post 699306)
Liking what's been happening to Witter the past few months, I tended to stay away from it as I felt it a little difficult to use. A combination of your hard work and PR1.2 seems to be helping a great deal.

If I had one wish, that would be for the text input area to only appear when I want it - having to hit refresh, thus wasting API calls, is a pain and I really don't see why it should be there by default seeing as it's simple enough to get it to reappear once it's gone.

Keep up the great work.

P.S. Please update the first post of this thread - your blog post is, to be exact the comments section, very difficult to read at times with it's almost random layout - it's not obvious where the latest messages are.

the main issue with hiding the text box is having an event to hook it's dissapearance from. either an extra button, or some kind of timer thread. i'll give it some thought, but it's not as simple as it sounds.

as for the blog, i'll look into it. the comments threading is a little difficult.to follow.

dwould 2010-06-04 18:13

Re: witter - a python twitter client
 
Quote:

Originally Posted by Laughing Man (Post 699470)
I'm having trouble myself..

Code:

$ run-standalone.sh python2.5 /opt/witter/witter.py
no service setting
No more users to load
Establishing api for Twitter using basic auth
Connection working ok
Failed to load cached timeline
Failed to load cached timeline
Traceback (most recent call last):
  File "/opt/witter/witter.py", line 1148, in <module>
    app = Witter()
  File "/opt/witter/witter.py", line 171, in __init__
    self.activeAccount.dmstore = self.reload_timeline_data('/home/user/.witterdm',self.activeAccount.getDmsList())
  File "/opt/witter/witter.py", line 644, in reload_timeline_data
    tweetstore.append([senderName,senderId,tweet,"",tweet_long_id,type,createdAt,replyTo,source,avatar,formattedTweet])
UnboundLocalError: local variable 'avatar' referenced before assignment


what version. I'' pretty sure i fixed that in -10. but I may have messed up and not promoted that version to testing. I will fix the current missing dependancy, and push that verison up to testing to get both issues resolved

dwould 2010-06-04 18:16

Re: witter - a python twitter client
 
Quote:

Originally Posted by euanandrews (Post 698898)
I am using the latest version with the portrait on-screen qwerty....very nice work Daniel....

Is it possible you can make the qwerty function whenever a user types/presses in the tweet/text box....rather than having to press the + to make it appear?
Exactly as done when in landscape mode.

that was the plan, but i didn't find the relevent signal to connect to when I looked quickly, and i wanted to get it out in some form quickly.

obviously in that model i'd also need to use a key on the keyboard to dismiss it again.

may find time this weekend to investigate varius signals that i can use for this kind of thing

anapospastos 2010-06-05 12:00

Re: witter - a python twitter client
 
I 've seen much improvement in witter. Kudos to dwould. Greek language in portrait keyboard would be a nice addition:) And if its possible to count every character as 1 and not 2(in greek language too).

dwould 2010-06-05 12:17

Re: witter - a python twitter client
 
Quote:

Originally Posted by anapospastos (Post 700952)
I 've seen much improvement in witter. Kudos to dwould. Greek language in portrait keyboard would be a nice addition:) And if its possible to count every character as 1 and not 2(in greek language too).

Yeah, internationalisation generally is something I've considered, the main problem (and it;s a selfish one) is that it's a lot of work for something that I don't need, and can't even test properly.
basically I'd have to shift from the easy just using hard coded strings where I need to, to having to have message files and load references to everything. And then I could get volunteers to creates translations of those message files.
I'll think about it, if I can dream up a fast and simple way to convert what I've done so far.... then maybe.

jgbreezer 2010-06-05 14:07

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 699897)
the main issue with hiding the text box is having an event to hook it's dissapearance from. either an extra button, or some kind of timer thread.<snip>

dwould, ta for the strides forwards with this app in the last few weeks. With portrait support and fixed bugs its starting to be quite usable.

Indeed, a timer would be the best way to make the textbox disappear when not in use and the accepted way for other things (am thinking particularly of javascript timers, though that might be lots easier to setup than python+system libraries). Is there an easy interrupt handler kinda thing equivalent (am a c++/linux/python dev but not used to event-driven models yet in native app UIs)?

Obviously getting the text box back again is easy in one way (any keypress event on the main screen opens it up with the key you pressed pre-inserted), but when you're using the virtual keyboard it might be harder (I mean is there another way, apart from clicking a "reply" button from another opened post's window). You could overlay a small button bottom-left (you might not care that you'd cover up an avatar from the bottom post on the screen) that only appears when the hardware keyboard is shut, or steal one of the other hardware buttons (camera button? Probably lots of effort but there might be other apps that provide libs/ways to do it).

I used to get just a busy-wait indicator when I went to "mentions" tab (even before PR1.2), and it never got the tweets/updated; now it shows stuff, and it doesn't lose it when you switch tabs back to it either now. The other windows still seem to be empty though, or take forever. But keep going, its getting better and better!

If I felt I had a good amount of time to spare I'd offer you some coding help (I've slowly been getting to know the pygtk libs the last couple of months by writing my own basic tube station/line info app) and have a little experience with internationalisation from previous paid contracts in python/php.

PS... from your blog, v3.3.7(I think?), I quote:
"Initial support for starting a connection if none exists, currently it starts, but not before witter fails the connection is was trying. not sure yet how to make witter wait for active connection"

Did you fix this? I'm wondering if there's a dbus message you can subscribe to to know when its connected, either that or just retry the socket open for a period of time (or set the socket timeout larger?). There's gotta be a standard way to do it like the builtin Nokia-selected/built apps do.

John, London, UK

dwould 2010-06-05 14:18

Re: witter - a python twitter client
 
Quote:

Originally Posted by jgbreezer (Post 701075)
dwould, ta for the strides forwards with this app in the last few weeks. With portrait support and fixed bugs its starting to be quite usable.

Indeed, a timer would be the best way to make the textbox disappear when not in use and the accepted way for other things (am thinking particularly of javascript timers, though that might be lots easier to setup than python+system libraries). Is there an easy interrupt handler kinda thing equivalent (am a c++/linux/python dev but not used to event-driven models yet in native app UIs)?

I'm pretty sure for dissapearing under inactivity I could just spin off a thread which counts down, and everytime a key event occurs it's counter gets set back to initial value.
I really just need to have the time to figure out if there is a focus event that I can connect to for when someone taps inside the hildon Entry field..
Quote:

Originally Posted by jgbreezer (Post 701075)
Obviously getting the text box back again is easy in one way (any keypress event on the main screen opens it up with the key you pressed pre-inserted), but when you're using the virtual keyboard it might be harder (I mean is there another way, apart from clicking a "reply" button from another opened post's window)

I used to get just a busy-wait indicator when I went to "mentions" tab (even before PR1.2), and it never got the tweets/updated; now it shows stuff, and it doesn't lose it when you switch tabs back to it either now. The other windows still seem to be empty though, or take forever. But keep going, its getting better and better!

Not entirely sure what you mean? timeline/mentions/dm should load at start up, but then only refresh if you have set auto refresh intervals in preferences. Everything else stays blank until you explicitly request a refresh. (search obviously needs search terms, userhistory needs a user name to search for)
Are you saying that even when you ask for a refresh some of the views don't load?
Quote:

Originally Posted by jgbreezer (Post 701075)

If I felt I had a good amount of time to spare I'd offer you some coding help (I've slowly been getting to know the pygtk libs the last couple of months by writing my own basic tube station/line info app) and have a little experience with internationalisation from previous paid contracts in python/php.

PS... from your blog, v3.3.7(I think?), I quote:
"Initial support for starting a connection if none exists, currently it starts, but not before witter fails the connection is was trying. not sure yet how to make witter wait for active connection"

Did you fix this? I'm wondering if there's a dbus message you can subscribe to to know when its connected, either that or just retry the socket open for a period of time (or set the socket timeout larger?). There's gotta be a standard way to do it like the builtin Nokia-selected/built apps do.

John, London, UK


nope not fixed the connection thing yet. I'm using conic, and I *thought* I'd set it up such that I should get a callback for connection events, but it's not firing, and I've not had time to figure out why yet.

skr0 2010-06-05 18:52

Re: witter - a python twitter client
 
I seem to get a lot of 'server returned 400' type errors using Oauth so I competley uninstalled witter including deleting .witter* files fom mhy Home directory.
Installed v 0.3.4-2 without using Oauth I do not get any tweets, just the 'server returned 400' error.

Do you recommend using Oauth or not ?

dwould 2010-06-05 19:07

Re: witter - a python twitter client
 
Quote:

Originally Posted by skr0 (Post 701423)
I seem to get a lot of 'server returned 400' type errors using Oauth so I competley uninstalled witter including deleting .witter* files fom mhy Home directory.
Installed v 0.3.4-2 without using Oauth I do not get any tweets, just the 'server returned 400' error.

Do you recommend using Oauth or not ?

use Oauth, twitter are due to completely remove support for basic auth this month.
400 errors are often associated with hitting your API rate limit.
Go to this URL in a browser: http://twitter.com/account/rate_limit_status.xml
and see if you've hit your limit which is something like 150 requests per hour.
So for instance if you have timeline/mentions and DMs set at 1 min check interval, then you'd reliably blow that 150 limit every hour, and have to wait for the end of the hour to reset.

anapospastos 2010-06-05 19:11

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 700968)
Yeah, internationalisation generally is something I've considered, the main problem (and it;s a selfish one) is that it's a lot of work for something that I don't need, and can't even test properly.
basically I'd have to shift from the easy just using hard coded strings where I need to, to having to have message files and load references to everything. And then I could get volunteers to creates translations of those message files.
I'll think about it, if I can dream up a fast and simple way to convert what I've done so far.... then maybe.

I join in the greek translation team. We 've translated the whole phone menu and some apps. It would be nice witter will be the next application completely translated in greek language.

If you want to contact with me just send me a pm.

euanandrews 2010-06-06 02:33

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 699905)
that was the plan, but i didn't find the relevent signal to connect to when I looked quickly, and i wanted to get it out in some form quickly.

obviously in that model i'd also need to use a key on the keyboard to dismiss it again.

may find time this weekend to investigate varius signals that i can use for this kind of thing

Nice.

To dismiss the keyboard, you would not need a button on the keyboard....there could be 2 ways of dismissing the keyboard
1) Tap the screen anywhere outside the keyboard
2) Press enter on the keyboard

euanandrews 2010-06-06 02:47

Re: witter - a python twitter client
 
Oh...look at that...ya just gone and done just that with your latest update....

I notice that while the witter qwerty is coming up when pressing in the tweet txt box...it is still automatically changing the orientation back to landscap and opening up the default N900 qwerty.....tapping outside the default qwerty then puts witter back into portrait, with the portrait witter qwerty showing

Nice progress though....keep it up

dwould 2010-06-06 12:23

Re: witter - a python twitter client
 
Quote:

Originally Posted by euanandrews (Post 701826)
Oh...look at that...ya just gone and done just that with your latest update....

I notice that while the witter qwerty is coming up when pressing in the tweet txt box...it is still automatically changing the orientation back to landscap and opening up the default N900 qwerty.....tapping outside the default qwerty then puts witter back into portrait, with the portrait witter qwerty showing

Nice progress though....keep it up

i've never run with the nokia osk enabled, since there is a keyboard for landscape entry I can't see why i'd want it. i have no idea if it's possible to prevent nokias landscape keyboard coming up if it's enabled.
do you really use the landscape osk? this problem goes away if you disable it :-)

nosa101 2010-06-06 14:28

Re: witter - a python twitter client
 
will there be an option to switch off portrait mode.

dwould 2010-06-06 14:35

Re: witter - a python twitter client
 
Quote:

Originally Posted by nosa101 (Post 702310)
will there be an option to switch off portrait mode.

maybe. i generally dislike options as they take time to code and mean another whole use case exists that i won't be using. but it wasn't too hard to make gestures optional so i could do similar for rotation.
basically it depends on what mood i'm in next time I'm making changes. :-)

nosa101 2010-06-06 16:00

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 702317)
maybe. i generally dislike options as they take time to code and mean another whole use case exists that i won't be using. but it wasn't too hard to make gestures optional so i could do similar for rotation.
basically it depends on what mood i'm in next time I'm making changes. :-)

Ok because I keeping getting this rotation glitch that forces me to shut down witter everytime. I'll post a screenshot when I get home

euanandrews 2010-06-06 20:41

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 702208)
i've never run with the nokia osk enabled, since there is a keyboard for landscape entry I can't see why i'd want it. i have no idea if it's possible to prevent nokias landscape keyboard coming up if it's enabled.
do you really use the landscape osk? this problem goes away if you disable it :-)

Good point.

But Opera Mobile has done it....it not only uses its own keyboards in both landscape and portrait, it also prevents the default N900 keyboard from popping up....so it can be done.

biggzy 2010-06-06 23:17

Re: witter - a python twitter client
 
Hi dwould, just installed the version from testing with my icons, noticed the User History icon is stretched, will sort it asap.

dwould 2010-06-08 17:53

Re: witter - a python twitter client
 
Quote:

Originally Posted by biggzy (Post 702808)
Hi dwould, just installed the version from testing with my icons, noticed the User History icon is stretched, will sort it asap.

yeah, I now fix the button widths so they are all the same, and force the icons to be 48x48. at least that is the theory.

cjp 2010-06-09 05:53

Re: witter - a python twitter client
 
Heya!

I tried Witter when it was in it's first versions and noticed that when you do the Authentication with Twitter you need to enter the oddly named "Twitter credentials".

The problem is that you can't CTRL + Backspace out of the app to see the number in Twitter.

Also, I think the whole "Twitter credentials" is a bit confusing and not very intuititive as to what it means.

Otherwise it's a great app! :)

CYPHERC 2010-06-09 08:45

Re: witter - a python twitter client
 
i have a question, do u think u can make it read more than 100 friends? becouse i have almost 400, could be helpfull for me and others...

haj 2010-06-09 09:14

Re: witter - a python twitter client
 
Sorry I have not read through the thread.. but:
If I run the twitpic-function and change my mind and exit it again.. and then try twitpic again.. I only get a white display and it doesn't work..

Is that a known bug?

Any suggestions?

markusm 2010-06-09 09:42

Re: witter - a python twitter client
 
2 Attachment(s)
Quote:

Originally Posted by dwould (Post 699897)
the main issue with hiding the text box is having an event to hook it's dissapearance from. either an extra button, or some kind of timer thread. i'll give it some thought, but it's not as simple as it sounds.

as for the blog, i'll look into it. the comments threading is a little difficult.to follow.

If you would add the "More" options that appear when you hit the "+" in the end of the message list - you would gain a free spot for a button to toggle the text box. Hiding the text box would give you the same amount of screen space as fullscreen does now meaning you might even drop the fullscreen button as well. Thus the two right most buttons would be "New tweet" and "Refresh".

This would work even better if you moved the main buttons to the bottom of the screen and the text box would open above it. The buttons would be closer to the thumbs and the top and bottom areas of the screen would be balanced. And if you would display the text box automatically when the user starts typing.

Examples included.

dwould 2010-06-09 19:35

Re: witter - a python twitter client
 
Quote:

Originally Posted by CYPHERC (Post 706788)
i have a question, do u think u can make it read more than 100 friends? becouse i have almost 400, could be helpfull for me and others...

currently it doesn't do paging, it's not impossible to do. Just haven't gotten around to it. It requires a bit more code and thought to handle that case.

dwould 2010-06-09 19:37

Re: witter - a python twitter client
 
Quote:

Originally Posted by haj (Post 706823)
Sorry I have not read through the thread.. but:
If I run the twitpic-function and change my mind and exit it again.. and then try twitpic again.. I only get a white display and it doesn't work..

Is that a known bug?

Any suggestions?

I honestly don't know what causes this, I'm probably doing something wrong with gtk. It happens to all dialog boxes with input fields, as opposed to stacked windows etc.
I'm open to suggestions on what causes this and how I might fix it.

evil_m0nkey 2010-06-09 19:45

Re: witter - a python twitter client
 
how about keeping only 4 icons on the left, and an options menu. Keep tweets, replies, messages and all the other in a more button.

then in portrait mode, keep 4 at the bottom?

again, just a random suggestion. pardon any grammar mistakes, i am high. love the app man

dwould 2010-06-09 19:47

Re: witter - a python twitter client
 
Quote:

Originally Posted by markusm (Post 706859)
If you would add the "More" options that appear when you hit the "+" in the end of the message list - you would gain a free spot for a button to toggle the text box. Hiding the text box would give you the same amount of screen space as fullscreen does now meaning you might even drop the fullscreen button as well. Thus the two right most buttons would be "New tweet" and "Refresh".

How would I add the more buttons to the bottom of the message list?
Quote:

Originally Posted by markusm (Post 706859)
This would work even better if you moved the main buttons to the bottom of the screen and the text box would open above it. The buttons would be closer to the thumbs and the top and bottom areas of the screen would be balanced. And if you would display the text box automatically when the user starts typing.

Examples included.

I suppose I could capture keypresses to raise the the input field. and hide on scrolling, but that would mean needing to put refresh somewhere.
Not sure about icons along the bottom

In any case at the moment I'm trying to stabilise the code to push a new update into extras, so I don't want to push any big changes for the moment.

biggzy 2010-06-09 20:32

Re: witter - a python twitter client
 
1 Attachment(s)
Hi dwould, here are the fixed user history icons for the touch theme.

http://img80.imageshack.us/img80/399...0060921362.png

Attachment 10838

Regards,
Biggzy.

markusm 2010-06-10 07:32

Re: witter - a python twitter client
 
Quote:

Originally Posted by dwould (Post 707734)
How would I add the more buttons to the bottom of the message list?

Technically I have no idea - I'm a UI designer - not a programmer. But that's where they 'belong' ;)

Quote:

Originally Posted by dwould (Post 707734)
I suppose I could capture keypresses to raise the the input field. and hide on scrolling, but that would mean needing to put refresh somewhere.
Not sure about icons along the bottom

If you checkout the pics that I made there is a 'refresh' button on the right side of the toolbar. As I said - moving the 'more' options to the end of the messagelist and eliminating the need for fullscreen frees up two buttons. In their place would be the text box toggle ('new tweet') and refresh.

If you get a chance make a private test with the icons on the bottom. You'll see that it's very handy - especially when you've got the keyboard open. Also if you were to remove the button graphics and replace them with only icons this would give skin makers even more possibilities.

But as you said stabilizing the code is key. Witter is already a remarkable piece of work especially while it's free. I'm just hoping that somewhere along the line there will be time to add some visual tweaks here and there to polish it it up ;)


All times are GMT. The time now is 12:13.

vBulletin® Version 3.8.8