# sync_ics2gcal
[![PyPI version](https://badge.fury.io/py/sync-ics2gcal.svg)](https://badge.fury.io/py/sync-ics2gcal)
![Python package status](https://github.com/b4tman/sync_ics2gcal/workflows/Python%20package/badge.svg)
[![Documentation Status](https://readthedocs.org/projects/sync-ics2gcal/badge/?version=latest)](https://sync-ics2gcal.readthedocs.io/en/latest/?badge=latest)
Python scripts for sync .ics file with Google calendar
## Installation
To install from [PyPI](https://pypi.org/project/sync-ics2gcal/) with [pip](https://pypi.python.org/pypi/pip), run:
```sh
pip install sync-ics2gcal
```
Or download source code and install using poetry:
```sh
# install poetry
pip install poetry
# install project and deps to virtualenv
poetry install
# run
poetry run sync-ics2gcal
```
## Configuration
### Create application in Google API Console
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)
3. In the project Dashboard, choose "Library"
4. Find and Enable "Google Calendar API"
5. In the project Dashboard, choose "Credentials"
6. In the "Service Accounts" group, click to "Manage service accounts"
7. Click "Create service account"
8. Choose service account name and ID
9. Go back to "Service Accounts" group in "Credentials"
10. Edit service account and click "Create key", choose JSON and download key file.
### Create working directory
For example: `/home/user/myfolder`.
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:
```sh
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.
### Configuration parameters
* `start_from` - start date:
* full format datetime, `2018-04-03T13:23:25.000001Z` for example
* or just `now`
* *(Optional)* `service_account` - service account filename, remove it from config to use [default credentials](https://developers.google.com/identity/protocols/application-default-credentials)
* *(Optional)* `logging` - [config](https://docs.python.org/3.8/library/logging.config.html#dictionary-schema-details) to setup logging
* `google_id` - target google calendar id, `my-calendar@group.calendar.google.com` for example
* `source` - source `.ics` filename, `my-calendar.ics` for example
## Usage
### Manage calendars
```sh
manage-ics2gcal GROUP | COMMAND
```
**GROUPS**:
* **property** - get/set properties (see [CalendarList resource](https://developers.google.com/calendar/v3/reference/calendarList#resource)), subcommands:
- **get** - get calendar property
- **set** - set calendar property
**COMMANDS**:
* **list** - list calendars
* **create** - create calendar
* **add_owner** - add owner to calendar
* **remove** - remove calendar
* **rename** - rename calendar
Use **-h** for more info.
### Sync calendar
just type:
```sh
sync-ics2gcal
```
## How it works
![How it works](how-it-works.png)
Documentation is available at [sync-ics2gcal.readthedocs.io](https://sync-ics2gcal.readthedocs.io).
Raw data
{
"_id": null,
"home_page": "https://github.com/b4tman/sync_ics2gcal",
"name": "sync_ics2gcal",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "icalendar, sync, google, calendar",
"author": "Dmitry Belyaev",
"author_email": "b4tm4n@mail.ru",
"download_url": "https://files.pythonhosted.org/packages/b6/71/15bc3ab8c62ac6d2caf6bd521f6cf965fba7898aef8d1d251db37e558e59/sync_ics2gcal-0.1.5.tar.gz",
"platform": null,
"description": "# sync_ics2gcal\n\n[![PyPI version](https://badge.fury.io/py/sync-ics2gcal.svg)](https://badge.fury.io/py/sync-ics2gcal)\n![Python package status](https://github.com/b4tman/sync_ics2gcal/workflows/Python%20package/badge.svg)\n[![Documentation Status](https://readthedocs.org/projects/sync-ics2gcal/badge/?version=latest)](https://sync-ics2gcal.readthedocs.io/en/latest/?badge=latest)\n\nPython scripts for sync .ics file with Google calendar\n\n## Installation\n\nTo install from [PyPI](https://pypi.org/project/sync-ics2gcal/) with [pip](https://pypi.python.org/pypi/pip), run:\n\n```sh\npip install sync-ics2gcal\n```\n\nOr download source code and install using poetry:\n\n```sh\n# install poetry\npip install poetry\n# install project and deps to virtualenv\npoetry install\n# run\npoetry run sync-ics2gcal\n```\n\n## Configuration\n\n### Create application in Google API Console\n\n1. Create a new project: [console.developers.google.com/project](https://console.developers.google.com/project)\n2. Choose the new project from the top right project dropdown (only if another project is selected)\n3. In the project Dashboard, choose \"Library\"\n4. Find and Enable \"Google Calendar API\"\n5. In the project Dashboard, choose \"Credentials\"\n6. In the \"Service Accounts\" group, click to \"Manage service accounts\"\n7. Click \"Create service account\"\n8. Choose service account name and ID\n9. Go back to \"Service Accounts\" group in \"Credentials\"\n10. Edit service account and click \"Create key\", choose JSON and download key file.\n\n### Create working directory\n\nFor example: `/home/user/myfolder`.\n\n1. Save service account key in file `service-account.json`.\n2. Download [sample config](https://github.com/b4tman/sync_ics2gcal/blob/develop/sample-config.yml) and save to file `config.yml`. For example:\n\n```sh\nwget https://raw.githubusercontent.com/b4tman/sync_ics2gcal/develop/sample-config.yml -O config.yml\n```\n\n3. *(Optional)* Place source `.ics` file, `my-calendar.ics` for example.\n\n### Configuration parameters\n\n* `start_from` - start date:\n * full format datetime, `2018-04-03T13:23:25.000001Z` for example\n * or just `now`\n* *(Optional)* `service_account` - service account filename, remove it from config to use [default credentials](https://developers.google.com/identity/protocols/application-default-credentials)\n* *(Optional)* `logging` - [config](https://docs.python.org/3.8/library/logging.config.html#dictionary-schema-details) to setup logging\n* `google_id` - target google calendar id, `my-calendar@group.calendar.google.com` for example\n* `source` - source `.ics` filename, `my-calendar.ics` for example\n\n## Usage\n\n### Manage calendars\n\n```sh\nmanage-ics2gcal GROUP | COMMAND\n```\n\n**GROUPS**:\n\n* **property** - get/set properties (see [CalendarList resource](https://developers.google.com/calendar/v3/reference/calendarList#resource)), subcommands:\n - **get** - get calendar property\n - **set** - set calendar property\n\n**COMMANDS**:\n\n* **list** - list calendars\n* **create** - create calendar\n* **add_owner** - add owner to calendar\n* **remove** - remove calendar\n* **rename** - rename calendar\n\n\nUse **-h** for more info.\n\n### Sync calendar\n\njust type:\n\n```sh\nsync-ics2gcal\n```\n\n## How it works\n\n![How it works](how-it-works.png)\n\nDocumentation is available at [sync-ics2gcal.readthedocs.io](https://sync-ics2gcal.readthedocs.io).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Sync ics file with Google calendar",
"version": "0.1.5",
"project_urls": {
"Homepage": "https://github.com/b4tman/sync_ics2gcal",
"Repository": "https://github.com/b4tman/sync_ics2gcal"
},
"split_keywords": [
"icalendar",
" sync",
" google",
" calendar"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1f3604a278137a9b4262ef065bad7734cdcfa2cb8629010af2534c88e9368271",
"md5": "09f63f362c03fa3547871531e3990c70",
"sha256": "382bbf03bccf8ce6e6145ffe81516280125ea18a6979ed273971f13eacee8d65"
},
"downloads": -1,
"filename": "sync_ics2gcal-0.1.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "09f63f362c03fa3547871531e3990c70",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 13132,
"upload_time": "2024-09-06T10:17:37",
"upload_time_iso_8601": "2024-09-06T10:17:37.644528Z",
"url": "https://files.pythonhosted.org/packages/1f/36/04a278137a9b4262ef065bad7734cdcfa2cb8629010af2534c88e9368271/sync_ics2gcal-0.1.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b67115bc3ab8c62ac6d2caf6bd521f6cf965fba7898aef8d1d251db37e558e59",
"md5": "21b58196ee85b40ad29d554b1b4e2a60",
"sha256": "019a5919fce6db0242b54c5f30507dec214d4d05245617bd6e93359dfd5fe1b7"
},
"downloads": -1,
"filename": "sync_ics2gcal-0.1.5.tar.gz",
"has_sig": false,
"md5_digest": "21b58196ee85b40ad29d554b1b4e2a60",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 11898,
"upload_time": "2024-09-06T10:17:39",
"upload_time_iso_8601": "2024-09-06T10:17:39.049206Z",
"url": "https://files.pythonhosted.org/packages/b6/71/15bc3ab8c62ac6d2caf6bd521f6cf965fba7898aef8d1d251db37e558e59/sync_ics2gcal-0.1.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-06 10:17:39",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "b4tman",
"github_project": "sync_ics2gcal",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "sync_ics2gcal"
}