1
0
mirror of https://github.com/b4tman/sync_ics2gcal synced 2025-01-21 07:28:24 +00:00

fmt README

This commit is contained in:
Dmitry Belyaev 2020-03-08 13:17:54 +03:00
parent 6e7c3cb7b2
commit 51005fb29e
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3

View File

@ -12,21 +12,21 @@ Python scripts for sync .ics file with Google calendar
To install from [PyPI](https://pypi.org/project/sync-ics2gcal/) with [pip](https://pypi.python.org/pypi/pip), run: To install from [PyPI](https://pypi.org/project/sync-ics2gcal/) with [pip](https://pypi.python.org/pypi/pip), run:
``` ```sh
pip install sync-ics2gcal pip install sync-ics2gcal
``` ```
Or download source code and install: Or download source code and install:
``` ```sh
python setup.py install python setup.py install
``` ```
## Configuration ## Configuration
### Create application in Google API Console ### Create application in Google API Console
1. Create a new project: https://console.developers.google.com/project
1. Create a new project: [console.developers.google.com/project](https://console.developers.google.com/project)
2. Choose the new project from the top right project dropdown (only if another project is selected) 2. Choose the new project from the top right project dropdown (only if another project is selected)
3. In the project Dashboard, choose "Library" 3. In the project Dashboard, choose "Library"
4. Find and Enable "Google Calendar API" 4. Find and Enable "Google Calendar API"
@ -38,15 +38,20 @@ python setup.py install
10. Edit service account and click "Create key", choose JSON and download key file. 10. Edit service account and click "Create key", choose JSON and download key file.
### Create working directory ### Create working directory
For example: `/home/user/myfolder`. For example: `/home/user/myfolder`.
1. Save service account key in file `service-account.json`. 1. Save service account key in file `service-account.json`.
2. Download [sample config](https://github.com/b4tman/sync_ics2gcal/blob/develop/sample-config.yml) and save to file `config.yml`. For example: 2. Download [sample config](https://github.com/b4tman/sync_ics2gcal/blob/develop/sample-config.yml) and save to file `config.yml`. For example:
```
```sh
wget https://raw.githubusercontent.com/b4tman/sync_ics2gcal/develop/sample-config.yml -O config.yml wget https://raw.githubusercontent.com/b4tman/sync_ics2gcal/develop/sample-config.yml -O config.yml
``` ```
3. *(Optional)* Place source `.ics` file, `my-calendar.ics` for example. 3. *(Optional)* Place source `.ics` file, `my-calendar.ics` for example.
### Configuration parameters ### Configuration parameters
* `start_from` - start date: * `start_from` - start date:
* full format datetime, `2018-04-03T13:23:25.000001Z` for example * full format datetime, `2018-04-03T13:23:25.000001Z` for example
* or just `now` * or just `now`
@ -55,16 +60,16 @@ wget https://raw.githubusercontent.com/b4tman/sync_ics2gcal/develop/sample-confi
* `google_id` - target google calendar id, `my-calendar@group.calendar.google.com` for example * `google_id` - target google calendar id, `my-calendar@group.calendar.google.com` for example
* `source` - source `.ics` filename, `my-calendar.ics` for example * `source` - source `.ics` filename, `my-calendar.ics` for example
## Usage ## Usage
### Manage calendars ### Manage calendars
``` ```sh
manage-ics2gcal <subcommand> [-h] [options] manage-ics2gcal <subcommand> [-h] [options]
``` ```
subcomands: subcomands:
* **list** - list calendars * **list** - list calendars
* **create** - create calendar * **create** - create calendar
* **add_owner** - add owner to calendar * **add_owner** - add owner to calendar
@ -76,15 +81,15 @@ Use **-h** for more info.
### Sync calendar ### Sync calendar
just type: just type:
```
```sh
sync-ics2gcal sync-ics2gcal
``` ```
## How it works ## How it works
![How it works](how-it-works.png) ![How it works](how-it-works.png)
## License ## License
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fb4tman%2Fsync_ics2gcal.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fb4tman%2Fsync_ics2gcal?ref=badge_large) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fb4tman%2Fsync_ics2gcal.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fb4tman%2Fsync_ics2gcal?ref=badge_large)