Google Calendar Screenlet

Conky

Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net

2
6 .5
Description:

Adds Google Calendar events on your desktop. Supports any amount of different calendars, updates automatically and has many configuration options. Themeable and lightweight.

EASY INSTALL FOR UBUNTU

1. If Screenlets PPA is not already enabled on your system, either from software sources manager or terminal add ppa:screenlets-dev/ppa to the list of software sources (see http://www.screenlets.org/index.php/Download for help).

2. Refresh package list and install googlecalendar-screenlet from your favourite package manager or by clicking automatic installation link provided below.

If you don't use Screenlets PPA you have to manually install python-gdata package 2.0.10 or later (see http://code.google.com/p/gcalscreenlet/wiki/Installation for further instructions).

MORE ABOUT THE SCREENLET

Notice, that you can import basically any local or remote ICS calendar through your Google account. Since calendars are parsed by Google Data API, the representation of data should be highly accurate.

You can help to translate the Screenlet to your language at https://translations.launchpad.net/indiv-screenlets/trunk/+pots/googlecalendar-screenlet/.

You can submit fixes or enhancements for the Screenlet at https://launchpad.net/~indiv-screenlets-dev.

Please feel free to submit any new themes for the screenlet!
Last changelog:

9 years ago

0.4.9 Easy install from PPA etc

* Added gCal to the new official Screenlets PPA
* Added DIY overkill for customizing event list

0.4.8 Enhancement

* Custom time formatting

0.4.7 Themework

* Cleaned up the themes
* Added Ambiance theme by Denis Å andor

0.4.5 Improvements

* Font options fixed in spite of Screenlets framework bugs
* Added configurable labels for tomorrow/day after tomorrow
* Supplied example theme under name "Childish" (use with caution, because it overrides your precious font settings for the screenlet)

0.4.2 Bugfixes

* "Today" string will be updated immediately

0.4.1 Bugfixes

* Updating will survive internet connection failures
* Long lasting events from previous days not displayed
* Some more error feedback for users with problems

0.4.0 First release.

* Errors seem to be fixed.
* Works reasonably well.

darkparanor

9 years ago

Hello,
great screenlet everything works without problems.
One question:
Does it possible to add after the weekday name the date in format %d/%m/Y ?

I cannot understand if the prefix/suffix values has a role in it and what they means, It seems that works only /b.

Any help?

Thanks

Report

C

boamaod

9 years ago

I added weekday formatting to the version 0.4.13. It is available at the Individual Screenlets Bazaar repository now and will become available on Screenlets PPA during next 24h. If you have installed your GoogleCalendar from PPA, you should get the option to set weekday format by a normal update soon (under DIY overkill, third field).

I'm afraid there are no instructions for the DIY overkill. It's meant for users who understand basics of text formatting with Pango (it's like HTML, but only using basic tags) and tabs and are willing to try things out themselves or take a look at the source code to figure things out. If you have a concrete question, maybe I'll have an answer for you...

Report

Anduu

9 years ago

Been using the screenlets for quite some time now...love it!

I have started testing Ubuntu Natty 11.04 and they have begun the transition to python 2.7

Since then the screenlet fails with this error:

Traceback (most recent call last):
File "/home/anduu/.screenlets/GoogleCalendar/GoogleCalendarScreenlet.py", line 1449, in <module>
screenlets.session.create_session(GoogleCalendarScreenlet, threading=True)
File "/usr/lib/pymodules/python2.7/screenlets/session.py", line 472, in create_session
session.start()
File "/usr/lib/pymodules/python2.7/screenlets/session.py", line 254, in start
sl.finish_loading()
File "/usr/lib/pymodules/python2.7/screenlets/__init__.py", line 1247, in finish_loading
self.on_init()
File "/home/anduu/.screenlets/GoogleCalendar/GoogleCalendarScreenlet.py", line 556, in on_init
self.calculateWindow()
File "/home/anduu/.screenlets/GoogleCalendar/GoogleCalendarScreenlet.py", line 899, in calculateWindow
self.__events_area.set_size_request(self.eventsWidth * self.scale, self.eventsHeight * self.scale)
TypeError: integer argument expected, got float


I am far from an expert so this may have nothing to do with python at all but perhaps it could get looked into?

Thanks!

Report

Anduu

9 years ago

Oops sorry...dang refresh button :/

Report

twa022

9 years ago

I fixed it with the following patch

--- GoogleCalendar-old/GoogleCalendarScreenlet.py 2010-11-27 06:35:06.000000000 -0500
+++ GoogleCalendar/GoogleCalendarScreenlet.py 2010-12-20 21:39:51.098375189 -0500

@@ -896,9 +896,9 @@
# events pane tooltip area
if (self.showEvents and not self.autoHide) or (self.showEvents and self.autoHide and self.eventsFound):
if self.__events_area:
- self.__events_area.set_size_request(self.eventsWidth * self.scale, self.eventsHeight * self.scale)
+ self.__events_area.set_size_request(int (self.eventsWidth * self.scale), int (self.eventsHeight * self.scale))
if self.__all_area:
- self.__all_area.move(self.__events_area, self.xpos() * self.scale, self.padding * self.scale)
+ self.__all_area.move(self.__events_area, int (self.xpos() * self.scale), int (self.padding * self.scale))
self.__events_area.set_tooltip_text(self.scroll_tooltip)
self.window.show_all()
else:

Report

C

boamaod

9 years ago

Thank you for the patch! Although I haven't tested it with Natty yet (alpha doesn't run on my system for some reason), I added this seemingly harmless patch to http://bazaar.launchpad.net/~indiv-screenlets-dev/indiv-screenlets/trunk/revision/579, updated packages should be available on PPA in next 24h.

Everybody is welcome to implement this kind of straightforward patches at https://launchpad.net/~indiv-screenlets-dev without any previous discussion.

Report

Anduu

9 years ago

Cool beans!

I'll keep an eye out for the update.

Any chance we will see a Natty PPA any time soon?

Report

C

boamaod

9 years ago

Since I have no way of knowing it myself, does the rest of Screenlets 0.1.3 development version seem to work fine on Natty? If it does, it would be meaningful to make a new source release for the purpose...

Report

C

boamaod

9 years ago

From now on, Natty packages are automatically generated. Except there are no additional packages (like python-gdata etc) for Natty, only the Screenlets themselves. If somebody cares to generate also the dependencies for various Screenlets, I'd be happy to copy these to the PPA.

Report

Anduu

9 years ago

Been using the screenlets for quite some time now...love it!

I have started testing Ubuntu Natty 11.04 and they have begun the transition to python 2.7

Since then the screenlet fails with this error:

Traceback (most recent call last):
File "/home/anduu/.screenlets/GoogleCalendar/GoogleCalendarScreenlet.py", line 1449, in <module>
screenlets.session.create_session(GoogleCalendarScreenlet, threading=True)
File "/usr/lib/pymodules/python2.7/screenlets/session.py", line 472, in create_session
session.start()
File "/usr/lib/pymodules/python2.7/screenlets/session.py", line 254, in start
sl.finish_loading()
File "/usr/lib/pymodules/python2.7/screenlets/__init__.py", line 1247, in finish_loading
self.on_init()
File "/home/anduu/.screenlets/GoogleCalendar/GoogleCalendarScreenlet.py", line 556, in on_init
self.calculateWindow()
File "/home/anduu/.screenlets/GoogleCalendar/GoogleCalendarScreenlet.py", line 899, in calculateWindow
self.__events_area.set_size_request(self.eventsWidth * self.scale, self.eventsHeight * self.scale)
TypeError: integer argument expected, got float


I am far from an expert so this may have nothing to do with python at all but perhaps it could get looked into?

Thanks!

Report

C

boamaod

9 years ago

If removing __notifier.notify lines from GCalScreenlet.py does not remove the notifications during the program session, then it totally beats me.

Report

3

clockworktri

9 years ago

So, if I remove "self.__notifier.notify("Invalid login, check username and password.")" the balloon does go away, but my Gcal also disappears. What happens normally is the notifier balloon keeps popping up, and my Gcal goes from "not connected to internet" to nothing there at all. So when I took out the notifier line, the balloon goes away, but my Gcal still disappears. If I then refresh all screenlets, it refreshes as normal, and my Gcal appears again. But I still can't get it to just load from start up for some reason. Yet as long as I start it after I am successfully connected to the internet, it loads ok.
(Should I try removing all of "except Exception: self.__notifier.notify("Invalid login, check username and password.")return False"? To get around Gcal disappearing, is there a command I could add in place of the notify line that would tell it to keep reloading or refreshing until it works? If I could get it to do that, I could use the autostart.)

One other question, if you have the time/desire. Is there something I can add to the py to make all-day events appear flush to the bullet rather than after a blank space where the time normally is? Would there be a simple way to tell it to do this if all-day or if no time? Along the same vein, is there a way to make all-day events italic?

Thanks!

Report

C

boamaod

9 years ago

Hey, you can get the version with the updates you want from: http://code.google.com/p/gcalscreenlet/downloads/list

I didn't update the version here yet and I want to wait with that a bit.

If you want to replace notify lines, you should replace them with "pass" (without quotes), otherwise there will be syntax error I suppose.

Please, tell me how does the new version satisfy your needs. I also changed notification mechanism a bit, could you please give feedback also on this.

Report

3

clockworktri

9 years ago

Thank You! I love the DIY Overkill!

I really like having control over the appearance of screenlets, since I have to stare at them all the time. And if I don't like how it looks, why would I use it, right?

You are awesome for giving your users so much control over your screenlet! There is pretty much nothing I can't change to my liking now, so I'm very satisfied. (The only thing I can possibly think of is the ability to change the distance between the lines. But I don't even know if this is possible. And it's nice but by no means necessary. (it would only affect which fonts a person could use).)

Anyway, it's great! And I replaced the line with "pass" like you said. So far I still can't use the autostart, but whatever! It's still a great screenlet!!!

Report

3

clockworktri

9 years ago

So, if I remove "self.__notifier.notify("Invalid login, check username and password.")" the balloon does go away, but my Gcal also disappears. What happens normally is the notifier balloon keeps popping up, and my Gcal goes from "not connected to internet" to nothing there at all. So when I took out the notifier line, the balloon goes away, but my Gcal still disappears. If I then refresh all screenlets, it refreshes as normal, and my Gcal appears again. But I still can't get it to just load from start up for some reason. Yet as long as I start it after I am successfully connected to the internet, it loads ok.
(Should I try removing all of "except Exception: self.__notifier.notify("Invalid login, check username and password.")return False"? To get around Gcal disappearing, is there a command I could add in place of the notify line that would tell it to keep reloading or refreshing until it works? If I could get it to do that, I could use the autostart.)

One other question, if you have the time/desire. Is there something I can add to the py to make all-day events appear flush to the bullet rather than after a blank space where the time normally is? Would there be a simple way to tell it to do this if all-day or if no time? Along the same vein, is there a way to make all-day events italic?

Thanks!

Report

3

clockworktri

9 years ago

I didn't mean to post this twice... is there a way to delete the other one?

Report

3

clockworktri

9 years ago

well, there's one more thing I would really like to fix. I have gcal on autostart, but when it connects to the internet, a notify balloon pop up that says 'Gcal - invalid user name or password.' It's not an invalid username or password, and usually a little bit later it succeeds in connecting. But the notify balloon just keeps popping up. as soon as one dissapears another pops up, and it does this even after gcal has successfully logged in and shown my calendar.

how can I get this to stop? it is very very annoying, and so far I've had to open up screenlets and fiddle with removing and adding gcal until it stops (which really defeats the point of having auto-startup).

can I just remove gcal from my notify-daemon? how?

Report

C

boamaod

9 years ago

That's strange, I haven't noticed this kind of behaviour and I couldn't reproduce the situation. Even the message I get for wrong username is "Invalid login, check username and password."

But if you want to get rid of the message, you can open ~/.screenlets/GCal/GCalScreenlet.py on line 1046:

except Exception:
self.__notifier.notify("Invalid login, check username and password.")
return False

And remove the line which has the function for displaying this message. You can remove other notifications too, just search for "__notifier.notify".

Actually I had an issue with notifiers once, but then I carefully designed the notifying system not to be annoying. I cannot imagine, what is your situation. Do you have a good link to Internet? Does Google calendar on the Web generally work fine?

If everybody has the same problem, I can of course remove the notifier from the central package... So give me feedback!

Report

3

clockworktri

9 years ago

well, i removed the lines you suggested, but the alerts kept popping up and i couldn't get them to stop so I restarted my computer, but now gcal won't launch at all. my other screenlets launch fine, so I know it's not my screenlet manager. I will try putting the lines back in and see if the screenlet will launch then.

one other thing: the times it shows are way off. stuff set for 9:30am show up 4:30pm (or 16:30 in 24 hr time). but I know my google calendar is set to the right time. Do you know why it could be doing this?

Report

C

boamaod

9 years ago

Are you completely sure that you have the latest version installed correctly? Maybe you should remove completly and then reinstall. I have nothing of the problems you describe. GCal had problem with time zones in the beginning, but I managed to fix that. I'm not in UTC either and everything works out fine. I'm afrain I cannot help you much further with that.

If you are on Debian/Ubuntu, maybe it would be worth to check out http://www.screenlets.org/index.php/Screenlets_Stayinalive, but I'm not sure it helps anything with that. However, it should at least remove the GNOME keyring problem if you for some reason haven't correctly applied the patch suggested somewhere above.

Report

3

clockworktri

9 years ago

I installed the stayinalive program and have worked around the notify popups.

but the time is still off. I definitely have the newest version. I have tried deleting and reinstalling a few times. I tried installing old versions. but the time is still shows up +7 hrs.

is there some way I can play with this? is there somewhere in the .py i should be looking, or some way to code it to subtract 7 hrs?

Report

C

boamaod

9 years ago

How did you managed to get past the notify problem?

About 7 hrs it's getting complicated. Is you time only displayed 7 hrs later or the events that have not yet occurred are omitted? The best thing to do, is to run GCal from command line "python ~/.screenlets/GCal/GCalScreenlet.py" and see how are the events displayed in the terminal. You can post the relevant output here (example calendar info and events info).

In terminal all the events received from Google are displayed with the beginning and end time (in the format 2010-11-01T02:30:00.000+09:00). Also time zone is displayed "TZ: ..." You should check if the data displayed in the terminal is all right. Especially pay attention to time zone data (this +09:00 is time zone addition (compared to UTC) for Asia/Tokyo. If something of this is incorrect for your case, then we can think of what to do.

Just subtracting 7 hours somewhere may break something else. Are you sure locale settings for your computer are OK? If you want to play the displayed time in python source, then you have to change strStartTime and strEndTime somewhere after lines 824-825, but as time formatting is a troublemaker in python, I cannot give a simple recipe here. Probably you have to convert the string to datetime objects, then change them, then convert back to time objects, add custom formatting and then display...

Was this OK before upgrading to the version with the custom time format?

Report

3

clockworktri

9 years ago

well, it turns out the notify issue doesn't have to do with the wireless not being connected yet. The balloon still keeps popping up, and won't stop until I close down gcal and restart it...

Report

3

clockworktri

9 years ago

I can avoid the notify problem by not having gcal on autostart. I have the tray icon up and I can just tell it to start gcal once my computer is connected to the internet. (I think the problem could possibly have to do with my computer connecting to my wireless router before the router has finished connecting to the internet. I haven't tested this yet, but do you think that may be the issue?) I would, of course, love to be able to have gcal on autostart, but if I can't stop the notify popups, I'll settle for this workaround.

as for the time: I GOT IT! When I ran gcal through the terminal like you said, I saw that for the two most populated calendars I have, the TZ was listed as UTC. I went back through my google calendar online and fixed it. (I honestly don't know when/how those time zones got changed, because they used to be right!) Sorry to make you go through all that! And thanks so much for the command line, I probably would have just kept missing it without seeing that. Damn, now I just feel stupid...

but YAY! I'm so happy now.

...though, if you have a suggestion about the autostart/notify issue, I would love to hear it.

You are awesome for helping me out with all this!!!

Report

C

boamaod

9 years ago

"have not yet occurred are omitted"

Sorry, this should be "have already happend are displayed".

Report

9 years ago

0.4.9 Easy install from PPA etc

* Added gCal to the new official Screenlets PPA
* Added DIY overkill for customizing event list

0.4.8 Enhancement

* Custom time formatting

0.4.7 Themework

* Cleaned up the themes
* Added Ambiance theme by Denis Å andor

0.4.5 Improvements

* Font options fixed in spite of Screenlets framework bugs
* Added configurable labels for tomorrow/day after tomorrow
* Supplied example theme under name "Childish" (use with caution, because it overrides your precious font settings for the screenlet)

0.4.2 Bugfixes

* "Today" string will be updated immediately

0.4.1 Bugfixes

* Updating will survive internet connection failures
* Long lasting events from previous days not displayed
* Some more error feedback for users with problems

0.4.0 First release.

* Errors seem to be fixed.
* Works reasonably well.

12345678910
25
product-maker janet Jun 27 2014 9 excellent
product-maker Sirion00 May 08 2012 3 bad
product-maker xulsolar Dec 29 2010 9 excellent
product-maker nickcloy Nov 29 2010 9 excellent
product-maker protti Oct 24 2010 9 excellent
product-maker jazzair312 Oct 17 2010 9 excellent
product-maker clockworktri Sep 27 2010 3 bad
product-maker Base: 4 x 5.0 Ratings
Be the first to comment
clockworktri
Oct 28 2010
jazzair312
Oct 17 2010
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.4.9
updated Nov 29 2010
added May 27 2010
downloads 24h
0
mediaviews 24h 0
pageviews 24h 8