X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=parserrules.py;h=fb2c67e0648060c1b06918362adf106efd0e4d59;hb=763fc87a8fc530dc8ecfa1d8f0c9fd2b70b5ab3c;hp=4f71e622885e343b61db1f6b419ef54db9a65e82;hpb=4e836e4fb0a86d33033f8c53b9cb8f3ca6942ee7;p=frenchie%2Ficalparse.git diff --git a/parserrules.py b/parserrules.py index 4f71e62..fb2c67e 100644 --- a/parserrules.py +++ b/parserrules.py @@ -3,7 +3,8 @@ # Copyright (c) 2010 James French # # Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal# in the Software without restriction, including without limitation the rights +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: @@ -22,13 +23,16 @@ # 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 an value which -# is boolean False will remove the offending line from the final ICS (unless it's a None). +# 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 any boolean false value other than a None will return the line from +# the final iCalendar file -# The doc string will be presented to the user when run as verbose, so please be polite +# 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 + # Required as google are strict about the CLASS:PRIVATE/CLASS:CONFIDENTIAL + # lines and Facebook like to set them if key == 'CLASS': return (key, 'PUBLIC')