ArchLinux : Package support is present in the AUR. All my packages can be seen here: http://aur.archlinux.org/packages.php?SeB=m&K=kaivalagi
Ubuntu/Debian : All the script packages have now been copied into the Conky Companions PPA. Any package updates will be provided by the team through this new ppa. The ppa can be found here: https://launchpad.net/~conky-companions/+archive/ppa. To use this ppa first delete the old ppa files using this:
Then follow the modified first post instructions for the scripts
sudo rm /etc/apt/sources.list.d/m-buck* && sudo rm /etc/apt/sources.list.d/conkyhardcore*
Following on from my conkyForecast script, I've created another which may be useful to you conky users out there. conkyForecast.py can be found here -> http://ubuntuforums.org/showthread.php?p=5452132
I have put together this python script to output Google Calendar events from a users default calendar, for use in Conky. I know there are already other means to do this using the command line, however I wanted something I could modify a little more, and will no doubt do so as and when I or you come up with new ideas.
Some key features
- Utilises the Google Calendar API.
- Supports the use of a template to define the layout of each event output
- Supports regional datetime formats, by way of system locales
- Optional event limit so you can reduce the total output in Conky if you have lot's of events, events should be returned earliest first (needs testing)
There is a README with the install, I suggest you give it atleast a quick once over! It can be found in the installation folder, normally following the path of /usr/share/conky<scriptname>/
Hope some of you find it useful
Any suggestions, please speak up!
Method 1: Using apt
1) Add the repository to your OS install:
sudo add-apt-repository ppa:conky-companions/ppa
* Note if you are running 9.10 or below then refer to the PPA link at the end of this post for help on installing from the ppa, good guidance can be found on the launchpad site
2) Now that is done simply run the following to update your repo cache and install the script:
Method 2: Using deb file
sudo apt-get update && sudo apt-get install conkygooglecalendar
Run the .deb file available at the Conky Companions PPA site here: https://launchpad.net/~conky-compani.../ppa/+packages
Warning, this will not ensure you are kept up-to-date. Only method 1 will do that ;)
Method 3: Using tar.gz file
Extract all the contents of the tar.gz file to an appropriate folder, and edit the conkyGoogleCalendar script to point to the correct location where conkyGoogleCalendar.py is. The tar.gz file is available at the Conky Companions PPA site here: https://launchpad.net/~conky-compani.../ppa/+packages
Unless you are using a non-Debian based OS I don't suggest this. Users of Debian/Ubuntu flavour OS's should ideally use method 1.
Again will will not receive updates using this method. ONLY method 1 can do this for you ;) ;)
All further details on setup are orientated around the deb package based install, so may differ from what you choose your setup to be, if done using the tarball.
You can get the current help options at any time by running (change the path as necessary):
The usage is as follows:
Usage: conkyGoogleCalendar [options]
-h, --help show this help message and exit
-u USERNAME, --username=USERNAME
Username for login into Google Calendar, this will
normally be your gmail account
-p PASSWORD, --password=PASSWORD
Password to login with, if not set the username is
used to fetch a 'conky' password from the keyring
-r TEXT, --requestCalendarNames=TEXT
Define a list of calendars to request event data for,
calendar names should be separated by semi-colons ";".
For example --requestCalendarNames="cal1;cal2;other
cal" If not set all calendar data will be returned.
-d NUMBER, --daysahead=NUMBER
[default: 7] Define the number of days ahead you wish
to retrieve calendar entries for, starting from today.
-s DATE, --startdate=DATE
Define the start date to retrieve calendar events. In
the form '2007-12-01'
-e DATE, --enddate=DATE
Define the end date to retrieve calendar events, must
be supplied if --startdate supplied. In the form
-a, --allevents Retrieve all calendar events
-w TEXT, --wordsearch=TEXT
Define the text to search calendar entries with.
-l NUMBER, --limit=NUMBER
[default: 0] Define the maximum number of calendar
events to display, zero means no limit.
-t FILE, --template=FILE
Template file determining the format for each event.
Use the following placeholders: [title], [starttime],
[endtime], [completetime], [duration], [location],
[description], [who]. Ensure only one placeholder per
line, as the whole line is removed if no data for that
-f "DATEFORMAT", --dateformat="DATEFORMAT"
If used this overrides the default date formatting.
The values to use are standard formatting strings e.g.
Weekday=%a, Day=%d, Month=%m, Year=%y. For an output
like "Thu 15/10/2008" you would require
--dateformat="%a %d/%m/%y", to have no date you would
-F "TIMEFORMAT", --timeformat="TIMEFORMAT"
If used this overrides the default time formatting.
The values to use are standard formatting strings e.g.
Hours (12hr)=%l, Hours (24hr)=%H, Minutes=%M,
Seconds=%S, AM/PM=%P. For an output like "05:22 PM"
you would require --timeformat="%l:%M %P",
--timeformat="" is not supported, default locale
settings are used
-i NUMBER, --indent=NUMBER
[default: 0] Define the number of spaces to indent the
output (excludes template based output)
-m NUMBER, --maxwidth=NUMBER
[default: 40] Define the number of characters to
output per line
-n, --nowho Hides who is attending the events (excludes template
-c NUMBER, --connectiontimeout=NUMBER
[default: 30] Define the number of seconds before a
connection timeout can occur.
-v, --verbose Request verbose output, no a good idea when running
-V, --version Displays the version of the script.
--errorlogfile=FILE If a filepath is set, the script appends errors to the
--infologfile=FILE If a filepath is set, the script appends info to the
Conky has a default limitation of 128 bytes for any text output from a variable (such as execi). If you are creating large templates with more characters than the default buffer size can handle, the output will get truncated. If this happens you can override the default behaviour by setting as new buffer size at the top of your conkyrc file, as follows:
The Google calendar function can stop working for with a "GoogleCalendarEngine Initialisation:Unexpected error:Captcha Required" error message. This is something Google enforces and to overcome it simple authenticate yourself here: https://www.google.com/accounts/UnlockCaptcha
Locale and unicode support
If you receive something similar to this error "ERROR: writeOutput:Unexpected error:'ascii' codec can't decode byte 0xc3 in position 14: ordinal not in range(128)" it is because the script can't handle your locale settings for output.
To overcome this add the following above TEXT in your conkyrc:
Development history going forwards can be seen here https://code.launchpad.net/~conky-companions/+junk/conkygooglecalendar
All packages available from me can be found here: https://launchpad.net/~conky-companions/+archive/ppa