Google Calendar Agenda (ownCloud too!)

Plasma 4 Extensions

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

4
Score 82.8%
Description:

This plasmoid shows a list of future tasks in Google Calendar (agenda). It's mostly inspired by Android widgets. It differs from other gcal plasmoids because it's not a frame displaying GCal Mobile. It supports arbitrary number of calendars and chances are that it also supports other online calendars as long as they export iCal.
This plasmoid is licensed under beerware license, http://en.wikipedia.org/wiki/Beerware

Written in Python

# Dependency
plasma-scriptengine-python, python-kde4, python-qt4 - all of them present in kubuntu out of the box
kdelibs5-dev - needs to be installed in older versions of Kubuntu. Try kdelibs5-plugins instead in newer versions, but it should be already installed.

# How to install
sudo apt-get install kdelibs5-plugins
wget -O - http://gdr.geekhood.net/gdrwpl/heavy/gcal-plasmoid-bootstrap.sh | sh -s

GUI installation of python plasmoids doesn't work at the moment.

# How to use with Google
http://www.youtube.com/watch?v=gLf5zpCgnWE

# How to use with ownCloud
http://gdr.geekhood.net/gdrwpl/gcal-agenda-owncloud.php
Last changelog:

7 years ago

0.2 - the plasmoid now respects locale settings (and has an icon, too)
0.21 - using KIO as network backend, caching ical files locally
0.22 - added a warning if kdewidgets.so is missing in the system
0.23 - recurring events now properly working (written by tcasawell), with lowered CPU usage. kdewidgets.so check removed because it was unreliable

einar77

9 years ago

urllib and friends are blocking, so you may freeze Plasma if they take too long to download the data (as plasmoids run in-process).

A much better solution would be to use KIO.storedGet and connect to the "result" slot to do whatever you need to do.

Report

C

GDR

9 years ago

I didn't know that plasmoids are all running in the same process, thanks. However I've tried googling for documentation or examples and couldn't find any that I can reuse in Python. Any tips?

Report

einar77

9 years ago

Here's a quick, proof-of-concept example (those are hypothetical class methods, not functions):

def download(self, url):

job_url = KUrl(url)
job = KIO.storedGet(job_url)
job.result.connect(self.handle_download)

def handle_download(self, job):

job_data = job.data()
# Do whatever you need with it...

You may also set up flags for not showing operations and so on. You may find examples of KIO usage in my own Danbooru Client: http://gitorious.org/danbooru-client/danbooru-client/blobs/master/danbooru/api.py

Report

C

GDR

9 years ago

There is one more thing that stops me from doing that - maybe you know the answer to this question: http://42.pl/u/2vsS

Report

einar77

9 years ago

I answered there. Hopefully it should be a step in the right direction.

Report

C

GDR

9 years ago

Thank you for both code sample and this answer - a version with KIO backend is now working :)

Report

9

exeroc

9 years ago

Very interesting application but it still doesn't work on my fedora 13... :-\ There is no error, but my calendar is not updated ...

Report

C

GDR

9 years ago

Could you enter the following command:
plasmoidviewer gcal-plasmoid

The plasmoid will open in a window. After a minute you should see some error message that I'd like to see too.

Report

9

exeroc

9 years ago

I did exactly what was described in the video :-\
File "/home/***/.kde/share/apps/plasma/plasmoids/gcal-plasmoid/contents/code/main.py", line 179, in timerEvent
self.fetchData()
File "/home/***/.kde/share/apps/plasma/plasmoids/gcal-plasmoid/contents/code/main.py", line 84, in fetchData
fical = urllib2.urlopen(url)
File "/usr/lib64/python2.6/urllib2.py", line 124, in urlopen
return _opener.open(url, data, timeout)
File "/usr/lib64/python2.6/urllib2.py", line 381, in open
protocol = req.get_type()
File "/usr/lib64/python2.6/urllib2.py", line 242, in get_type
raise ValueError, "unknown url type: %s" % self.__original
ValueError: unknown url type:


Report

C

GDR

9 years ago

Two things could have happened:
1) you have a space before or after the URL (I bet it's before URL)
2) you have added 2 URLs, one of them is empty

Both of these are possible because this plasmoid is still in version 0.1...

Report

7 years ago

0.2 - the plasmoid now respects locale settings (and has an icon, too)
0.21 - using KIO as network backend, caching ical files locally
0.22 - added a warning if kdewidgets.so is missing in the system
0.23 - recurring events now properly working (written by tcasawell), with lowered CPU usage. kdewidgets.so check removed because it was unreliable

12345678910
233
product-maker janet Apr 21 2014 9 excellent
product-maker arxus Feb 23 2012 9 excellent
product-maker zubi Feb 23 2012 9 excellent
product-maker KDesk Feb 07 2012 9 excellent
product-maker sgrayban Oct 04 2011 3 bad
product-maker tritemius Sep 02 2011 9 excellent
product-maker extraangry Aug 31 2011 9 excellent
product-maker tamra Aug 25 2011 9 excellent
product-maker sam13 Aug 23 2011 9 excellent
product-maker ruphy Aug 21 2011 9 excellent
product-maker jeehan Jul 24 2011 9 excellent
product-maker craigc05 Jul 16 2011 9 excellent
product-maker Genserowski Jul 02 2011 9 excellent
product-maker Faemino Jul 02 2011 9 excellent
product-maker watho May 31 2011 9 excellent
product-maker esdaniel May 25 2011 9 excellent
product-maker brdauria May 18 2011 9 excellent
product-maker Rickfer May 03 2011 9 excellent
product-maker kjetilk Apr 29 2011 9 excellent
product-maker abry Apr 22 2011 9 excellent
product-maker hermann57 Apr 16 2011 9 excellent
product-maker lcabrera Apr 08 2011 3 bad
product-maker madjar Mar 25 2011 9 excellent
product-maker Tribule Mar 20 2011 9 excellent
product-maker ekia Mar 18 2011 9 excellent
product-maker zokl Mar 18 2011 9 excellent
product-maker Murry Mar 09 2011 9 excellent
product-maker mosher Feb 16 2011 9 excellent
product-maker unapiedra Feb 15 2011 9 excellent
product-maker robten Feb 07 2011 9 excellent
product-maker MustangCSA Jan 28 2011 9 excellent
product-maker fyzix Jan 04 2011 9 excellent
product-maker vitoubien Nov 13 2010 9 excellent
product-maker maemofan Nov 13 2010 9 excellent
product-maker exeroc Oct 28 2010 9 excellent
product-maker Base: 4 x 5.0 Ratings
Genserowski
Jul 02 2011
baltolkien
Dec 12 2010
maemofan
Nov 13 2010
exeroc
Oct 28 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.23
updated Feb 28 2013
added Oct 24 2010
downloads 24h
0
mediaviews 24h 0
pageviews 24h 2