Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
106 user(s) are online (94 user(s) are browsing Forums)

Members: 1
Guests: 105

emeck, more...

Support us!

Headlines

 
  Register To Post  

ICS files, Google Calendar and YAM: a "how-to" guide
Amigans Defender
Amigans Defender


See User information
Ever wondered how to import .ics (VCal) appointments into Google Calendar directly from YAM? Thought not. But this is how to do it anyway:

Download gcalcli

Set the script bit (+s) on gcalcli, and copy the file into SYS:System/Python/Scripts.

Download GData, dateutil (Python 2 version) and simplejson

These three all need extracting. From the Shell, go into each directory in turn and type the following:
python setup.py build
python setup.py install

dateutil needs a minor modification to setup.py, as it expects ./ to refer to the current directory. Replace the relevant lines with the following:

TOPDIR os.path.dirname(__file__) or ""
VERSION re.search('__version__ = "([^"]+)"',
                    
open(TOPDIR "dateutil/__init__.py").read()).group(1)


simplejson probably needs the SDK installed in order to build, as it actually compiles a module with gcc.

Download vobject

This uses setuptools, which gives an error that it can't find itself. I just installed it manually by extracting and copying the "vobject" dir into SYS:System/Python/lib/site-packages

That should be enough for gcalcli to work. You can test it by typing the following into the Shell:
gcalcli --user [yourgoogleusername] calm

All being well, this will give a little ASCII monthly calendar with your schedule on it.

Now open YAM. Go into Config, MIME section. Add a new MIME entry:
MIME type: text/calendar
File extensions: ics
Description: VCalendar (or whatever you want)
Viewer: gcalcli --user [yourgoogleusername] --pw [yourgooglepassword] import "%s"

Now double-clicking an ICS attachment in YAM will silently import it into your Google calendar.

NB: This does not appear to check for duplicates, which could be an issue.
NB2: user and pw have two dashes in front of them, not one.


Edited by Chris on 2013/2/3 19:22:31
Go to top
Re: ICS files, Google Calendar and YAM: a "how-to" guide
Just can't stay away
Just can't stay away


See User information
Quote:

Chris wrote:

Set the script bit (+s) on gcalcli, and copy the file into SYS:Python/Scripts.
You probably mean SYS:System/Python/Scripts, don't you?

Best regards,

Niels

Go to top
Re: ICS files, Google Calendar and YAM: a "how-to" guide
Amigans Defender
Amigans Defender


See User information
@nbache

In my defence, it was late. I've fixed it now (in both places), thanks.

Go to top
Re: ICS files, Google Calendar and YAM: a "how-to" guide
Just can't stay away
Just can't stay away


See User information
You're welcome

(And I missed the second one, even though it isn't late ).

Best regards,

Niels

Go to top
Re: ICS files, Google Calendar and YAM: a "how-to" guide
Home away from home
Home away from home


See User information
Or to more pernickety he means PYTHON:Scripts

PYTHON:Scripts is what is added to the path in S:Startup-Sequence.

This makes it easier for someone to move python should they choose to.


Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project