Varia's website, varia.zone or vvvvvvaria.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
mb@mb 04c2824180 adding the 2 submodules again 6 years ago
..
Readme.rst adding the 2 submodules again 6 years ago
__init__.py adding the 2 submodules again 6 years ago
ical.py adding the 2 submodules again 6 years ago

Readme.rst

ical
----

This plugin looks for and parses an ``.ics`` file if it is defined in a given
page's ``calendar`` metadata. One calendar can be defined per page.

Dependencies
------------

This plugin depends on the ``icalendar`` package, which can be installed via
pip::

pip install icalendar

Usage
-----

For a reST-formatted page, include the following line in the metadata::

:calendar: /path/to/your/ics/file

For Markdown, include the following line in the page metadata::

Calendar: /path/to/your/ics/file

Following is some example code that can be added to your theme's ``page.html``
template in order to display the calendar::

{% if page.calendar %}
<dl>
{% for vevent in events[page.slug] %}
<dt>{{ vevent.summary }}</dt>
<dd>{{ vevent.description|replace('\n\n', '<br>') }}</dd>
<dd>{{ vevent.dtstart }}</dd>
<dd>{{ vevent.dtend }}</dd>
<dd class="footer"><a href="{{ vevent.url }}">See more</a></dd>
{% endfor %}
</dl>
{% endif %}