Giter Club home page Giter Club logo

gnome-shell-google-calendar's Introduction

                          gnome-shell-google-calendar

                         Google Calendar in GNOME Shell


    ~ What is it?

      A D-Bus service that fetches events from Google Calendar and makes them
      available for GNOME Shell to display.

    ~ What do I need?

      Python 2.6+ with the following modules:
        gtk
        dbus
        gdata
        iso8601

      Packages:
        gtk-engines
        gtk-engine-murrine
        gtk-engine-equinox

    ~ Usage

      Run the daemon like so:

        ./gnome-shell-google-calendar.py

      You will be prompted for your Google Calendar email the
      first time. A password is not neccesary, as gnome-online-accounts is used.

      Once logged in, events from all your calendars should appear in
      GNOME Shell's calendar.

      To exclude calendars, create a file named "excludes" in the directory
      you run "gnome-shell-google-calendar" from, or a file named
      ".gnome-shell-google-calendar-excludes" in your home directory.
      List the title of each calendar you want to exclude on a separate
      line.

gnome-shell-google-calendar's People

Contributors

jayr0d avatar joh avatar johnnyg avatar ralphbean avatar vintitres avatar wting avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gnome-shell-google-calendar's Issues

config.json file in home folder

I have added /home/simon/sources/gnome-shell-extensions/gnome-shell-google-calendar/gnome-shell-google-calendar.py [email protected] to init apps in Ubuntu.
But when I start the gnome session, it creates config.json file in my home folder. This file should be created in the folder where it resides the gnome-shell-google-calendar.py or in a hidden folder with the other settings of this app.

Error Loggin

./gnome-shell-google-calendar.py
Traceback (most recent call last):
File "./gnome-shell-google-calendar.py", line 11, in
import gdata.calendar.client
ImportError: No module named gdata.calendar.client

command line parameters

Hi,

maybe you can add a parameter to the programm, so that it is possible to pre-select the account you want to use.
This helpful when you want the script to be run in the autostart.

Now it loos like this:

test@test-laptop:~$ /home/test/gnome-shell-google-calendar/gnome-shell-google-calendar.py
Logging in as 'None'...
0. [email protected]
Please choose the Account: 0

In future it can be :
test@test-laptop:$ /home/test/gnome-shell-google-calendar/gnome-shell-google-calendar.py 0
or
test@test-laptop:
$ /home/test/gnome-shell-google-calendar/gnome-shell-google-calendar.py [email protected]
or
test@test-laptop:$ /home/test/gnome-shell-google-calendar/gnome-shell-google-calendar.py --account [email protected]
test@test-laptop:
$ /home/test/gnome-shell-google-calendar/gnome-shell-google-calendar.py -a [email protected]

This would be great :)

THX

Error on Fedora 16

I've installed all requirements via RPMs on Fedora 16. When I try to run the script, it asks me for email address and password, shows me the list of my calendars, then hangs for a bit, and then throws this error message:

Checking if actual month events need update...
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(_self.__args, *_self.__kwargs)
File "./gnome-shell-google-calendar.py", line 147, in scheduler
if self.months[get_month_key(datetime.now())].\

KeyError: (1319922000, 1322949599)

If I run it again, it logs in correctly, gets the list of calendars, and then after a while throws the same error.

Error logging in as 'None'

whenever I run this it fails as such:

./gnome-shell-google-calendar.py
Logging in as 'None'...
Error logging in as 'None'
'None' may not be a GNOME online account. A list of existing accounts is below.
If you do not see a list of accounts, then you first need to add one.
For more information, see http://library.gnome.org/users/gnome-help/stable/accounts.html
Please choose the Account: [[my gmail account]]
You have entered an invalid account number. Please enter an integer.
Logging in as 'None'...
Error logging in as 'None'
'None' may not be a GNOME online account. A list of existing accounts is below.
If you do not see a list of accounts, then you first need to add one.
For more information, see http://library.gnome.org/users/gnome-help/stable/accounts.html
Please choose the Account:

Fails to recognize online account under Gnome 3.8

I'm not sure what the problem is, since I've never used this script before, but I'm getting the following issue under Gnome 3.8:

