diff --git a/.gitignore b/.gitignore index dc68a19..46a400e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ .idea/ .vscode -notion_gcal_sync/config.custom.yml +notion_gcal_sync/config.yml client_secret.json *.pkl *.json diff --git a/MANIFEST.in b/MANIFEST.in index 98b3ad5..c75cfe8 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,10 @@ include README.md include LICENSE -include notion_gcal_sync/config.yml +include notion_gcal_sync/config.default.yml -recursive-include tests/ * \ No newline at end of file + +exclude notion_gcal_sync/client-credentials.json +exclude notion_gcal_sync/token.json +exclude notion_gcal_sync/config.yml + +recursive-exclude tests/ * diff --git a/README.md b/README.md index 6aa8e92..c832356 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ pip install notion-gcal-sync With docker (Not the mounting of `client_secret.json` and `config.yml`) -```yaml +```yaml docker pull notion-gcal-sync ``` @@ -23,14 +23,19 @@ Keep following [these instructions](docs/setup.md). **IMPORTANT:** Make sure you followed the [setup](docs/setup.md) and configured the `config.yml` with your notion token and page for Notion API and gathered and setup credentials `client_secret.json` for Google Calendar API. -From pip and running directly +From pip and running directly + ```bash notion-gcal-sync ``` With docker (Not the mounting of `client_secret.json` and `config.yml`) + ```yaml -docker run -v client_secret.json:client_secret.json -v config.yml:config.yml notion-gcal-sync +docker run --net=host -it \ + -v $(pwd)/config.yml:/app/notion_gcal_sync/config.yml \ + -v $(pwd)/client_credentials.json:/app/notion_gcal_sync/client_credentials.json \ + notion-gcal-sync ``` On first run or when token is old you will be asked to authorize the application. Follow the link and authorize with your account. After authorization the application will continue. diff --git a/install.sh b/install.sh old mode 100644 new mode 100755 index e69de29..e2032b7 --- a/install.sh +++ b/install.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +CONFIG_FILE="notion_gcal_sync/config.yml" +CLIENT_CREDENTIALS="notion_gcal_sync/client_credentials.json" +CLIENT_TOKEN="notion_gcal_sync/token.json" + +pip install . + +NOTION_GCAL_SYNC_LIB="$(pip list -v | grep notion-gcal-sync | awk '{print $3}')/notion_gcal_sync" +cp $CONFIG_FILE "$NOTION_GCAL_SYNC_LIB/config.yml" +cp $CLIENT_CREDENTIALS "$NOTION_GCAL_SYNC_LIB/client_credentials.json" +cp $CLIENT_TOKEN "$NOTION_GCAL_SYNC_LIB/token.json" diff --git a/setup.py b/setup.py index bf88843..6322c14 100644 --- a/setup.py +++ b/setup.py @@ -1,21 +1,24 @@ from setuptools import setup, find_packages +with open("README.md", "r", encoding="utf-8") as fh: + long_description = fh.read() + setup( name='notion-gcal-sync', version='1.0.0', - url='https://github.com/Ravio1i/notion-gcal-sync', license='GNU General Public License v3.0', - author='Luka', + author='Ravio1i', author_email='luka.kroeger@gmail.com', description='Bidirectional synchronize calendar events within notion and google calendar', - long_description=open('README.md').read(), + long_description=long_description, + long_description_content_type="text/markdown", entry_points={ 'console_scripts': ['notion-gcal-sync=notion_gcal_sync.__main__:main'] }, packages=find_packages(include=['notion_gcal_sync', 'notion_gcal_sync.*']), - package_data={'notion_gcal_sync': ['config.example.yml']}, - include_package_data=True, + package_data={'notion_gcal_sync': ['config.default.yml']}, + python_requires=">=3.9", install_requires=[ 'notion-client==0.7.0', 'google-api-python-client==2.23.0',