1.1 --- a/imip_manager.py Sat Dec 20 01:54:20 2014 +0100
1.2 +++ b/imip_manager.py Mon Jan 12 20:02:24 2015 +0100
1.3 @@ -1,8 +1,32 @@
1.4 #!/usr/bin/env python
1.5
1.6 +"""
1.7 +A Web interface to a user's calendar.
1.8 +
1.9 +Copyright (C) 2014, 2015 Paul Boddie <paul@boddie.org.uk>
1.10 +
1.11 +This program is free software; you can redistribute it and/or modify it under
1.12 +the terms of the GNU General Public License as published by the Free Software
1.13 +Foundation; either version 3 of the License, or (at your option) any later
1.14 +version.
1.15 +
1.16 +This program is distributed in the hope that it will be useful, but WITHOUT
1.17 +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
1.18 +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
1.19 +details.
1.20 +
1.21 +You should have received a copy of the GNU General Public License along with
1.22 +this program. If not, see <http://www.gnu.org/licenses/>.
1.23 +"""
1.24 +
1.25 +# Edit this path to refer to the location of the imiptools libraries, if
1.26 +# necessary.
1.27 +
1.28 +LIBRARY_PATH = "/var/lib/imip-agent"
1.29 +
1.30 import cgi, os, sys
1.31
1.32 -sys.path.append("/var/lib/imip-agent")
1.33 +sys.path.append(LIBRARY_PATH)
1.34
1.35 from imiptools.content import Handler, \
1.36 format_datetime, get_address, get_datetime, \
2.1 --- a/imip_store.py Sat Dec 20 01:54:20 2014 +0100
2.2 +++ b/imip_store.py Mon Jan 12 20:02:24 2015 +0100
2.3 @@ -1,5 +1,24 @@
2.4 #!/usr/bin/env python
2.5
2.6 +"""
2.7 +A simple filesystem-based store of calendar data.
2.8 +
2.9 +Copyright (C) 2014, 2015 Paul Boddie <paul@boddie.org.uk>
2.10 +
2.11 +This program is free software; you can redistribute it and/or modify it under
2.12 +the terms of the GNU General Public License as published by the Free Software
2.13 +Foundation; either version 3 of the License, or (at your option) any later
2.14 +version.
2.15 +
2.16 +This program is distributed in the hope that it will be useful, but WITHOUT
2.17 +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
2.18 +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
2.19 +details.
2.20 +
2.21 +You should have received a copy of the GNU General Public License along with
2.22 +this program. If not, see <http://www.gnu.org/licenses/>.
2.23 +"""
2.24 +
2.25 from datetime import datetime
2.26 from imiptools.config import STORE_DIR, PUBLISH_DIR
2.27 from os.path import abspath, commonprefix, exists, isfile, join, split
3.1 --- a/imiptools/__init__.py Sat Dec 20 01:54:20 2014 +0100
3.2 +++ b/imiptools/__init__.py Mon Jan 12 20:02:24 2015 +0100
3.3 @@ -1,5 +1,24 @@
3.4 #!/usr/bin/env python
3.5
3.6 +"""
3.7 +A processing framework for iMIP content.
3.8 +
3.9 +Copyright (C) 2014, 2015 Paul Boddie <paul@boddie.org.uk>
3.10 +
3.11 +This program is free software; you can redistribute it and/or modify it under
3.12 +the terms of the GNU General Public License as published by the Free Software
3.13 +Foundation; either version 3 of the License, or (at your option) any later
3.14 +version.
3.15 +
3.16 +This program is distributed in the hope that it will be useful, but WITHOUT
3.17 +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
3.18 +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
3.19 +details.
3.20 +
3.21 +You should have received a copy of the GNU General Public License along with
3.22 +this program. If not, see <http://www.gnu.org/licenses/>.
3.23 +"""
3.24 +
3.25 from email import message_from_file
3.26 from imiptools.content import get_addresses, handle_itip_part
3.27 from imiptools.mail import Messenger
4.1 --- a/imiptools/config.py Sat Dec 20 01:54:20 2014 +0100
4.2 +++ b/imiptools/config.py Mon Jan 12 20:02:24 2015 +0100
4.3 @@ -1,5 +1,7 @@
4.4 #!/usr/bin/env python
4.5
4.6 +"Configuration settings for imiptools programs."
4.7 +
4.8 # The public identity of the agent.
4.9
4.10 MESSAGE_SENDER = "calendar@example.com"
5.1 --- a/imiptools/content.py Sat Dec 20 01:54:20 2014 +0100
5.2 +++ b/imiptools/content.py Mon Jan 12 20:02:24 2015 +0100
5.3 @@ -3,6 +3,21 @@
5.4 """
5.5 Interpretation and preparation of iMIP content, together with a content handling
5.6 mechanism employed by specific recipients.
5.7 +
5.8 +Copyright (C) 2014, 2015 Paul Boddie <paul@boddie.org.uk>
5.9 +
5.10 +This program is free software; you can redistribute it and/or modify it under
5.11 +the terms of the GNU General Public License as published by the Free Software
5.12 +Foundation; either version 3 of the License, or (at your option) any later
5.13 +version.
5.14 +
5.15 +This program is distributed in the hope that it will be useful, but WITHOUT
5.16 +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
5.17 +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
5.18 +details.
5.19 +
5.20 +You should have received a copy of the GNU General Public License along with
5.21 +this program. If not, see <http://www.gnu.org/licenses/>.
5.22 """
5.23
5.24 from datetime import date, datetime, timedelta
6.1 --- a/imiptools/handlers/common.py Sat Dec 20 01:54:20 2014 +0100
6.2 +++ b/imiptools/handlers/common.py Mon Jan 12 20:02:24 2015 +0100
6.3 @@ -2,6 +2,21 @@
6.4
6.5 """
6.6 Common handler functionality for different entities.
6.7 +
6.8 +Copyright (C) 2014, 2015 Paul Boddie <paul@boddie.org.uk>
6.9 +
6.10 +This program is free software; you can redistribute it and/or modify it under
6.11 +the terms of the GNU General Public License as published by the Free Software
6.12 +Foundation; either version 3 of the License, or (at your option) any later
6.13 +version.
6.14 +
6.15 +This program is distributed in the hope that it will be useful, but WITHOUT
6.16 +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
6.17 +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
6.18 +details.
6.19 +
6.20 +You should have received a copy of the GNU General Public License along with
6.21 +this program. If not, see <http://www.gnu.org/licenses/>.
6.22 """
6.23
6.24 from imiptools.content import to_part
7.1 --- a/imiptools/handlers/person.py Sat Dec 20 01:54:20 2014 +0100
7.2 +++ b/imiptools/handlers/person.py Mon Jan 12 20:02:24 2015 +0100
7.3 @@ -2,6 +2,21 @@
7.4
7.5 """
7.6 Handlers for a person for whom scheduling is performed.
7.7 +
7.8 +Copyright (C) 2014, 2015 Paul Boddie <paul@boddie.org.uk>
7.9 +
7.10 +This program is free software; you can redistribute it and/or modify it under
7.11 +the terms of the GNU General Public License as published by the Free Software
7.12 +Foundation; either version 3 of the License, or (at your option) any later
7.13 +version.
7.14 +
7.15 +This program is distributed in the hope that it will be useful, but WITHOUT
7.16 +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
7.17 +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
7.18 +details.
7.19 +
7.20 +You should have received a copy of the GNU General Public License along with
7.21 +this program. If not, see <http://www.gnu.org/licenses/>.
7.22 """
7.23
7.24 from email.mime.text import MIMEText
8.1 --- a/imiptools/handlers/person_outgoing.py Sat Dec 20 01:54:20 2014 +0100
8.2 +++ b/imiptools/handlers/person_outgoing.py Mon Jan 12 20:02:24 2015 +0100
8.3 @@ -3,6 +3,21 @@
8.4 """
8.5 Handlers for a person for whom scheduling is performed, inspecting outgoing
8.6 messages to obtain scheduling done externally.
8.7 +
8.8 +Copyright (C) 2014, 2015 Paul Boddie <paul@boddie.org.uk>
8.9 +
8.10 +This program is free software; you can redistribute it and/or modify it under
8.11 +the terms of the GNU General Public License as published by the Free Software
8.12 +Foundation; either version 3 of the License, or (at your option) any later
8.13 +version.
8.14 +
8.15 +This program is distributed in the hope that it will be useful, but WITHOUT
8.16 +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
8.17 +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
8.18 +details.
8.19 +
8.20 +You should have received a copy of the GNU General Public License along with
8.21 +this program. If not, see <http://www.gnu.org/licenses/>.
8.22 """
8.23
8.24 from imiptools.content import Handler, uri_item
9.1 --- a/imiptools/handlers/resource.py Sat Dec 20 01:54:20 2014 +0100
9.2 +++ b/imiptools/handlers/resource.py Mon Jan 12 20:02:24 2015 +0100
9.3 @@ -2,6 +2,21 @@
9.4
9.5 """
9.6 Handlers for a resource.
9.7 +
9.8 +Copyright (C) 2014, 2015 Paul Boddie <paul@boddie.org.uk>
9.9 +
9.10 +This program is free software; you can redistribute it and/or modify it under
9.11 +the terms of the GNU General Public License as published by the Free Software
9.12 +Foundation; either version 3 of the License, or (at your option) any later
9.13 +version.
9.14 +
9.15 +This program is distributed in the hope that it will be useful, but WITHOUT
9.16 +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
9.17 +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
9.18 +details.
9.19 +
9.20 +You should have received a copy of the GNU General Public License along with
9.21 +this program. If not, see <http://www.gnu.org/licenses/>.
9.22 """
9.23
9.24 from imiptools.content import Handler, format_datetime, get_address, get_uri, to_part
10.1 --- a/imiptools/mail.py Sat Dec 20 01:54:20 2014 +0100
10.2 +++ b/imiptools/mail.py Mon Jan 12 20:02:24 2015 +0100
10.3 @@ -1,5 +1,24 @@
10.4 #!/usr/bin/env python
10.5
10.6 +"""
10.7 +Mail preparation support.
10.8 +
10.9 +Copyright (C) 2014, 2015 Paul Boddie <paul@boddie.org.uk>
10.10 +
10.11 +This program is free software; you can redistribute it and/or modify it under
10.12 +the terms of the GNU General Public License as published by the Free Software
10.13 +Foundation; either version 3 of the License, or (at your option) any later
10.14 +version.
10.15 +
10.16 +This program is distributed in the hope that it will be useful, but WITHOUT
10.17 +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
10.18 +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
10.19 +details.
10.20 +
10.21 +You should have received a copy of the GNU General Public License along with
10.22 +this program. If not, see <http://www.gnu.org/licenses/>.
10.23 +"""
10.24 +
10.25 from imiptools.config import MESSAGE_SENDER, OUTGOING_PREFIX
10.26 from email.mime.message import MIMEMessage
10.27 from email.mime.multipart import MIMEMultipart
11.1 --- a/imiptools/period.py Sat Dec 20 01:54:20 2014 +0100
11.2 +++ b/imiptools/period.py Mon Jan 12 20:02:24 2015 +0100
11.3 @@ -1,5 +1,24 @@
11.4 #!/usr/bin/env python
11.5
11.6 +"""
11.7 +Managing and presenting periods of time.
11.8 +
11.9 +Copyright (C) 2014, 2015 Paul Boddie <paul@boddie.org.uk>
11.10 +
11.11 +This program is free software; you can redistribute it and/or modify it under
11.12 +the terms of the GNU General Public License as published by the Free Software
11.13 +Foundation; either version 3 of the License, or (at your option) any later
11.14 +version.
11.15 +
11.16 +This program is distributed in the hope that it will be useful, but WITHOUT
11.17 +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11.18 +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
11.19 +details.
11.20 +
11.21 +You should have received a copy of the GNU General Public License along with
11.22 +this program. If not, see <http://www.gnu.org/licenses/>.
11.23 +"""
11.24 +
11.25 from bisect import bisect_left, insort_left
11.26
11.27 # Time management.