Logging in as 'None'...
Error logging in as 'None'
'None' may not be a GNOME online account. A list of existing accounts is below.
If you do not see a list of accounts, then you first need to add one.
For more information, see http://library.gnome.org/users/gnome-help/stable/accounts.html
0. [email protected]
Please choose the Account: 0
You choose '[email protected]'
Logging in as '[email protected]'...
Error logging in as '[email protected]'
'[email protected]' may not be a GNOME online account. A list of existing accounts is below.
If you do not see a list of accounts, then you first need to add one.
For more information, see http://library.gnome.org/users/gnome-help/stable/accounts.html

After this, I get the same except that it tries and fails to log into my account instead of "None". I've tried specifying the account using "--account=", but it doesn't change anything. I've obviously already created an Online Account, otherwise it wouldn't be in the list. Maybe Gnome 3.8 changed something about Online Accounts?

Discard calendars

In case we have several calendars in the same Google calendar account, is there any way of selecting the calendars we want to integrate in the extension, or discard any of them?

Thanks.

Exception (ubuntu 11.04)

Following the instructions given here http://www.webupd8.org/2011/09/google-calendar-gnome-shell-integration.html I've executed:

sudo apt-get install git-core python-gtk2 python-dbus python-gdata python-iso8601 python-gnomekeyring

but no python-iso8601 seems to be available.

Given this I've lanched the script which responds with

~/gnome-shell-google-calendar> ./gnome-shell-google-calendar.py
Logging in as '[email protected]'...
[email protected]'s Calendar List:
(...)
Checking if actual month events need update...
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(_self.__args, *_self.__kwargs)
File "./gnome-shell-google-calendar.py", line 152, in scheduler
if self.months[get_month_key(datetime.now())].
KeyError: (1314482400, 1317506399)

AttributeError: 'When' object has no attribute 'start_time'

Exception in thread Thread-9:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(_self.__args, *_self.__kwargs)
File "./gnome-shell-google-calendar.py", line 39, in wrapper
ret = f(_args, *_kwargs)
File "./gnome-shell-google-calendar.py", line 359, in update_months_events
repr(when.start_time), repr(when.end_time))
AttributeError: 'When' object has no attribute 'start_time'

Redirection error

Hi,

I tried your program, but I get an error...
I can log, but I get the following return and nothing appears on the calendar


julien@MYCOMPUTER:~/gnome-shell-google-calendar$ ./gnome-shell-google-calendar.py
Logging in as '[email protected]'...
Traceback (most recent call last):
File "./gnome-shell-google-calendar.py", line 457, in
myserver = CalendarServer(client)
File "./gnome-shell-google-calendar.py", line 197, in init
self.calendars = self.get_calendars()
File "./gnome-shell-google-calendar.py", line 246, in get_calendars
feed = self.client.GetAllCalendarsFeed()
File "/usr/lib/pymodules/python2.7/gdata/calendar/client.py", line 177, in get_all_calendars_feed
*_kwargs)
File "/usr/lib/pymodules/python2.7/gdata/calendar/client.py", line 124, in get_calendars_feed
desired_class=desired_class, *_kwargs)
File "/usr/lib/pymodules/python2.7/gdata/client.py", line 635, in get_feed
*_kwargs)
File "/usr/lib/pymodules/python2.7/gdata/client.py", line 299, in request
*_kwargs)
File "/usr/lib/pymodules/python2.7/gdata/client.py", line 299, in request
*_kwargs)
File "/usr/lib/pymodules/python2.7/gdata/client.py", line 299, in request
*_kwargs)
File "/usr/lib/pymodules/python2.7/gdata/client.py", line 299, in request
**kwargs)
File "/usr/lib/pymodules/python2.7/gdata/client.py", line 305, in request
response, RedirectError)
gdata.client.RedirectError: Too many redirects from server: 302,

<TITLE>Moved Temporarily</TITLE>

Moved Temporarily

The document has moved here.

##

I'm not the only one encountering the issue : http://askubuntu.com/questions/116041/help-with-installing-gnome-shell-google-calendar-extension (see answer at the first comment)

I've no idea on what to do to make it work.

