Skip to content

Commit

Permalink
Update setup py
Browse files Browse the repository at this point in the history
  • Loading branch information
Ravio1i committed Oct 18, 2021
1 parent 32d65ff commit 5c4748d
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.idea/
.vscode

notion_gcal_sync/config.custom.yml
notion_gcal_sync/config.yml
client_secret.json
*.pkl
*.json
Expand Down
9 changes: 7 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -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/ *

exclude notion_gcal_sync/client-credentials.json
exclude notion_gcal_sync/token.json
exclude notion_gcal_sync/config.yml

recursive-exclude tests/ *
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand All @@ -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.
Expand Down
12 changes: 12 additions & 0 deletions install.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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"
13 changes: 8 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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',
Expand Down

0 comments on commit 5c4748d

Please sign in to comment.