1
0
mirror of https://github.com/b4tman/sync_ics2gcal synced 2024-12-04 17:56:54 +00:00
Утилита для загрузки/синхронизации в календарь Google событий из файла в формате iCalendar
Go to file
dependabot[bot] e86767b415 Bump the pypi-updates group with 8 updates
Bumps the pypi-updates group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [google-api-python-client](https://github.com/googleapis/google-api-python-client) | `2.147.0` | `2.151.0` |
| [icalendar](https://github.com/collective/icalendar) | `6.0.0` | `6.0.1` |
| [fire](https://github.com/google/python-fire) | `0.6.0` | `0.7.0` |
| [black](https://github.com/psf/black) | `24.8.0` | `24.10.0` |
| [mypy](https://github.com/python/mypy) | `1.11.2` | `1.13.0` |
| [types-python-dateutil](https://github.com/python/typeshed) | `2.9.0.20240906` | `2.9.0.20241003` |
| [types-pytz](https://github.com/python/typeshed) | `2024.2.0.20240913` | `2024.2.0.20241003` |
| [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) | `2.0.0` | `3.0.1` |


Updates `google-api-python-client` from 2.147.0 to 2.151.0
- [Release notes](https://github.com/googleapis/google-api-python-client/releases)
- [Commits](https://github.com/googleapis/google-api-python-client/compare/v2.147.0...v2.151.0)

Updates `icalendar` from 6.0.0 to 6.0.1
- [Release notes](https://github.com/collective/icalendar/releases)
- [Changelog](https://github.com/collective/icalendar/blob/main/CHANGES.rst)
- [Commits](https://github.com/collective/icalendar/compare/v6.0.0...v6.0.1)

Updates `fire` from 0.6.0 to 0.7.0
- [Release notes](https://github.com/google/python-fire/releases)
- [Commits](https://github.com/google/python-fire/compare/v0.6.0...v0.7.0)

Updates `black` from 24.8.0 to 24.10.0
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/24.8.0...24.10.0)

Updates `mypy` from 1.11.2 to 1.13.0
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/python/mypy/compare/v1.11.2...v1.13.0)

Updates `types-python-dateutil` from 2.9.0.20240906 to 2.9.0.20241003
- [Commits](https://github.com/python/typeshed/commits)

Updates `types-pytz` from 2024.2.0.20240913 to 2024.2.0.20241003
- [Commits](https://github.com/python/typeshed/commits)

Updates `sphinx-rtd-theme` from 2.0.0 to 3.0.1
- [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst)
- [Commits](https://github.com/readthedocs/sphinx_rtd_theme/compare/2.0.0...3.0.1)

---
updated-dependencies:
- dependency-name: google-api-python-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pypi-updates
- dependency-name: icalendar
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: pypi-updates
- dependency-name: fire
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: pypi-updates
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: pypi-updates
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: pypi-updates
- dependency-name: types-python-dateutil
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: pypi-updates
- dependency-name: types-pytz
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: pypi-updates
- dependency-name: sphinx-rtd-theme
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: pypi-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-01 10:56:38 +03:00
.github Create FUNDING.yml 2024-10-07 10:03:38 +03:00
docs add docs 2023-08-20 23:08:56 +03:00
sync_ics2gcal add py.typed 2023-08-20 23:29:38 +03:00
tests fix type errors in tests 2022-06-04 18:51:43 +03:00
.gitignore add docs 2023-08-20 23:08:56 +03:00
.readthedocs.yml fix readthedocs 2024-03-20 22:48:53 +03:00
how-it-works.png + [how it works] in README 2018-04-21 15:23:48 +03:00
LICENSE Initial commit 2018-04-05 11:16:20 +03:00
poetry.lock Bump the pypi-updates group with 8 updates 2024-11-01 10:56:38 +03:00
pyproject.toml Bump the pypi-updates group with 8 updates 2024-11-01 10:56:38 +03:00
README.md add docs 2023-08-20 23:08:56 +03:00
sample-config.yml Initial commit 2018-04-05 11:16:20 +03:00

sync_ics2gcal

PyPI version Python package status Documentation Status

Python scripts for sync .ics file with Google calendar

Installation

To install from PyPI with pip, run:

pip install sync-ics2gcal

Or download source code and install using poetry:

# 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
  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 and save to file config.yml. For example:
wget https://raw.githubusercontent.com/b4tman/sync_ics2gcal/develop/sample-config.yml -O config.yml
  1. (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
  • (Optional) logging - config 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

manage-ics2gcal GROUP | COMMAND

GROUPS:

  • property - get/set properties (see 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:

sync-ics2gcal

How it works

How it works

Documentation is available at sync-ics2gcal.readthedocs.io.