Thanks for your job, nice extension (hope I'll be able to run it)

Can't exclude calendars with "Ö" in name

Hello,

currently it's not possible to exclude calenders with an "Ö", presumably with any other umlaut mark too, in .gnome-shell-google-calendar-excludes. Any other calendar without "special characters" is excluded correctly, but not the one with the "Ö" in it.

Hoping for a quick solution and wishing you all the best!

Gnome Online Accounts

Maybe you can integrate the Gnome Online Accounts.
So that you login at that application and can select, that you want to integrate the calendar items in the time indicator...

ValueError: invalid literal for int() with base 10

Hello
I tried using this on Ubuntu Gnome remix 12.10 64-bit
and i got the following error:

Traceback (most recent call last):
File "./gnome-shell-google-calendar.py", line 468, in
account = oauth.oauth_prompt()
File "/home/nagel/gnome-shell-google-calendar/oauth.py", line 25, in oauth_prompt
email = accounts[int(raw_input('Please choose the Account: '))]
ValueError: invalid literal for int() with base 10: '[email protected]'

help please.

Removing the name of calendar that appears in events

Hi,
Is it possible to remove the name of my calendar, that appears within brackets after every event of my calendar. For me it's : (be) for example. I have no utility of that, and i'm using only one calendar and even if i add another one, The name of the event is enough for me.
Thanks for your help.

fails to run on linux mint 12

The first run fails on linux mint 12 due to /gnome-shell-google-calendar/keyring.py failing to get_credentials from gnomekeyring

 ./gnome-shell-google-calendar.py
Traceback (most recent call last):
  File "./gnome-shell-google-calendar.py", line 444, in <module>
    email, password = keyring.get_credentials()
  File "/home/dannyla/gnome-shell-google-calendar/keyring.py", line 34, in get_credentials
    item_id = get_item_id()
  File "/home/dannyla/gnome-shell-google-calendar/keyring.py", line 29, in get_item_id
    _display_name, _attrs, '', True)
gnomekeyring.NoSuchKeyringError

dbus.service:Unable to append

Hi,

I am running Ubuntu 11.10 with the gnome-shell. I tried your python script and I see the following error.
Logging in as 'john@*'...
***
@gmail.com's Calendar List:
John
Music Group
Helen
Remember The Milk

GetEvents(since=1317035760, until=1320664560, force_reload=True)
Getting events for: October 2011
Month not yet downloaded
Updating...
Update months events around: October 2011 | months_back 2 | months_ahead 12
Getting events from John ...
Getting events from Music Group ...
Getting events from Helen ...
Getting events from Remember The Milk ...
#Updated events since August 2011 until October 2012
#Returning 178 events...

ERROR:dbus.service:Unable to append ([('', 'CT-3506 (AM: MD)', '', False, 1319443200, 1319472000, {}), ('', 'Josh and ??', '', False, 1319115600, 1319119200, {}), ,,,,,
('', 'Tasks for 1/10', '', True, 1317423600, 1317510000, {})],) to message with signature a(sssbxxa{sv}): <type 'exceptions.TypeError'>: Expected a string or unicode object

My python is a bit rusty and I have no experience of the dbus API in python, so I am not sure where to look for the problem.

Thanks
John

error with keyring on debian wheezy

I have installed all of dependency but when I start instalation of extension this is error:

Traceback (most recent call last):
File "./gnome-shell-google-calendar.py", line 444, in
email, password = keyring.get_credentials()
File "/home/stefaca/PRGs/gnome-shell/gnome-shell-google-calendar/keyring.py", line 34, in get_credentials
item_id = get_item_id()
File "/home/stefaca/PRGs/gnome-shell/gnome-shell-google-calendar/keyring.py", line 29, in get_item_id
_display_name, _attrs, '', True)
gnomekeyring.NoSuchKeyringError

On my system I'm using unsafe keyring; can be told that I don't have keyring at all

Issue #30 does not fix issue #21.

When the redirect issue occurs, it retries, but seems to keep getting the same issue over and over. However, killing the program and running it again right away does not seem to get the redirect issue. Something more drastic might be necessary.

GNOME 3.2 support?

Hi,

I just installed this under Arch from AUR: https://aur.archlinux.org/packages.php?ID=49468
I installed 'python2-iso8601' too.

I'm getting: File "/usr/bin/gnome-shell-google-calendar.py", line 6, in
import gtk
ImportError: No module named gtk

Is it compatible with 3.2?
Is there a way to use the User Accounts feature to pull the necessary information?

Thank you.

high cpu usage of main application

Hi,
i recognized a very high CPU usage ( > 50% on one core) for the main python application without using it in any active way. Am i the only one experiencing that?

Cheers, Niklas

Timezone problem

I have a problem with times, every event in my calendar have two hours of delay, I think because I have UTC+2 time and is not applied.

Sorry for my English I hope you understand.

update failed after enabling 2-step verification

After enabling 2-step verification and granting gnome shell new access i can no longer update my calenders.

