Metadata-Version: 2.4
Name: yaml2ics
Version: 0.3
Summary: CLI to convert yaml into ics.
Author: Scientific Python Developers
License: BSD 3-Clause License
        
        Copyright (c) 2021--2022, Scientific Python project
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Home, https://github.com/scientific-python/yaml2ics
Project-URL: Source, https://github.com/scientific-python/yaml2ics
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ics-vtimezones==2020.2
Requires-Dist: ics==0.8.0.dev0
Requires-Dist: python-dateutil>=2.8
Requires-Dist: pyyaml>=6
Requires-Dist: importlib-resources>=5.2.1
Requires-Dist: tzdata; platform_system == "Windows"
Provides-Extra: test
Requires-Dist: pytest>=8.0; extra == "test"
Requires-Dist: pytest-cov>=5.0; extra == "test"
Provides-Extra: lint
Requires-Dist: pre-commit==4.3.0; extra == "lint"
Provides-Extra: dev
Requires-Dist: changelist==0.5; extra == "dev"
Dynamic: license-file

[![PyPI](https://img.shields.io/pypi/v/yaml2ics)](https://pypi.org/project/yaml2ics/)
[![Test status](https://github.com/scientific-python/yaml2ics/workflows/test/badge.svg?branch=main)](https://github.com/scientific-python/yaml2ics/actions?query=workflow%3A%22test%22)
[![Test coverage](https://codecov.io/gh/scientific-python/yaml2ics/branch/main/graph/badge.svg)](https://app.codecov.io/gh/scientific-python/yaml2ics/branch/main)

# YAML to iCalendar (ics)

| WARNING: this project is still in beta. Beware of breaking changes! |
| ------------------------------------------------------------------- |

Convert YAML files to .ics files which can be imported into other
calendar applications.

Features include:

- Converting single .yaml files, or combining multiple into one .ics
  file.
- ics fields: name, summary, description, location, timezone, repeat
- Specify event start+end or start+duration
- Recurring events (basic support)
- All-day events
- Timezone specification (default or per-event)

## Installation

```
pip install yaml2ics
```

## Usage

To produce a calendar from a list of events:

```
python yaml2ics.py example/test_calendar.yaml
```

To combine lists of events in to a calendar:

```
python yaml2ics.py example/test_calendar.yaml example/another_calendar.yaml
```

## Syntax

Please see `example/test_calendar.yaml` for a full demo including
explanations. Below is a minimal template that shows the basic idea:

```yaml
name: Calendar Name
timezone: Europe/Helsinki # default timezone for events, optional

events:
  - summary: The event title
    begin: 2021-09-21 15:00:00
    duration:
      minutes: 30
    location: |
      https://meet.jit.si/example
    description: |
      In this meeting we will ...
```

## Timezones

The event timezone can be specified in three ways (in reverse order of precedence):

1. Using the `timezone: ...` field, as shown above under "Syntax".
2. Adding it to an individual event:

   ```yaml
   - summary: My event
     timezone: America/Los_Angeles
   ```

3. By specifying a timezone in the event start time:

   ```
   2021-09-21 15:00:00 +07:00
   ```

Valid timezones are listed at https://datetime.app/iana-timezones

If no timezone is set, we default to UTC.

## Contributing

Contributions are welcomed! This project is still in active development
and should be considered beta.

To install the development version, fork the source of the project and make an
editable install:

```
pip install -e ".[test]"
```

To test:

```
pytest
```

Generate a coverage report with:

```
pytest --cov-report term-missing --cov yaml2ics
```

[black](https://github.com/psf/black) and other linters are used to auto-format
files (and enforced by CI). To install the git hooks, use `pre-commit install`.
To run the tests/auto-formatting manually, use `pre-commit run --all-files`.
