diff --git a/README.rst b/README.rst index 6d59e57..ffdfc94 100644 --- a/README.rst +++ b/README.rst @@ -1,13 +1,22 @@ -Gerrit-Powered-Agenda -===================== +========= +yaml2ical +========= -This project aims to provide an easier way to manage OpenStack team meetings. +This tool converts a series of meeting descriptions in YAML format into one +or several .ics files suitable for calendaring. It checks for scheduling +conflicts in specific locations. + +Rationale +========= + +yaml2ical aims to provide an easier way to manage OpenStack team meetings. Currently, each team's meeting time and agenda are listed at: https://wiki.openstack.org/wiki/Meetings -This project replaces each meeting with well-defined YAML files. - +This project allows to replace each meeting with well-defined YAML files, +which can be code-reviewed, then continuously-integrated into .ics files for +general consumption. Getting Started =============== @@ -46,8 +55,8 @@ section below. :: - $ git clone https://github.com/openstack-infra/gerrit-powered-agenda.git - $ cd /opt/stack/gerrit-powered-agenda/arbiter/ + $ git clone https://github.com/openstack-infra/yaml2ical.git + $ cd yaml2ical/yaml2ical The following are a few scenarios: @@ -56,8 +65,8 @@ Generate .ics files locally from existing yaml meeting files: :: - $ python convert.py -y /opt/stack/gerrit-powered-agenda/meetings/ \ - -i /opt/stack/gerrit-powered-agenda/icals/ + $ python convert.py -y ../meetings/ \ + -i ../icals/ The generated .ics files are not tracked in this git repository, but they are available locally to import into your calendar. Note, @@ -65,7 +74,7 @@ to remove stale .ics files, use the ``--force`` argument: :: - gerrit-powered-agenda/icals$ ls + yaml2ical/icals$ ls Barbican Meeting-b58d78a4.ics Ceilometer Team Meeting-9ed7b5b4.ics Chef Cookbook Meeting-2418b331.ics @@ -74,10 +83,10 @@ With each .ics file looking something similar to: :: - gerrit-powered-agenda/icals$ cat Barbican\ Meeting-b58d78a4.ics + yaml2ical/icals$ cat Barbican\ Meeting-b58d78a4.ics BEGIN:VCALENDAR VERSION:2.0 - PRODID:-//OpenStack//Gerrit-Powered Meeting Agendas//EN + PRODID:-//yaml2ical agendas//EN BEGIN:VEVENT SUMMARY:Barbican Meeting (openstack-meeting-alt) DTSTART;VALUE=DATE-TIME:20141006T200000Z diff --git a/setup.cfg b/setup.cfg index 179ca7b..6797f58 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,21 +1,23 @@ [metadata] -name = arbiter -summary = Automates process for testing and publishing changes to OpenStack meetings using existing OpenStack project infrastructure. +name = yaml2ical +summary = Convert YAML meeting descriptions into iCalendar files description-file = README.rst -author = NDSU IBM Capstone Group -author-email = joshua.tan@ndsu.edu -home-page = https://github.com/openstack-infra/gerrit-powered-agenda +author = NDSU IBM Capstone Group & OpenStack Infrastructure Team +author-email = openstack-infra@lists.openstack.org +home-page = http://ci.openstack.org/ classifier = - Intended Audience :: OpenStack Community + Intended Audience :: Information Technology + Intended Audience :: System Administrators License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python Programming Language :: Python :: 3.3 + Programming Language :: Python :: 3.4 [global] setup-hooks = pbr.hooks.setup_hook [files] -packages = arbiter +packages = yaml2ical diff --git a/tox.ini b/tox.ini index 7cd8f0a..78b404b 100644 --- a/tox.ini +++ b/tox.ini @@ -16,7 +16,7 @@ commands = {posargs} [testenv:mkical] commands = mkdir -p ical - python arbiter/convert.py -i ./ical -c + python yaml2ical/convert.py -i ./ical -c [flake8] show-source = True diff --git a/arbiter/__init__.py b/yaml2ical/__init__.py similarity index 94% rename from arbiter/__init__.py rename to yaml2ical/__init__.py index 91d6711..a8478e9 100644 --- a/arbiter/__init__.py +++ b/yaml2ical/__init__.py @@ -16,4 +16,4 @@ import pbr.version __version__ = pbr.version.VersionInfo( - 'arbiter').version_string() + 'yaml2ical').version_string() diff --git a/arbiter/const.py b/yaml2ical/const.py similarity index 100% rename from arbiter/const.py rename to yaml2ical/const.py diff --git a/arbiter/convert.py b/yaml2ical/convert.py similarity index 99% rename from arbiter/convert.py rename to yaml2ical/convert.py index 258e89d..3f1086a 100644 --- a/arbiter/convert.py +++ b/yaml2ical/convert.py @@ -14,7 +14,7 @@ import argparse import logging import os -from arbiter import utils +from yaml2ical import utils # logging settings diff --git a/arbiter/meeting.py b/yaml2ical/meeting.py similarity index 96% rename from arbiter/meeting.py rename to yaml2ical/meeting.py index 45a557d..6e10654 100644 --- a/arbiter/meeting.py +++ b/yaml2ical/meeting.py @@ -18,16 +18,16 @@ import icalendar import pytz import yaml -from arbiter import const -from arbiter import schedule +from yaml2ical import const +from yaml2ical import schedule -class GerritPoweredCalendar(icalendar.Calendar): +class Yaml2IcalCalendar(icalendar.Calendar): """A calendar in ics format.""" def __init__(self): - super(GerritPoweredCalendar, self).__init__() - self.add('prodid', '-//OpenStack//Gerrit-Powered Meeting Agendas//EN') + super(Yaml2IcalCalendar, self).__init__() + self.add('prodid', '-//yaml2ical agendas//EN') self.add('version', '2.0') def write_to_disk(self, filename): diff --git a/arbiter/schedule.py b/yaml2ical/schedule.py similarity index 100% rename from arbiter/schedule.py rename to yaml2ical/schedule.py diff --git a/arbiter/tests/__init__.py b/yaml2ical/tests/__init__.py similarity index 100% rename from arbiter/tests/__init__.py rename to yaml2ical/tests/__init__.py diff --git a/arbiter/tests/sample_data.py b/yaml2ical/tests/sample_data.py similarity index 100% rename from arbiter/tests/sample_data.py rename to yaml2ical/tests/sample_data.py diff --git a/arbiter/tests/test_meeting.py b/yaml2ical/tests/test_meeting.py similarity index 95% rename from arbiter/tests/test_meeting.py rename to yaml2ical/tests/test_meeting.py index a7c58ae..a3f29be 100644 --- a/arbiter/tests/test_meeting.py +++ b/yaml2ical/tests/test_meeting.py @@ -13,8 +13,8 @@ import datetime import unittest -from arbiter import meeting -from arbiter.tests import sample_data +from yaml2ical import meeting +from yaml2ical.tests import sample_data class MeetingTestCase(unittest.TestCase): diff --git a/arbiter/tests/test_utils.py b/yaml2ical/tests/test_utils.py similarity index 93% rename from arbiter/tests/test_utils.py rename to yaml2ical/tests/test_utils.py index 2c1bdc3..696e087 100644 --- a/arbiter/tests/test_utils.py +++ b/yaml2ical/tests/test_utils.py @@ -12,9 +12,9 @@ import unittest -from arbiter import meeting -from arbiter.tests import sample_data -from arbiter import utils +from yaml2ical import meeting +from yaml2ical.tests import sample_data +from yaml2ical import utils class UtilsTestCase(unittest.TestCase): diff --git a/arbiter/utils.py b/yaml2ical/utils.py similarity index 96% rename from arbiter/utils.py rename to yaml2ical/utils.py index d9d5b42..5034819 100644 --- a/arbiter/utils.py +++ b/yaml2ical/utils.py @@ -13,7 +13,7 @@ import logging import os -from arbiter import meeting +from yaml2ical import meeting """Utility functions.""" @@ -86,14 +86,14 @@ def convert_yaml_to_ical(yaml_dir, outputdir=None, outputfile=None): # convert meetings to a list of ical if outputdir: for m in meetings: - cal = meeting.GerritPoweredCalendar() + cal = meeting.Yaml2IcalCalendar() m.add_to_calendar(cal) filename = os.path.basename(m._filename).split('.')[0] + '.ics' cal.write_to_disk(os.path.join(outputdir, filename)) # convert meetings into a single ical if outputfile: - cal = meeting.GerritPoweredCalendar() + cal = meeting.Yaml2IcalCalendar() for m in meetings: m.add_to_calendar(cal) cal.write_to_disk(outputfile)