$ sh -c "python /opt/gnome-shell-google-calendar/gnome-shell-google-calendar.py --account=ACCOUNT_EMAIL"
Logging in as 'ACCOUNT_EMAIL...
Traceback (most recent call last):
  File "/opt/gnome-shell-google-calendar/gnome-shell-google-calendar.py", line 462, in <module>
    myserver = CalendarServer(client)
  File "/opt/gnome-shell-google-calendar/gnome-shell-google-calendar.py", line 198, in __init__
    self.calendars = self.get_calendars()
  File "/opt/gnome-shell-google-calendar/gnome-shell-google-calendar.py", line 247, in get_calendars
    feed = self.client.GetAllCalendarsFeed()
  File "/usr/lib/pymodules/python2.7/gdata/calendar/client.py", line 177, in get_all_calendars_feed
    **kwargs)
  File "/usr/lib/pymodules/python2.7/gdata/calendar/client.py", line 124, in get_calendars_feed
    desired_class=desired_class, **kwargs)
  File "/usr/lib/pymodules/python2.7/gdata/client.py", line 635, in get_feed
    **kwargs)
  File "/usr/lib/pymodules/python2.7/gdata/client.py", line 299, in request
    **kwargs)
  File "/usr/lib/pymodules/python2.7/gdata/client.py", line 299, in request
    **kwargs)
  File "/usr/lib/pymodules/python2.7/gdata/client.py", line 299, in request
    **kwargs)
  File "/usr/lib/pymodules/python2.7/gdata/client.py", line 299, in request
    **kwargs)
  File "/usr/lib/pymodules/python2.7/gdata/client.py", line 305, in request
    response, RedirectError)
gdata.client.RedirectError: Too many redirects from server: 302, <HTML>
<HEAD>
<TITLE>Moved Temporarily</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Moved Temporarily</H1>
The document has moved <A HREF="https://www.google.com/calendar/feeds/default/allcalendars/full?gsessionid=XXXXXXXXXXXXXXXXX">here</A>.
</BODY>
</HTML>

accounts login failure

i was using this method on all my installs and it wked just super!
on my 12.04 install with gnome-shell 3.3.90 i am getting login errors!

bb@Dream-On-Test:/gnome-shell-google-calendar$ ./gnome-shell-google-calendar.py ** WARNING : Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags' WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'Logging in as 'None'...0. [email protected] choose the Account: [email protected] (most recent call last): File "./gnome-shell-google-calendar.py", line 451, in account = oauth.oauth_prompt() File "/home/bb/gnome-shell-google-calendar/oauth.py", line 25, in oauth_prompt email = accounts[int(raw_input('Please choose the Account: '))]ValueError: invalid literal for int() with base 10: '[email protected]'bb@Dream-On-Test:/gnome-shell-google-calendar$ ./gnome-shell-google-calendar.py ** WARNING : Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags' WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'Logging in as 'None'...0. [email protected] choose the Account: [email protected] (most recent call last): File "./gnome-shell-google-calendar.py", line 451, in account = oauth.oauth_prompt() File "/home/bb/gnome-shell-google-calendar/oauth.py", line 25, in oauth_prompt email = accounts[int(raw_input('Please choose the Account: '))]ValueError: invalid literal for int() with base 10: '[email protected]'

the names have been changed to protect the innocent :-)

KeyError

Hi,
Very nice idea.
I would like to use your code, to synchronise my google calendar with the gnome calendar.
I'm using Ubuntu11.10, i don't know if it can help you.
Here's the error i have got :

./gnome-shell-google-calendar.py
Logging in as 'romainvv'...
[email protected]'s Calendar List:
[email protected]
Romain Van Vooren's Facebook Events
Checking if actual month events need update...
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 505, in run
self.__target(_self.__args, *_self.__kwargs)
File "./gnome-shell-google-calendar.py", line 152, in scheduler
if self.months[get_month_key(datetime.now())].
KeyError: (1316901600, 1320533999)

Problems with cyclic events

When I create cyclic event in my Google Calendar and then remove some of occurrences, the script shows the event even at days I removed it. It's quite annoying.

What with multiple calendars in google calendar?

A user in google calendars have possibility to create multiple calendars with different names. It is possible to synchronize all of ora selected of them? Can you possibly add this future?

You write in readme that "Once logged in, events from all your calendars should appear in GNOME Shell's calendar." but for me only the events from main callendar are fetched :(

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.