@@ -37,6 +37,7 @@ jobs:
# > tests/resources/__init__.py:1:0: F0010: error while code parsing: Unable to load file tests/resources/__init__.py:
# > [Errno 2] No such file or directory: 'tests/resources/__init__.py' (parse-error)
- run: pipenv run pylint --disable=missing-requirement --disable=parse-error tests/*
+ - run: pipenv run mypy ical2vdir tests
- run: pipenv run pytest --cov=ical2vdir --cov-report=term-missing --cov-fail-under=100
- run: pipenv run black --check .
# >=1.9.0 to detect branch name
@@ -10,6 +10,8 @@ Convert / split single [iCalendar](https://en.wikipedia.org/wiki/ICalendar)
`.ics` file into a
[vdir](https://vdirsyncer.readthedocs.io/en/stable/vdir.html) directory.
+Pre-existing files will be updated or left unchanged.
+
Compatible with [khal](https://github.com/pimutils/khal).
## Setup
@@ -35,14 +37,3 @@ Remove files from output directory that are not available in input:
```sh
$ ical2vdir < input.ics --output-dir /some/path --delete
```
-
-### Run Tests
-```sh
-$ git clone https://github.com/fphammerle/ical2vdir.git
-$ cd ical2vdir
-$ pipenv sync --dev
-$ pipenv run pylint ical2vdir
-$ pipenv run mypy ical2vdir
-$ pipenv run pytest --cov=ical2vdir --cov-report=term-missing --cov-fail-under=100
-```
@@ -93,6 +93,9 @@ def _write_event(event: icalendar.cal.Event, path: pathlib.Path):
prefix="ical2vdir-", suffix=_VDIR_EVENT_FILE_EXTENSION
)
try:
+ # > Content lines are delimited by a line break,
+ # > which is a CRLF sequence [...]
+ # https://tools.ietf.org/html/rfc5545#section-3.1
os.write(temp_fd, event.to_ical())
os.close(temp_fd)
os.rename(temp_path, path)
@@ -0,0 +1,2 @@
+[mypy]
+ignore_missing_imports = True
@@ -19,6 +19,8 @@ import pathlib
import setuptools
+_REPO_URL = "https://github.com/fphammerle/ical2vdir"
setuptools.setup(
name="ical2vdir",
use_scm_version=True,
@@ -28,7 +30,8 @@ setuptools.setup(
long_description_content_type="text/markdown",
author="Fabian Peter Hammerle",
author_email="fabian@hammerle.me",
- url="https://github.com/fphammerle/ical2vdir",
+ url=_REPO_URL,
+ project_urls={"Changelog": _REPO_URL + "/blob/master/CHANGELOG.md"},
license="GPLv3+",
keywords=["calendar", "event", "iCal", "iCalendar", "ics", "split", "sync", "vdir"],
classifiers=[