View previous topic :: View next topic |
Author |
Message |
GaMMa l33t
Joined: 23 Aug 2002 Posts: 684 Location: USA
|
Posted: Tue Aug 31, 2004 1:33 am Post subject: Openbox3: Gmail Checker Built into the Menu |
|
|
Me and syscrash2k have developed a menu entry that shows how many new mails you have in your Gmail account. Clicking on the entry opens up Gmail in your favorite web browser.
Screenshots:
Script in action!
Downloads:
gmail-openbox-0.0.3.1.py
ChangeLog:
0.0.3.1
This release autologs you into Gmail when you click the menu item. It was requested a while back and it's a neat feature. Enjoy!
0.0.3
This version caches login data so it only has to log in once, which allows the menu to be created MUCH faster. Thanks for follower for the majority of the code in this version. For this version and above you need to CVS version of libgmail.py from http://cvs.sourceforge.net/viewcvs.py/libgmail/libgmail/libgmail.py and the files in the normal libgmail release in addition to it.
Also make sure you delete the cache when changing the username/password.
0.0.2
This version shows message subjects in a submenu. Note it makes them read after opening the menu. You should stick with version 0.0.1 if you have a lot of messages in your inbox because it'll download them all which may take time. Also note, if you have a threaded topic in the inbox with a new message in the thread it's going to print all reply topics too.
0.0.1
Initial release.
FIXED: Fixed the int to str error.
NOTES:
Login failed can occur if you log in too much, simple log out of gmail, enter the security password and you're good to go. Comments appreciated.
You need to download libgmail and put it in the same folder as the script also. You can get it from http://libgmail.sf.net/
Don't forget to edit the script and hange your user/pass/browser config. _________________ Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide]
Last edited by GaMMa on Fri Sep 24, 2004 5:45 am; edited 18 times in total |
|
Back to top |
|
|
TheChuckster Tux's lil' helper
Joined: 18 Aug 2003 Posts: 91
|
Posted: Tue Aug 31, 2004 1:54 am Post subject: |
|
|
Sounds really cool, nice work! Any interest in doing a possible Fluxbox port? |
|
Back to top |
|
|
rush_ad l33t
Joined: 22 Jul 2004 Posts: 863 Location: New Jersey, USA
|
Posted: Tue Aug 31, 2004 2:42 am Post subject: |
|
|
nice, thanks, anyway to make gmail work with opera? |
|
Back to top |
|
|
rezza Guru
Joined: 09 Apr 2003 Posts: 434 Location: Edinburgh, UK
|
Posted: Tue Aug 31, 2004 6:36 am Post subject: |
|
|
Sounds excellent, GaMMa... I'm gonna have to get OB3 sorted out properly and give this a shot. _________________ screenshots
blog
Last edited by rezza on Tue Aug 31, 2004 12:29 pm; edited 1 time in total |
|
Back to top |
|
|
Zepp Veteran
Joined: 15 Mar 2004 Posts: 1246 Location: Ontario, Canada
|
Posted: Tue Aug 31, 2004 8:44 am Post subject: |
|
|
looking forward to it just started using ob |
|
Back to top |
|
|
Chaosite Guru
Joined: 13 Dec 2003 Posts: 540 Location: Right over here.
|
Posted: Tue Aug 31, 2004 2:05 pm Post subject: |
|
|
This looks great! |
|
Back to top |
|
|
aslocum Apprentice
Joined: 28 May 2004 Posts: 217 Location: Germany, Frankfurt
|
Posted: Tue Aug 31, 2004 5:45 pm Post subject: |
|
|
if you want beta testers...
<<--- _________________ Dell Latitude d610 1.6Ghz 1GB
gcc-4.0.3 2.6.15-no3
Reiser4 |
|
Back to top |
|
|
syscrash Guru
Joined: 14 Apr 2003 Posts: 541
|
|
Back to top |
|
|
GaMMa l33t
Joined: 23 Aug 2002 Posts: 684 Location: USA
|
Posted: Tue Aug 31, 2004 7:18 pm Post subject: |
|
|
There won't be a fluxbox port (done by us), I don't think fluxbox even supports features like this, although I never used it enough to find out. If someone wants to develope a port, feel free to send me a private message/email.
In reguards to the opera issue, all we can do is provide a link for you to click to open it in opera. The checker works reguardless of what browser you're using. _________________ Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide] |
|
Back to top |
|
|
solatis Apprentice
Joined: 06 Nov 2002 Posts: 214 Location: University of Twente, The Netherlands
|
Posted: Tue Aug 31, 2004 7:28 pm Post subject: |
|
|
GaMMa wrote: | In reguards to the opera issue, all we can do is provide a link for you to click to open it in opera. The checker works reguardless of what browser you're using. |
I think he means that GMail doesn't work under Opera... _________________ Grtz,
Leon Mergen
http://www.solatis.com/ |
|
Back to top |
|
|
GaMMa l33t
Joined: 23 Aug 2002 Posts: 684 Location: USA
|
Posted: Tue Aug 31, 2004 8:45 pm Post subject: |
|
|
Oh, well I can't fix that then. _________________ Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide] |
|
Back to top |
|
|
aslocum Apprentice
Joined: 28 May 2004 Posts: 217 Location: Germany, Frankfurt
|
Posted: Wed Sep 01, 2004 4:28 pm Post subject: |
|
|
just a little question...
i tried to move gmail to a submenu like this:
this is on top of the menu.xml
Code: |
<openbox_menu xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openbox.org/ file:///usr/share/openbox/menu.xsd">
<menu id="gmail" label="gmail" execute="~/.config/openbox/gmail-openbox.py"/>
<menu id="games-menu" label="games">
<item label="neverwinter nights">
<action name="Execute">
<execute>nwn</execute>
</action>
</item>
...
|
here comes the submenu:
Code: | <menu xmlns="http://openbox.org/" id="net-menu" label="net">
<item label="gftp">
<action name="Execute">
<execute>gftp</execute>
</action>
</item>
<item xmlns="http://openbox.org/" label="xchat2">
<action name="Execute">
<execute>xchat-2</execute>
</action>
</item>
<item xmlns="http://openbox.org/" label="azureus">
<action name="Execute">
<execute>azureus</execute>
</action>
</item>
<item xmlns="http://openbox.org/" label="amule">
<action name="Execute">
<execute>amule</execute>
</action>
</item>
<item label="gaim">
<action name="Execute">
<execute>gaim</execute>
</action>
</item>
<separator xmlns="http://openbox.org/"/>
<menu xmlns="http://openbox.org/" id="gmail"/>
</menu>
|
but that doesnt work... when i point at the gmail menu it stops a little time to check gmail (as normal) but then comes nothing... no message about new mail or no mail.
when i had the gmail in my root menu it works fine.. but im too dumb so that i touch it too often with my mouse and the little stop is annoying me
any help? thx ! _________________ Dell Latitude d610 1.6Ghz 1GB
gcc-4.0.3 2.6.15-no3
Reiser4 |
|
Back to top |
|
|
aslocum Apprentice
Joined: 28 May 2004 Posts: 217 Location: Germany, Frankfurt
|
Posted: Wed Sep 01, 2004 4:49 pm Post subject: |
|
|
strange.. after an ob restart it worked fine... nothing changed... and yes: i have reload the config _________________ Dell Latitude d610 1.6Ghz 1GB
gcc-4.0.3 2.6.15-no3
Reiser4 |
|
Back to top |
|
|
GaMMa l33t
Joined: 23 Aug 2002 Posts: 684 Location: USA
|
Posted: Wed Sep 01, 2004 5:20 pm Post subject: |
|
|
Yea pipemenus sometimes require restarts (or reloads) after normal (nonpipe) menu changes wierdness.
As for updates...
The login delay thing most likely won't be getting fixed. I tried making another similar script to fetch mail without logging in, but Gmail just yelled at me. I guess when the script closes the gmail session logs out. The only way to get rid of this problem is the creation of a daemon, and I'm not a fan of that method. So we'll have to see, I may be able to fix it. More updates coming soon, hopefully people will like the changes . _________________ Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide] |
|
Back to top |
|
|
allucid Veteran
Joined: 02 Nov 2002 Posts: 1314 Location: atlanta
|
Posted: Wed Sep 01, 2004 6:32 pm Post subject: |
|
|
works great! I can wait 2 seconds. |
|
Back to top |
|
|
allucid Veteran
Joined: 02 Nov 2002 Posts: 1314 Location: atlanta
|
Posted: Wed Sep 01, 2004 8:51 pm Post subject: |
|
|
oops spoke too soon:
Code: | WARNING:root:Live Javascript and constants file versions differ.
Traceback (most recent call last):
File "/home/allucid/.config/openbox/scripts/gmail-openbox.py", line 45, in ?
print " <item label=\"" + new_messages + " new messages.\">"
TypeError: cannot concatenate 'str' and 'int' objects
Entity: line 3: parser error : Premature end of data in tag openbox_pipe_menu line 2
^
(openbox:9987): Openbox-WARNING **: Invalid output from pipe-menu: /home/allucid/.config/openbox/scripts/gmail-openbox.py |
[edit] i don't do python but after a quick google i figured out how convert an int to a string. to fix the error change new_messages on line 45 to `new_messages`.
When you click on it and it opens a web browser (firefox in my case) is it possible to make it log in for you automagically? |
|
Back to top |
|
|
GaMMa l33t
Joined: 23 Aug 2002 Posts: 684 Location: USA
|
Posted: Thu Sep 02, 2004 12:10 am Post subject: |
|
|
I released 0.0.2, ChangeLog and info at the top. Also I fixed version 0.0.1. I don't want to take the first release down because people with large inboxes may have to wait a while to fetch messages or others may not like it because it's too complex .
I just have Gmail remember my login, I'll look into adding an autologin next release. It shold be possible, I just have to pass the right lines. Bug reports appreciated . _________________ Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide] |
|
Back to top |
|
|
zecora l33t
Joined: 17 Aug 2004 Posts: 627 Location: Minneapolis, MN
|
Posted: Thu Sep 02, 2004 12:49 am Post subject: |
|
|
what is gmail? |
|
Back to top |
|
|
allucid Veteran
Joined: 02 Nov 2002 Posts: 1314 Location: atlanta
|
Posted: Thu Sep 02, 2004 1:27 am Post subject: |
|
|
zecora wrote: | what is gmail? |
living under a rock? just kidding => gmail.google.com |
|
Back to top |
|
|
zecora l33t
Joined: 17 Aug 2004 Posts: 627 Location: Minneapolis, MN
|
Posted: Thu Sep 02, 2004 1:30 am Post subject: |
|
|
allucid wrote: | zecora wrote: | what is gmail? |
living under a rock? just kidding => gmail.google.com |
ok, man do i feel dumb.
can i get gmail? |
|
Back to top |
|
|
GaMMa l33t
Joined: 23 Aug 2002 Posts: 684 Location: USA
|
Posted: Thu Sep 02, 2004 1:45 am Post subject: |
|
|
Not turning this into an invite thread, but send me a PRIVATE MESSAGE with your name and email and I'll invite you. I've got 12 invites @_@. _________________ Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide] |
|
Back to top |
|
|
allucid Veteran
Joined: 02 Nov 2002 Posts: 1314 Location: atlanta
|
Posted: Thu Sep 02, 2004 1:46 am Post subject: |
|
|
zecora wrote: | can i get gmail? |
try here.
GaMMa wrote: | 0.0.1
Initial release.
FIXED: Fixed the int to str error.
|
I don't think so...
Code: | else:
print " <item label=\"" + new_messages + " new messages.\">" |
should be
Code: | else:
print " <item label=\"" + `new_messages` + " new messages.\">" |
I think that getUnreadMsgCount() returns an int. I looked at the library and it was all greek to me so I could be wrong.
[Edit] I tried the new version also (looked cool) but unfortunately it blew up in my face because the messages in my inbox were very long nested replies (mailing lists). Heh, I should stick with the first version. Cool idea, though. I would have never thought of doing this in the menu.
Last edited by allucid on Thu Sep 02, 2004 1:52 am; edited 2 times in total |
|
Back to top |
|
|
GaMMa l33t
Joined: 23 Aug 2002 Posts: 684 Location: USA
|
Posted: Thu Sep 02, 2004 1:49 am Post subject: |
|
|
Whoops uploaded the unfixed one! There we go.. I needed to change it to str(new_messages) . _________________ Ubuntu Linux Dapper Drake running Gnome-2.14.1
[Website | Screenshot | Portage Guide] |
|
Back to top |
|
|
nephros Advocate
Joined: 07 Feb 2003 Posts: 2139 Location: Graz, Austria (Europe - no kangaroos.)
|
Posted: Sun Sep 05, 2004 11:44 am Post subject: |
|
|
I know this is a stoopid question, but where do I put libgmail.py? _________________ Please put [SOLVED] in your topic if you are a moron. |
|
Back to top |
|
|
aslocum Apprentice
Joined: 28 May 2004 Posts: 217 Location: Germany, Frankfurt
|
Posted: Sun Sep 05, 2004 11:52 am Post subject: |
|
|
in the folder where you have the script _________________ Dell Latitude d610 1.6Ghz 1GB
gcc-4.0.3 2.6.15-no3
Reiser4 |
|
Back to top |
|
|
|