insanum / gcalcli Goto Github PK
View Code? Open in Web Editor NEWGoogle Calendar Command Line Interface
License: MIT License
Google Calendar Command Line Interface
License: MIT License
Currently gcalcli only does quick add and doesn't use the APIs createEvent function. Quick add doesn't allow users to add notes about an event.
Perhaps some syntax like:
gcalcli -chstv add [title] [start/when] [end]
where:
-c is --content
accepts a string for event content (--content="Some special notes about this event")
-h is --html
sets the contents mime-type as HTML
-s is --status
sets the event status as confirmed=1, tentative=0, or canceled=-1
-t is --transparency
can be set to 0 or 1 (--transparency=0)
-v is --visibility
can be set to 0 or 1 (--visibility=0)
https://developers.google.com/google-apps/calendar/v1/developers_guide_php#CreatingEvents
I would like to see some traction ;-) especially content.
It should be possible to set a custom locale maybe via:
--locale=en_EN.UTF-8
I hard coded my locale this way:
locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8')
Hi there, I can't find the config file. Also, how can I display my calendars without having to enter my username and password everytime?
gcalcli from 'master' seems to be popular! We've easily reached the daily 10K request limit. This quota is tied to the gcalcli client application key which is in turn tied to my Google account. There are two temporary solutions and one long term solution...
Short term:
Long term:
I don't like the idea of each user having to create their own client application key. This is a hassle and something you don't have to do for any other application using the various Google APIs.
Today I put in a request to Google to raise the daily quota to 1M requests per day. Hopefully this will be enough until we fully support caching. Btw, see the 'caching' branch for that work.
Traceback (most recent call last):
File "/mnt/raid/insanum/src/gcalcli/gcalcli", line 2427, in <module>
BowChickaWowWow()
File "/mnt/raid/insanum/src/gcalcli/gcalcli", line 2257, in BowChickaWowWow
useCache=useCache)
File "/mnt/raid/insanum/src/gcalcli/gcalcli", line 539, in __init__
self._GetCached()
File "/mnt/raid/insanum/src/gcalcli/gcalcli", line 623, in _GetCached
calList = self._CalService().calendarList().list().execute()
File "/usr/lib/python2.7/site-packages/oauth2client/util.py", line 120, in positional_wrapper
return wrapped(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/apiclient/http.py", line 678, in execute
raise HttpError(resp, content, uri=self.uri)
apiclient.errors.HttpError: <HttpError 403 when requesting https://www.googleapis.com/calendar/v3/users/me/calendarList?alt=json&key=AIzaSyA6qJCdEnUiOX7Y79Ro5eA2toInxwWCikc returned "Daily Limit Exceeded">
Hello,
I switch constantly from network-available environment to no-network-available-at-all environment and I would like to maintain on my screen my agenda, displayed with gcalcli and geektool.
How could I do that ?
Regards,
Yann
I downloaded gcalcli.py, tried 'gcalci --help' and it gives me:
File "/usr/bin/gcalcli", line 610
if event['s'].year >= 2038 or event['e'].year >= 2038:
^
SyntaxError: invalid syntax
I tried to comment that section out (I'll probably be dead by 2038 : D) and it gives me:
File "/usr/bin/gcalcli", line 674
if self.now < startDateTime or self.now > endDateTime:
^
SyntaxError: invalid syntax
Tried to uncomment line 674 and folowing if clause and get:
File "/usr/bin/gcalcli", line 686
if dayNum < 0:
^
SyntaxError: invalid syntax
so i immagine it's a problem with ";"
I've installed parsedatetime, am using archlinux (had to change the shebang to /usr/bin/env python2 since standard python is python3) and I have no gcalcli configuration
In the README, --24hr no longer works, must use --[no]military
Hi to all,
It shows:
BowChickaWowWow()
File "/usr/bin/gcalcli", line 1500, in BowChickaWowWow
gcal.AgendaQuery()
File "/usr/bin/gcalcli", line 965, in AgendaQuery
self._PrintEvents(start, eventList)
File "/usr/bin/gcalcli", line 757, in _PrintEvents
(tmpTimeStr, self._ValidTitle(event.title.text).strip()))
File "/usr/bin/gcalcli", line 242, in PrintMsg
sys.stdout.write(unicode(msg, 'UTF-8'))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 40: ordinal not in range(128)
When I try this:
gcalcli --24h --cals owner --nc agenda | tee -i ~/.gcal/gcal
or this:
gcalcli --24h --cals owner --nc agenda -> ~/.gcal/gcal
Good Morning,
Problem: the location does not show up on an agenda call, either in the normal or --tsv format. I am running version 2.3.
Example: I have added an event with a location. In the online Google calendar, I can see the location, but I don't get the location when I run the gcalcli command.
Thank you for your time and consideration.
fred@P3200:~/Documents/SearchesAndTempLogs$ gcalcli --config /home/fred/scripts/vars/fgcalclirc.txt --title 'This should be the Title' --where 'This should be the location' --when '02/01/2013 21:30' --duration 60 --descr 'This is the description' --reminder 240 add
New event added: https://www.google.com/calendar/event?eid=NzQ1MmJtcW9pa3Q3czJodnNyczR1NGN1NWMgY29udHJhY29ybmVyc0Bt
fred@P3200:~/Documents/SearchesAndTempLogs$ /usr/bin/gcalcli --detail-all --config /home/fred/scripts/vars/fgcalclirc.txt agenda
Fri Feb 01 9:30pm This should be the Title
Length: 1:00:00
Description:
-----------------------------------------------------------
This is the description
-----------------------------------------------------------
fred@P3200:~/Documents/SearchesAndTempLogs$ /usr/bin/gcalcli --detail-all --tsv --config /home/fred/scripts/vars/fgcalclirc.txt agenda
2013-02-01 21:30 22:30 This should be the Title This is the description
fred@P3200:/Documents/SearchesAndTempLogs$ /usr/bin/gcalcli --version --config /home/fred/scripts/vars/fgcalclirc.txt/Documents/SearchesAndTempLogs$
gcalcli v2.3 (Eric Davis)
fred@P3200:
The old bug #70 from the googlecode tracker is still around. The workaround still applies. Copied from the googlecode tracker (with updated line number):
My calendar setting seems to already be set to the proper time zone, "(GMT-5) Eastern" (although with the current state of daylight saving time it should be GMT-4).
It appears that the issue is that Google sends some events in local time and some events in UTC time, and gcalcli doesn't convert to local time. I fixed it by adding the following after the times are parsed on line 801:
event.s = event.s.astimezone(tzlocal())
event.e = event.e.astimezone(tzlocal())
This seems to work, but I don't know enough about the code to know if changes also need to be made elsewhere.
Hi,
first - thanx for Your great work! It is incredibly helpful tool.
Is it just me or is current master branch broken? I have problem with args list (agrs[0] is first line from my config file, not action as it should?).
Thank you!
Leszek
When the --detail-all or --detail-descr option is used for the 'agenda' command the resulting text can be downright ugly. I'd like to see the description text indented properly, word wrapped to a specified width (even wrapped text is indented), and for extra credit optionally boxed with ascii text (i.e. '-' and '|').
I received the following ICS invite
BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft Exchange Server 2010
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Romance Standard Time
BEGIN:STANDARD
DTSTART:16010101T030000
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
ORGANIZER;CN="Hansen, Sune":MAILTO:[email protected]
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=tnielse3@c
sc.com:MAILTO:[email protected]
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=Kent Micha
elsen ([email protected]):MAILTO:[email protected]
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="Costa, Jor
ge":MAILTO:[email protected]
ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN=Martyn K H
olden ([email protected]):MAILTO:[email protected]
DESCRIPTION;LANGUAGE=en-US:All,\n\nThis is a Placeholder for next week’s
TOI –\nWebex and Con Call details will follow.\n\n/Sune\n\n
SUMMARY;LANGUAGE=en-US:SnapCreator TOI
DTSTART;TZID=Romance Standard Time:20121024T113000
DTEND;TZID=Romance Standard Time:20121024T133000
UID:040000008200E00074C5B7101A82E00800000000E082784ADAADCD01000000000000000
01000000078F78DCB98419F4889FE6A4B96A6DAF2
CLASS:PUBLIC
PRIORITY:5
DTSTAMP:20121019T071532Z
TRANSP:OPAQUE
STATUS:CONFIRMED
SEQUENCE:0
LOCATION;LANGUAGE=en-US:Webex and Con Call
X-MICROSOFT-CDO-APPT-SEQUENCE:0
X-MICROSOFT-CDO-OWNERAPPTID:2104731612
X-MICROSOFT-CDO-BUSYSTATUS:TENTATIVE
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
X-MICROSOFT-CDO-IMPORTANCE:1
X-MICROSOFT-CDO-INSTTYPE:0
X-MICROSOFT-DISALLOW-COUNTER:FALSE
BEGIN:VALARM
ACTION:DISPLAY
DESCRIPTION:REMINDER
TRIGGER;RELATED=START:-PT15M
END:VALARM
END:VEVENT
END:VCALENDAR
which I imported into google calendar using
[535]$ cat /usr/share/applications/import-ICS-into-google-calendar.desktop
[Desktop Entry]
Name=Import ICS file into Google Calendar
GenericName=Import ICS file into Google Calendar
X-GNOME-FullName=Import ICS file into Google Calendar
Comment=Import ICS file into Google Calendar
Exec=gcalcli --cal "mycalendar" import %U
Icon=chromium-browser
Terminal=false
TryExec=chromium-browser
Type=Application
MimeType=application/x-calendar;x-scheme-handler/ics;
Categories=Network;
X-AppInstall-Keywords=calendar
it shows up with the:
All,
This is a Placeholder for next week’s TOI –
Webex and Con Call details will follow.
/Sune
but the atendee list is missing
It would be cool if you could (for the agenda) have a start time like "now" and an end time like "24h" or "tomorrow." Basically the same kind of functionality as seen in the Linux "date" command.
If someone wants to give it a shot... go for it! :-)
gcalcli needs to support importing events from ics/vcal files (i.e. from Exchange) that have previously been entered and are now updated, moved, or cancelled.
I haven't looked closely at the ICS spec but I think there is a UID field in there which is used for tracking individual meetings which can be tagged onto a Google Calendar event.
gcalcli should show multi-day events across each day for agenda, calw, and calm outputs.
If someone wants to give it a shot... go for it! :-)
The documentation implies that with the use of --cal you can specify a different calendar to add your event to. This does not work.
I've experimented with the syntax for nearly an hour with no success....
Hello,
I'm trying to use gcalcli with geektool (Mountain Lion, MBPr 2013).
With this command :
/usr/local/bin/gcalcli --nc calw 1
and with only one or all or a part of my calendars, it will only show between 6AM and 11AM, sometimes more.
I have no problem in a normal shell in OS X ( zsh)
Yann
Previous version (2.1, installed 28 Dec 2012) works, but current HEAD returns "Error: [gcalcli] is an invalid command" regardless of command. I know that's not very helpful; is there a way to get a more verbose error?
There is an exception that occurs in gcalcli when importing an ics file with a recurrence and also specifying a reminder time. I poked around, hacked some code, ran some tests and learned that you can't have a gdata When object in an event that contains a Recurrence object. The following error is returned by InsertEvent():
{'status': 400, 'body': 'Entry can not contain both gd:when and gd:recurrence elements.', 'reason': 'Bad Request'}
I then tried to perform and UpdateEvent() with a newly attached When/Reminder object and the same problem occurs. Also looked into added a Reminder object to a Recurrence and that isn't possible.
Anyways, I fixed the initial exception and now only allow reminders to be tacked on to ics events being inserted that don't have a Recurrence.
I'm attempting to authenticate with the --noauth_local_webserver switch. After I enter the verification code from Google, I receive the following traceback. I get that the issue is somehow related to SSL, but beyond that, I'm not sure what's going...
Are there additional dependencies which I'm missing?
Traceback (most recent call last):
File "gcalcli", line 2242, in
BowChickaWowWow()
File "gcalcli", line 2091, in BowChickaWowWow
configFolder=FLAGS.configFolder
File "gcalcli", line 461, in init
self._GetCached()
File "gcalcli", line 551, in _GetCached
calList = self._CalService().calendarList().list().execute()
File "gcalcli", line 502, in _CalService
http=self._GoogleAuth(),
File "gcalcli", line 490, in _GoogleAuth
storage)
File "/usr/local/lib/python2.7/site-packages/google_api_python_client-1.1-py2.7.egg/oauth2client/util.py", line 128, in positional_wrapper
return wrapped(_args, *_kwargs)
File "/usr/local/lib/python2.7/site-packages/google_api_python_client-1.1-py2.7.egg/oauth2client/tools.py", line 197, in run
credential = flow.step2_exchange(code, http=http)
File "/usr/local/lib/python2.7/site-packages/google_api_python_client-1.1-py2.7.egg/oauth2client/util.py", line 128, in positional_wrapper
return wrapped(_args, *_kwargs)
File "/usr/local/lib/python2.7/site-packages/google_api_python_client-1.1-py2.7.egg/oauth2client/client.py", line 1283, in step2_exchange
headers=headers)
File "/usr/local/lib/python2.7/site-packages/httplib2-0.8-py2.7.egg/httplib2/init.py", line 1570, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "/usr/local/lib/python2.7/site-packages/httplib2-0.8-py2.7.egg/httplib2/init.py", line 1317, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "/usr/local/lib/python2.7/site-packages/httplib2-0.8-py2.7.egg/httplib2/init.py", line 1252, in _conn_request
conn.connect()
File "/usr/local/lib/python2.7/site-packages/httplib2-0.8-py2.7.egg/httplib2/init.py", line 1021, in connect
self.disable_ssl_certificate_validation, self.ca_certs)
File "/usr/local/lib/python2.7/site-packages/httplib2-0.8-py2.7.egg/httplib2/init.py", line 80, in _ssl_wrap_socket
cert_reqs=cert_reqs, ca_certs=ca_certs)
File "/usr/local/lib/python2.7/ssl.py", line 381, in wrap_socket
ciphers=ciphers)
File "/usr/local/lib/python2.7/ssl.py", line 141, in init
ciphers)
ssl.SSLError: [Errno 185090050] _ssl.c:340: error:0B084002:x509 certificate routines:X509_load_cert_crl_file:system lib
I've modified gcalcli to use the colorama python library for terminal color support. This offers better cross-platform support for various OSs.
Please see the "colorama" branch and let me know if anyone has issues with this change.
http://pypi.python.org/pypi/colorama
Thanks!
Any chance you could tag a numbered release?
If 2.2 was meant to be released with the changes last July, I'd recommend using d4f058d .
git tag 2.2 d4f058dfe45b9bf1136b9269170b2b7ee92b094e
git push origin 2.2
And the for the stuff being worked on now on now, maybe some tags for snapshot/dev releases?
git tag 2.3a1
git push origin 2.3a1
Honestly I just want to update the MacPort's PortFile and they didn't seem to like my idea of using git commit hashes. But looking at Debian, Ubuntu, and other distros, many are still using the 2.1 release from Google Code.
Great concept guys, I love it!
Just installed gcalcli 2.1 using apt-get on Unbuntu 12.04, running on an x86 machine with a 3.0Ghz processor and 2GB of RAM. I set up the gcalclirc file with my username and password, it connects just fine.
I can add events - "gcalcli quick 'meet joe 7pm'", and they appear in Google Calendar and on my phone!
Awesome stuff, so simple, you guys rock!
But "gcalcli agenda", "gcalcli --cals=all agenda" and "gcalcli calw" all report "No events found" (or just show nothing but the dates in calw's case), even though I added said events through gcalcli, and they are displayed correctly on Google website and on my mobile.
I've tried manually specifying times "gcalcli agenda 2pm 9pm", but I still get "No events found".
Any idea what I'm doing wrong? :-(
I thought my firewall might be disrupting something, but one "sudo ufw disable" later I'm still getting "No events found".
Here's my calendar viewed from Google Calendar:
Here's the same calendar viewed from gcalcli:
mfag@mfag-tpad:~:$ gcalcli calw
+----------+----------+----------+----------+----------+----------+----------+
|Sunday |Monday |Tuesday |Wednesday |Thursday |Friday |Saturday |
+----------+----------+----------+----------+----------+----------+----------+
|17 Feb ** |18 Feb |19 Feb |20 Feb |21 Feb |22 Feb |23 Feb |
| | | | | | | |
| |10:00 Пм | |15:30 | |16:00 ЧГК |12:00 |
| | | |Codeforces| | |Личная |
| | | |Round | | |олимпиада |
| | | |#168 | | |школьников|
| | | |(Div. 2) | | | |
| | | | | | | |
| | | |15:30 | | | |
| | | |Codeforces| | | |
| | | |Round | | | |
| | | |#168 | | | |
| | | |(Div. 1) | | | |
+----------+----------+----------+----------+----------+----------+----------+
Note the incorrect start time for events "Codeforces Round #168 (Div. 2)" and "<...> (Div. 1)". I guess that the reason for this is that these events are imported from a public calendar, where they are presumably stored in UTC or some other timezone, but my home timezone is Europe/Riga (UTC+2 normally, UTC+3 during DST). Can this be fixed?
Hi.
I try add event by:
./gcalcli --cal 'my calendar' --title 'test' --descr '' --reminder 0 --where '' --when '03/08/2013 10:00' --duration 60 add
and I get an error:
File "./gcalcli", line 2242, in
BowChickaWowWow()
File "./gcalcli", line 2182, in BowChickaWowWow
if FLAGS.descr == None and FLAGS.prompt:
File "/usr/local/lib/python2.6/dist-packages/python_gflags-2.0-py2.6.egg/gflags.py", line 1059, in getattr
raise AttributeError(name)
AttributeError: descr
I originally wrote about it in #2, but the problem still exists:
When I use sys.stdout.write(msg)
, I get following error:
UnicodeEncodeError: 'ascii' codec can't encode characters in position 129-133: ordinal not in range(128)
Problem doesn't exist when using print msg,
.
(Error caused by event called ĄĄĄĘĘ
)
PS: I'm new to Python, so I have to ask - why is sys.stdout.write
better than print
?
Some calendars that I share with friends/family tend to use Emoji characters (see http://www.unicode.org/charts/PDF/U1F300.pdf). These are correctly displayed (albeit with a light background on an otherwise dark terminal for non-standard emojis) but overlapping with the next character, rendering the beginning of calendar entries illegible (see http://cl.ly/1T0j2Z2v2i0t3J203E3Y)
Is it somehow possible to strip these characters from the text that gcalcli displays?
It would be handy to able to delete and edit events.
Original ticket: https://code.google.com/p/gcalcli/issues/detail?id=83
Old version worked, but new version of gcalcli on opensuse 12.2 generates following error.
for any command (eg gcalcli list). I changes the set default for python to utf-8 but that did not help (that was necessary in previous version).
File "/home/wbmacleod/bin/gcalcli", line 2242, in
BowChickaWowWow()
File "/home/wbmacleod/bin/gcalcli", line 2091, in BowChickaWowWow
configFolder=FLAGS.configFolder
File "/home/wbmacleod/bin/gcalcli", line 461, in init
self._GetCached()
File "/home/wbmacleod/bin/gcalcli", line 591, in _GetCached
event['s'] = parse(event['start']['dateTime'])
File "/usr/lib/python2.7/site-packages/dateutil/parser.py", line 720, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "/usr/lib/python2.7/site-packages/dateutil/parser.py", line 310, in parse
raise ValueError("unknown string format")
ValueError: unknown string format
I was trying to figure out how to put gcalcli in a conky window on my desktop, but conky kept displaying only a small amount of the calendar and throwing errors. I discovered the default text buffer value conky uses, 256 bytes, was too small and needed increased to something on the order of 9000 via the text_buffer_size
option in my conkyrc. It could save others some time by making a quick note of this in the conky section of the README.
I put the line ${execi 300 gcalcli --nc agenda} into .conkyrc, and only the first line is shown, or actually only the date of the first line is shown: "Wed Jun 20".
A similar (probably related) problem occurs in the terminal when i try 'gcalcli --nc agenda > file', only the first date is streamed to the file, and i get a bunch of errors:
Traceback (most recent call last):
File "/usr/bin/gcalcli", line 1524, in
BowChickaWowWow()
File "/usr/bin/gcalcli", line 1447, in BowChickaWowWow
gcal.AgendaQuery()
File "/usr/bin/gcalcli", line 960, in AgendaQuery
self._PrintEvents(start, eventList)
File "/usr/bin/gcalcli", line 751, in _PrintEvents
('', self._ValidTitle(event.title.text).strip()))
File "/usr/bin/gcalcli", line 236, in PrintMsg
sys.stdout.write(cunicode(msg))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in position 10: ordinal not in range(128)
From: http://code.google.com/p/gcalcli/issues/detail?id=76
Patch:
*** gcalcli.back 2012-02-12 21:05:30.150085609 +0100
--- gcalcli 2012-02-12 21:06:00.890084273 +0100
***************
*** 1073,1086 ****
PrintErrMsg("Error: " + str(e) + "!\n")
sys.exit(1)
! while True:
! try:
! v = vobject.readComponents(f).next()
! except StopIteration:
! break
!
! ve = v.vevent
event = gdata.calendar.CalendarEventEntry()
if hasattr(ve, 'summary'):
--- 1073,1081 ----
PrintErrMsg("Error: " + str(e) + "!\n")
sys.exit(1)
! cal=vobject.readOne(f)
! for ve in cal.components():
event = gdata.calendar.CalendarEventEntry()
if hasattr(ve, 'summary'):
When running: 'gcalcli import CalendarEvent.ics' i get an error
some of the time (maybe 1/3 or 1/5 or 1/10 of the time), and the events are not imported. The other times i get no error, and the events are imported.
Version: gcalcli v2.2 (Eric Davis) - from debian testing
The CalendarEvent.ics file: https://gist.github.com/4279685
The error:
/x/d> gcalcli import CalendarEvent.ics
Traceback (most recent call last):
File "/usr/bin/gcalcli", line 1579, in
BowChickaWowWow()
File "/usr/bin/gcalcli", line 1568, in BowChickaWowWow
gcal.ImportICS(verbose, args[0])
File "/usr/bin/gcalcli", line 1188, in ImportICS
PrintErrMsg("Error: " + e["reason"] + "\n")
TypeError: sequence index must be integer, not 'str'
gcalcli --help
gives useful information but it would be really convenient to access this information as a man page.
Please add an option to always force https in .gcalclirc with something like:
https: true
Have you even tried to use it? You check for gcalcli and read gcalclirc:
if os.path.exists(os.path.expanduser("%s/gcalcli" % FLAGS.configFolder)):
if not FLAGS.includeRc:
tmpArgv = argv + ["--flagfile=~%s/gcalclirc" % FLAGS.configFolder, ]
else:
tmpArgv += ["--flagfile=~%s/gcalclirc" % FLAGS.configFolder, ]
And "~%s" should be "%s".
Also, it would be nice to check for a default configFolder without having to specify it (.config/gcalcli is a good default).
I'm trying to import a .ics file. The SUMMARY and DESCRIPTION fields contain commas. The event is imported successfully, but SUMMARY and DESCRIPTION are only parsed until the first comma.
This is my .ics file I try to import:
[beni@lilobster:~]$ cat Downloads/SBBVerbindung\ \(9\).ics
BEGIN:VCALENDAR
VERSION:2.0
PRODID:http://www.hacon.de
METHOD:PUBLISH
BEGIN:VTIMEZONE
TZID:Europe/Berlin
X-LIC-LOCATION:Europe/Berlin
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
UID:hafas1747939549
CLASS:PUBLIC
SUMMARY:Zürich, Kalkbreite -> Trimmis, Churweg
DTSTART;TZID=Europe/Berlin:20130208T191800
DTEND;TZID=Europe/Berlin:20130208T205800
DTSTAMP:20130208T121500Z
URL:http://fahrplan.sbb.ch/bin/query.exe/dn?S=Z%FCrich,%20Kalkbreite&Z=Trimmis,%20Churweg&date=08.02.13&time=19%3A18&
DESCRIPTION:Reise: Zürich, Kalkbreite nach Trimmis, Churweg\nDatum: 08.02.13\n-\nab 19:18 Zürich, Kalkbreite (Tram 2, Richtung: Zürich Tiefenbrunnen, Bahnhof)\nan 19:20 Zürich, Stauffacher \n\nab 19:22 Zürich, Stauffacher (Tram 14, Richtung: Zürich, Seebach)\nan 19:27 Zürich, Bahnhofplatz/HB \n\nab Zürich, Bahnhofplatz/HB (Fussweg)\nan Zürich HB \n\nab 19:37 Zürich HB - Gleis 7 (IC 587)\nan 20:41 Landquart - Gleis 2ABC\n\nab Landquart (Fussweg)\nan Landquart, Bahnhof \n\nab 20:45 Landquart, Bahnhof (BUS 3571)\nan 20:58 Trimmis, Churweg \n-\nDauer 1:40, Umsteigevorgänge 3\n\n\nFahrplan:\nhttp://fahrplan.sbb.ch/bin/query.exe/dn?S=Z%FCrich,%20Kalkbreite&Z=Trimmis,%20Churweg&date=08.02.13&time=19%3A18&\n \nÄnderungen vorbehalten. Alle Angaben, Anschlüsse und Einhaltung des Fahrplans ohne Gewähr.\nhttp://www.sbb.ch
END:VEVENT
END:VCALENDAR
And then the output from gcalcli:
[beni@lilobster:~]$ gcalcli import -v Downloads/SBBVerbindung\ \(9\).ics
Event........Zürich
Start........2013-02-08 19:18:00+01:00
End..........2013-02-08 20:58:00+01:00
Local Start..2013-02-08 19:18:00+01:00
Local End....2013-02-08 20:58:00+01:00
Description:
Reise: Zürich
[S]kip [i]mport [q]uit: q
As you can see, the "Event" is only "Zürich" but really should be "Zürich, Kalkbreite -> Trimmis, Churweg", and Description is only "Reise: Zürich" without the following stuff.
I'm using gcalcli master, rev 8262bf9.
Regards
Benedikt
In the Google Calendar web interface, it's possible to create events with different start and end time zones:
I would like to specify start- and end-timezones through gcalcli. For example. the 'add' option could take '--starttime' and '--endtime' parameters with a zone specifier (e.g. "-0400", or "UTC").
Regards
Benedikt
python keyring1 provides a interface for multiple password manager such as OSXKeychain,KDEKWallet or GnomeKeyring.
I wrote a small patch for gcalcli which support usage of python-keyring
--- gcalcli 2012-12-12 12:52:23.000000000 +0100
+++ gcalcli 2012-12-12 12:32:53.000000000 +0100
@@ -1379,7 +1379,15 @@
try:
if pwd == None:
- pwd = getpass.getpass("Password: ")
+ try:
+ import keyring
+ pwd = keyring.get_password('www.google.com/calendar', usr)
+ except ImportError:
+ PrintErrMsg("keyring library not found")
+ if pwd == None:
+ pwd = getpass.getpass("Password: ")
+ # TODO check password?
+ keyring.set_password('www.google.com/calendar', usr, pwd)
except Exception, e:
PrintErrMsg("Error: " + str(e) + "!\n")
sys.exit(1)
Hi,
I updated to the latest gcalcli version. Now I have to log into my google account in the browser, and select Allow access. But then the browser hangs indefinitely saying Waiting for localhost...
I've tried using different browsers, and I've tried googling for a solution, but I'm totally stuck. I'm sure I'm missing something obvious.
Thanks,
Michael
Hello
After switching from LinuxMint to LinuxMint Debian Edition I've got a problem with gcalcli.
After little investigation I've founded cause (copied below).
I'll be much appreciated for any help
Best regards to all.
My error:
Conky: desktop window (10000a5) is subwindow of root window (be)
Conky: window type - override
Conky: drawing to created window (0x2400001)
Conky: drawing to double buffer
Traceback (most recent call last):
File "/usr/bin/gcalcli", line 1529, in
BowChickaWowWow()
File "/usr/bin/gcalcli", line 1474, in BowChickaWowWow
gcal.CalQuery(args[0], count=int(args[1]))
File "/usr/bin/gcalcli", line 1007, in CalQuery
self._GraphEvents(cmd, start, count, eventList)
File "/usr/bin/gcalcli", line 692, in _GraphEvents
PrintMsg(CLR_NRM(), line + "\n")
File "/usr/bin/gcalcli", line 232, in PrintMsg
sys.stdout.write(msg)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0144' in position 95: ordinal not in range(128)
I assume currently gcalcli parses ICS/VCAL files locally then imports them into the Google Calender account? It would be great to have a feature to just output the converted ICS/VCAL information and exit, without logging into the Google account (which takes a few seconds).
I'd like to use this feature for better handling viewing ICS attachment in Mutt. Currently I use the following in my mailcap file:
text/calendar; echo q | PYTHONIOENCODING=utf-8 gcalcli import -v %s; copiousoutput;
It works great, but it's just slow. I know there are other scripts available I could use to do this, but it would be good to have this feature in gcalcli, since that's what I'm ultimately using to import the ICS file into my Calender, and if the code already exists to convert and display the ICS file in gcalcli, it makes sense to use that.
Thanks,
Michael
After issuing
$ gcalcli quick '06/09/12 6pm unix kurs (PVV)'
I receive a gdata.service.RequestError. And the entire stack trace is:
Traceback (most recent call last):
File "/usr/bin/gcalcli", line 1512, in
BowChickaWowWow()
File "/usr/bin/gcalcli", line 1487, in BowChickaWowWow
gcal.QuickAdd(unicode(args[1], locale.getpreferredencoding()))
File "/usr/bin/gcalcli", line 1011, in QuickAdd
self.gcal.InsertEvent(quickEvent, self._TargetCalendar())
File "/usr/lib/python2.7/site-packages/gdata/calendar/service.py", line 159, in InsertEvent
converter=gdata.calendar.CalendarEventEntryFromString)
File "/usr/lib/python2.7/site-packages/gdata/service.py", line 1236, in Post
media_source=media_source, converter=converter)
File "/usr/lib/python2.7/site-packages/gdata/service.py", line 1347, in PostOrPut
redirects_remaining - 1, media_source, converter=converter)
File "/usr/lib/python2.7/site-packages/gdata/service.py", line 1347, in PostOrPut
redirects_remaining - 1, media_source, converter=converter)
File "/usr/lib/python2.7/site-packages/gdata/service.py", line 1347, in PostOrPut
redirects_remaining - 1, media_source, converter=converter)
File "/usr/lib/python2.7/site-packages/gdata/service.py", line 1347, in PostOrPut
redirects_remaining - 1, media_source, converter=converter)
File "/usr/lib/python2.7/site-packages/gdata/service.py", line 1355, in PostOrPut
'body': result_body}
gdata.service.RequestError: {'status': 302, 'body': '\n\n<TITLE>Moved Temporarily</TITLE>\n\n\n
After immediately issing the same command, there is no error and the item is inserted in my calendar.
An other issue is that the date is wrong. The item is inserted for today, and not 6. september as I wrote it.
I've noticed yesterday that gcalcli doesnt like calendar names like:
It only wanted to work with all lowercase names, like "imacalendar".
Issue showed up on ubuntu 12.04 server
Can you reproduce this error or is it just me?
Events are listed in the default time zone of its respective calendar, so if you have multiple calendars in different time zones, it will not show the times correctly with respect to each other.
e.g.
3pm Event 1 (GMT-5)
6pm Event 2 (GMT+0)
Should show (with respect to GMT):
6pm Event 2
8pm Event 1
Rather than showing:
3pm Event 1
6pm Event 2
gcalcli can't add reminder when quick add event to calendar.
./gcalcli --user USERNAME --pw PASSWORD --reminder 1 quick 'test 121'
New event added: https://www.google.com/calendar/event?eid=cDRFwerfAzcGdFKmskdiVlisejmAoFZ0BnYWxpFSsrwraXkSDFrwerldi51YQ
Update error: Forbidden
Error: Event being modified contains too many reminders.
Update error: Forbidden
Error: Event being modified contains too many reminders.
Update error: Forbidden
Error: Event being modified contains too many reminders.
Update error: Forbidden
Error: Event being modified contains too many reminders.
Update error: Forbidden
Error: Event being modified contains too many reminders.
Update error: Forbidden
Error: Event being modified contains too many reminders.
Failed to update event!
Please fix it.
Thanks.
Hi,
I'm not sure what the intended behaviour is supposed to be, but when I specify a calender on the command line, it is added to the calendars already specified in the config file, rather than replacing them.
So it's not possible to only look at a specific calender, without removing any others from the config file. When I use the import option, I notice the event is imported to the first calender I've specified in the config file, and not the one I specify with --cal in the import command.
Thanks,
Michael
gcalcli needs to support caching by being able to download a specified range of events and use that cache for the various viewing mode commands used by gcalcli. This would speed up anything that uses gcalcli for visibility (i.e. scripts, conky, screen, tmux, reminders, etc) and still work in an offline mode.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.