FYI, I tried to parse and include ${e.calendar} on my mac, it worked with that parser.
Can you share the output of a few lines of
powershell (C:/Users/adminuser/AppData/Local/Programs/Python/Python37-32/Scripts/gcalcli --nocolor agenda --details all --tsv --nodeclined)
Maybe on Windows the tab separated values are coming in a different order? (Unlikely, but I am having trouble coming up with plausible explanations). I’ll try to spin up my Windows laptop this weekend and check things out there too if we don’t figure out before then.
What would be needed to make it work? Or how can we make it work?
Using javascript would be great. It would probably make it less buggy and at the same time it even could become compatible with the mobile version as well.
Agreed that a plugin would be much better than this experience.
The OAuth token refresh / storage is what makes it unlikely for me to tackle. Based on past experience there’s far more work to make authentication work than there will be to parse the results and convert them to a daily agenda that would be Day Planner compatible.
There’s been talk in the #plugin-dev discord channel about this. I’ll keep an eye out and if someone tackles it in a way I can reuse, I’ll give it a try.
Okay, thank you for your answer and your help so far anyway.
Fingers crossed someone will have the time and courage to create a google calendar plugin or solve the OAuth token refresh/storage complexity!
Hi @muness . Thank you for your wonderful code and templater use for the google calendar! How can I update the template to remove the header in the output? Right now I’m getting the following:
I installed gcalcli on my Windows 10 machine to check. I don’t see a header row. What is the user function definition you’re using in your Templater configuration?
Here’s what I found to work for me:
powershell (C:/Users/munes/AppData/Local/Programs/Python/Python39/Scripts/gcalcli --nocolor agenda --details all --tsv --nodeclined '%from%' '%to%')
When I tried this originally from your script I had difficulty returning the location so I tweaked it and I was able to get the results I wanted - except for the additional header.
So this time I used your original template script but i had to add “id: props[0]” to the return and renumber the other items. I noticed the results included that extra value when i tested the powershell call to gcalcli.
It only supports a single ics right now, and presumes a Daily Planner format.
from Google Calendar, look for the calendar in the left sidebar click the vertical … menu, Settings and Sharing, Integrate calendar, Copy the Secret address in iCal format
enter that URL into settings
go to a daily note, use the ICS: Import events command
I think it’s main.ts, right? You need to compile to javascript first. So you will probably need tsconfig.json. Also I think he imports some typescript from a folder as well. So you will probably just want to download the entire repository, install dependencies with “npm install” and compile with “npm run build”. Not sure though. Can’t really look into it that much right now.
Install the plugin tools: npm install -g obsidian-plugin-cli
npm dev . which will build the plugin and ask you which vault to install it into.
I am hoping to have a release shortly, just having trouble with including the npm dependencies in the build when I build the plugin using GitHub Actions.