From 9fa00debbf7779796f29f21ac6fa5ba5a74ad1b2 Mon Sep 17 00:00:00 2001 From: James French Date: Mon, 2 Aug 2010 13:47:52 +0800 Subject: [PATCH] Added rules.py Provides documentation of how the rules work --- rules.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 rules.py diff --git a/rules.py b/rules.py new file mode 100644 index 0000000..61a09e5 --- /dev/null +++ b/rules.py @@ -0,0 +1,18 @@ +#!/usr/bin/python + +# This file describes a series of rules which will be called on an ics file as +# rule(key, value) + +# Your functions are expected to return a (key, value) tuple or they will be treated as +# if they don't exist (ie, the line will go through unhindered). Returning a value which +# is boolean False will remove the offending line from the final ICS. The easiest way +# to pass a line back without changing it is to return True. + +# The doc string will be presented to the user when run as verbose, so please be polite + +def markEventsPublic(key, value): + '''Marking private events public''' + # Required as google are strict about the CLASS:PRIVATE/CLASS:CONFIDENTIAL lines + if key == 'CLASS': + return (key, 'PUBLIC') + return True -- 2.20.1