Coder Social home page Coder Social logo

admariner / notion-googlecalendar-sync Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elblogbruno/notion-googlecalendar-sync

0.0 0.0 0.0 13 KB

This project allows you to sync a notion database with a calendar view with the google calendar. WIP

Python 100.00%

notion-googlecalendar-sync's Introduction

Notion-GoogleCalendar-Sync

This project allows you to sync a notion database with a calendar view with the google calendar.

When called in a cron, for example,it first sees the tasks with a property called "Status" and sees if it equals done. Everytime I do finish a task I change its status to done. You can change the code to change the property name of course. It searches them on the calendar and deletes them as they are, you guess it, done. Then, it reads the database and checks one per one if it is inside the calendar yet,and if it is not adds it!

Need to have a client_id.json get from the Google Calendar API, more info here: https://developers.google.com/calendar/quickstart/python

Also a settings.json file with this structure:

{
	"token":"xxxxxxxxx", # token_v2, it can be get from the cookies
	"url":"XXXXXXXXX",  #calendar view url, in the calendar view right clic -> copy view url
	"property":"deadline" #name of the property that holds a Date. In my case deadline, pretty straightforward
}

To get the tokenV2 I do explain it on my other notion repo here https://github.com/elblogbruno/NotionAI-MyMind.

This project was inspired why https://github.com/evertheylen/notion-export-ics that the idea to get it done is simpler, but this one I find it nicer and faster.

HOW TO USE IT?

Install the requirements:

pip install -r requirements.txt

And then call the file to do an initial configuration and sync:

python add_notion_task_to_cal.py

Then add it to crontab:

crontab -e

Write down this. The line of * means it will run the sync script every 5 minutes, you can change it for whatever suits you.

*/5 * * * *  /usr/bin/python ~/Notion-GoogleCalendar-Sync/add_notion_task_to_cal.py  #this can be set to wheter the file is and python version you have.

TODO

Google Calendar to notion sync.

FAQS

Traceback (most recent call last):
File ".../notion/notion-export-ics/webapp.py", line 38, in make_ics
cal = get_ical(client, calendar_url, title_format)
File ".../notion/notion-export-ics/notion_ics.py", line 27, in get_ical
calendar_query = calendar_view.build_query()
File ".../notion/collection.py", line 249, in build_query
"query"
KeyError: 'query'

If you get this error see this:

evertheylen/notion-export-ics#5

notion-googlecalendar-sync's People

Contributors

elblogbruno avatar

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.