# HG changeset patch # User Paul Boddie # Date 1421089344 -3600 # Node ID 367b6c1b82b0ad082ed184834aa5055caadacdcc # Parent 35850f0a96e0736fa1c823acd4a1e129a958386f Added copyright and licensing notices. Exposed a path configuration setting in the manager program. diff -r 35850f0a96e0 -r 367b6c1b82b0 imip_manager.py --- a/imip_manager.py Sat Dec 20 01:54:20 2014 +0100 +++ b/imip_manager.py Mon Jan 12 20:02:24 2015 +0100 @@ -1,8 +1,32 @@ #!/usr/bin/env python +""" +A Web interface to a user's calendar. + +Copyright (C) 2014, 2015 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see . +""" + +# Edit this path to refer to the location of the imiptools libraries, if +# necessary. + +LIBRARY_PATH = "/var/lib/imip-agent" + import cgi, os, sys -sys.path.append("/var/lib/imip-agent") +sys.path.append(LIBRARY_PATH) from imiptools.content import Handler, \ format_datetime, get_address, get_datetime, \ diff -r 35850f0a96e0 -r 367b6c1b82b0 imip_store.py --- a/imip_store.py Sat Dec 20 01:54:20 2014 +0100 +++ b/imip_store.py Mon Jan 12 20:02:24 2015 +0100 @@ -1,5 +1,24 @@ #!/usr/bin/env python +""" +A simple filesystem-based store of calendar data. + +Copyright (C) 2014, 2015 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see . +""" + from datetime import datetime from imiptools.config import STORE_DIR, PUBLISH_DIR from os.path import abspath, commonprefix, exists, isfile, join, split diff -r 35850f0a96e0 -r 367b6c1b82b0 imiptools/__init__.py --- a/imiptools/__init__.py Sat Dec 20 01:54:20 2014 +0100 +++ b/imiptools/__init__.py Mon Jan 12 20:02:24 2015 +0100 @@ -1,5 +1,24 @@ #!/usr/bin/env python +""" +A processing framework for iMIP content. + +Copyright (C) 2014, 2015 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see . +""" + from email import message_from_file from imiptools.content import get_addresses, handle_itip_part from imiptools.mail import Messenger diff -r 35850f0a96e0 -r 367b6c1b82b0 imiptools/config.py --- a/imiptools/config.py Sat Dec 20 01:54:20 2014 +0100 +++ b/imiptools/config.py Mon Jan 12 20:02:24 2015 +0100 @@ -1,5 +1,7 @@ #!/usr/bin/env python +"Configuration settings for imiptools programs." + # The public identity of the agent. MESSAGE_SENDER = "calendar@example.com" diff -r 35850f0a96e0 -r 367b6c1b82b0 imiptools/content.py --- a/imiptools/content.py Sat Dec 20 01:54:20 2014 +0100 +++ b/imiptools/content.py Mon Jan 12 20:02:24 2015 +0100 @@ -3,6 +3,21 @@ """ Interpretation and preparation of iMIP content, together with a content handling mechanism employed by specific recipients. + +Copyright (C) 2014, 2015 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see . """ from datetime import date, datetime, timedelta diff -r 35850f0a96e0 -r 367b6c1b82b0 imiptools/handlers/common.py --- a/imiptools/handlers/common.py Sat Dec 20 01:54:20 2014 +0100 +++ b/imiptools/handlers/common.py Mon Jan 12 20:02:24 2015 +0100 @@ -2,6 +2,21 @@ """ Common handler functionality for different entities. + +Copyright (C) 2014, 2015 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see . """ from imiptools.content import to_part diff -r 35850f0a96e0 -r 367b6c1b82b0 imiptools/handlers/person.py --- a/imiptools/handlers/person.py Sat Dec 20 01:54:20 2014 +0100 +++ b/imiptools/handlers/person.py Mon Jan 12 20:02:24 2015 +0100 @@ -2,6 +2,21 @@ """ Handlers for a person for whom scheduling is performed. + +Copyright (C) 2014, 2015 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see . """ from email.mime.text import MIMEText diff -r 35850f0a96e0 -r 367b6c1b82b0 imiptools/handlers/person_outgoing.py --- a/imiptools/handlers/person_outgoing.py Sat Dec 20 01:54:20 2014 +0100 +++ b/imiptools/handlers/person_outgoing.py Mon Jan 12 20:02:24 2015 +0100 @@ -3,6 +3,21 @@ """ Handlers for a person for whom scheduling is performed, inspecting outgoing messages to obtain scheduling done externally. + +Copyright (C) 2014, 2015 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see . """ from imiptools.content import Handler, uri_item diff -r 35850f0a96e0 -r 367b6c1b82b0 imiptools/handlers/resource.py --- a/imiptools/handlers/resource.py Sat Dec 20 01:54:20 2014 +0100 +++ b/imiptools/handlers/resource.py Mon Jan 12 20:02:24 2015 +0100 @@ -2,6 +2,21 @@ """ Handlers for a resource. + +Copyright (C) 2014, 2015 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see . """ from imiptools.content import Handler, format_datetime, get_address, get_uri, to_part diff -r 35850f0a96e0 -r 367b6c1b82b0 imiptools/mail.py --- a/imiptools/mail.py Sat Dec 20 01:54:20 2014 +0100 +++ b/imiptools/mail.py Mon Jan 12 20:02:24 2015 +0100 @@ -1,5 +1,24 @@ #!/usr/bin/env python +""" +Mail preparation support. + +Copyright (C) 2014, 2015 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see . +""" + from imiptools.config import MESSAGE_SENDER, OUTGOING_PREFIX from email.mime.message import MIMEMessage from email.mime.multipart import MIMEMultipart diff -r 35850f0a96e0 -r 367b6c1b82b0 imiptools/period.py --- a/imiptools/period.py Sat Dec 20 01:54:20 2014 +0100 +++ b/imiptools/period.py Mon Jan 12 20:02:24 2015 +0100 @@ -1,5 +1,24 @@ #!/usr/bin/env python +""" +Managing and presenting periods of time. + +Copyright (C) 2014, 2015 Paul Boddie + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see . +""" + from bisect import bisect_left, insort_left # Time management.