Code Repositories xandikos / 2d8ad81
New upstream version 0.0.6 Jelmer Vernooij 2 years ago
16 changed file(s) with 130 addition(s) and 54 deletion(s). Raw diff Collapse all Expand all
00 Metadata-Version: 1.1
11 Name: xandikos
2 Version: 0.0.5
3 Summary: CalDAV/CardDAV server
4 Home-page: https://www.jelmer.uk/projects/xandikos
2 Version: 0.0.6
3 Summary: Lightweight CalDAV/CardDAV server
4 Home-page: https://www.xandikos.org/
55 Author: Jelmer Vernooij
66 Author-email: jelmer@jelmer.uk
77 License: GNU GPLv3 or later
66 :alt: Windows Build Status
77
88
9 Xandikos is a CardDAV/CalDAV server that backs onto a Git repository.
9 Xandikos is a lightweight yet complete CardDAV/CalDAV server that backs onto a Git repository.
1010
1111 Xandikos (Ξανδικός or Ξανθικός) takes its name from the name of the March month
1212 in the ancient Macedonian calendar, used in Macedon in the first millennium BC.
3030 - :RFC:`6638` (CalDAV Scheduling Extensions) - *not implemented*
3131 - :RFC:`7809` (CalDAV Time Zone Extensions) - *not implemented*
3232 - :RFC:`7529` (WebDAV Quota) - *not implemented*
33 - :RFC:`4709` (WebDAV Mount) - *not implemented*
33 - :RFC:`4709` (WebDAV Mount) - `intentionally <https://github.com/jelmer/xandikos/issues/48>`_ *not implemented*
3434 - :RFC:`5546` (iCal iTIP) - *not implemented*
3535 - :RFC:`4324` (iCAL CAP) - *not implemented*
3636 - :RFC:`7953` (iCal AVAILABILITY) - *not implemented*
126126 mkdir -p $HOME/dav
127127 uwsgi examples/uwsgi-standalone.ini
128128
129 Contributing
130 ============
131
132 Contributions to Xandikos are very welcome. If you run into bugs or have
133 feature requests, please file issues `on GitHub
134 <https://github.com/jelmer/xandikos/issues/new>`_. If you're interested in
135 contributing code or documentation, please read `CONTRIBUTING
136 <CONTRIBUTING.rst>`_. Issues that are good for new contributors are tagged
137 `new-contributor <https://github.com/jelmer/xandikos/labels/new-contributor>`_
138 on GitHub.
139
129140 Help
130141 ====
131142
0 Principal
1 =========
2
3 Need per principal config:
4
5 - calendar home sets
6 - addressbook home sets
7 - user address set
8 - infit settings
9
10 Calendar
11 ========
12
13 Need per calendar config:
14
15 - color
16 - description
17 - inbox URL
18 - outbox URL
19 - max instances
20 - max attendees per instance
21 - calendar timezone
22
23 Addresssbook
24 ============
25
26 Need per addressbook config:
27
28 - max image size
29 - max resource size
30 - color
31 - description
288288
289289 - {DAV:}quote-available-bytes [supported]
290290 - {DAV:}quote-used-bytes [supported]
291
292 rfc4709 (WebDAV Mount)
293 ----------------------
294
295 This RFC documents a mechanism that allows clients to find the WebDAV mount
296 associated with a specific page. It's unclear to the writer what the value of
297 this is - an alternate resource in the HTML page would also do.
298
299 As far as I can tell, there is only a single server side implementation and a
300 single client side implementation of this RFC. I don't have access to the
301 client implementation (Xythos Drive) and the server side implementation is in
302 SabreDAV.
303
304 Experimental support for WebDAV Mount is available in the 'mount' branch, but
305 won't be merged without a good use case.
+0
-9
notes/principal.rst less more
0 Principal
1 =========
2
3 Need per principal config:
4
5 - calendar home sets
6 - addressbook home sets
7 - user address set
8 - infit settings
2121
2222 from setuptools import setup
2323
24 version = "0.0.5"
24 version = "0.0.6"
2525
2626 setup(name="xandikos",
27 description="CalDAV/CardDAV server",
27 description="Lightweight CalDAV/CardDAV server",
2828 version=version,
2929 author="Jelmer Vernooij",
3030 author_email="jelmer@jelmer.uk",
3131 license="GNU GPLv3 or later",
32 url="https://www.jelmer.uk/projects/xandikos",
32 url="https://www.xandikos.org/",
3333 install_requires=['icalendar', 'dulwich', 'defusedxml', 'jinja2'],
3434 packages=['xandikos', 'xandikos.tests'],
3535 package_data={'xandikos': ['templates/*.html']},
2020
2121 """CalDAV/CardDAV server."""
2222
23 __version__ = (0, 0, 5)
23 __version__ = (0, 0, 6)
2424
2525 import defusedxml.ElementTree # noqa: This does some monkey-patching on-load
2929 # Feature to advertise to indicate scheduling support.
3030 FEATURE = 'calendar-auto-schedule'
3131
32 CALENDAR_USER_TYPE_INDIVIDUAL = "INDIVIDUAL" # An individual
33 CALENDAR_USER_TYPE_GROUP = "GROUP" # A group of individuals
34 CALENDAR_USER_TYPE_RESOURCE = "RESOURCE" # A physical resource
35 CALENDAR_USER_TYPE_ROOM = "ROOM" # A room resource
36 CALENDAR_USER_TYPE_UNKNOWN = "UNKNOWN" # Otherwise not known
37
38 CALENDAR_USER_TYPES = (
39 CALENDAR_USER_TYPE_INDIVIDUAL,
40 CALENDAR_USER_TYPE_GROUP,
41 CALENDAR_USER_TYPE_RESOURCE,
42 CALENDAR_USER_TYPE_ROOM,
43 CALENDAR_USER_TYPE_UNKNOWN)
44
3245
3346 class ScheduleInbox(caldav.Calendar):
3447
3952 raise NotImplementedError(self.get_schedule_inbox_url)
4053
4154 def get_schedule_outbox_url(self):
42 raise NotImplementedError(self.get_schedule_inbox_url)
55 raise NotImplementedError(self.get_schedule_outbox_url)
4356
4457 def get_calendar_user_type(self):
4558 # Default, per section 2.4.2
46 return "INDIVIDUAL"
59 return CALENDAR_USER_TYPE_INDIVIDUAL
4760
4861
4962 class ScheduleInboxURLProperty(webdav.Property):
1717 </ul>
1818
1919 <p>For more information about Xandikos, see <a
20 href="https://jelmer.uk/projects/xandikos">https://jelmer.uk/projects/xandikos</a>
20 href="https://www.xandikos.org/">https://www.xandikos.org/</a>
2121 or <a href="https://github.com/jelmer/xandikos">https://github.com/jelmer/xandikos</a>.
2222 </p>
2323 </body>
55 <p>This is a Xandikos WebDAV server.</p>
66
77 <p>For more information about Xandikos, see <a
8 href="https://jelmer.uk/projects/xandikos">https://jelmer.uk/projects/xandikos</a>
8 href="https://www.xandikos.org/">https://www.xandikos.org/</a>
99 or <a href="https://github.com/jelmer/xandikos">https://github.com/jelmer/xandikos</a>.
1010 </p>
1111 </body>
550550 return render_jinja_page('root.html', accepted_content_languages)
551551
552552 def get_body(self):
553 raise NotImplementedError(self.get_body)
553 raise KeyError
554554
555555 def get_content_length(self):
556 raise NotImplementedError(self.get_content_length)
556 raise KeyError
557557
558558 def get_content_type(self):
559559 return 'text/html'
637637
638638 def get_calendar_user_type(self):
639639 # TODO(jelmer)
640 return "INDIVIDUAL"
640 return scheduling.CALENDAR_USER_TYPE_INDIVIDUAL
641641
642642 def get_calendar_proxy_read_for(self):
643643 # TODO(jelmer)
757757 """A wsgi App that provides a Xandikos web server.
758758 """
759759
760 def __init__(self, backend, current_user_principal):
760 def __init__(self, backend, current_user_principal_href):
761761 super(XandikosApp, self).__init__(backend)
762762 self.register_properties([
763763 webdav.ResourceTypeProperty(),
764764 webdav.CurrentUserPrincipalProperty(
765 current_user_principal),
765 current_user_principal_href),
766766 webdav.PrincipalURLProperty(),
767767 webdav.DisplayNameProperty(),
768768 webdav.GetETagProperty(),
873873
874874
875875 def main(argv):
876 import optparse
876 import argparse
877877 import sys
878878 from xandikos import __version__
879 parser = optparse.OptionParser(version='.'.join(map(str, __version__)))
880 parser.usage = "%prog -d ROOT-DIR [OPTIONS]"
881
882 access_group = optparse.OptionGroup(parser, "Access Options")
883 access_group.add_option(
879 parser = argparse.ArgumentParser(
880 usage="%(prog)s -d ROOT-DIR [OPTIONS]",
881 prog=argv[0])
882
883 parser.add_argument(
884 '--version',
885 action='version',
886 version='%(prog)s ' + '.'.join(map(str, __version__)))
887
888 access_group = parser.add_argument_group(title="Access Options")
889 access_group.add_argument(
884890 "-l", "--listen_address", dest="listen_address", default="localhost",
885 help="Binding IP address. [%default]")
886 access_group.add_option(
891 help="Binding IP address. [%(default)s]")
892 access_group.add_argument(
887893 "-p", "--port", dest="port", type=int, default=8080,
888 help="Port to listen on. [%default]")
889 access_group.add_option(
894 help="Port to listen on. [%(default)s]")
895 access_group.add_argument(
890896 "--route-prefix", default="/", help=(
891897 "Path to Xandikos. "
892898 "(useful when Xandikos is behind a reverse proxy) "
893 "[%default]"))
894 parser.add_option_group(access_group)
895 parser.add_option(
899 "[%(default)s]"))
900 parser.add_argument(
896901 "-d", "--directory", dest="directory", default=None,
897902 help="Directory to serve from.")
898 parser.add_option(
903 parser.add_argument(
899904 "--current-user-principal", default="/user/",
900 help="Path to current user principal. [%default]")
901 parser.add_option(
905 help="Path to current user principal. [%(default)s]")
906 parser.add_argument(
902907 "--autocreate", action="store_true", dest="autocreate",
903908 help="Automatically create necessary directories.")
904 parser.add_option(
909 parser.add_argument(
905910 "--defaults", action="store_true", dest="defaults",
906911 help=("Create initial calendar and address book. "
907912 "Implies --autocreate."))
908 options, args = parser.parse_args(argv)
913 options = parser.parse_args(argv[1:])
909914
910915 if options.directory is None:
911916 parser.print_usage()
933938 'Run xandikos with --autocreate?',
934939 options.current_user_principal)
935940
941 current_user_principal_href = posixpath.join(
942 options.route_prefix,
943 options.current_user_principal.lstrip('/'))
944
936945 app = XandikosApp(
937946 backend,
938 current_user_principal=options.current_user_principal)
947 current_user_principal_href=current_user_principal_href)
939948
940949 from wsgiref.simple_server import make_server
941950 app = WellknownRedirector(app, options.route_prefix)
496496 if self.current_user_principal is None:
497497 ET.SubElement(el, '{DAV:}unauthenticated')
498498 else:
499 el.append(create_href(self.current_user_principal, href))
499 # TODO(jelmer): Ideally this should receive
500 # SCRIPT_NAME and prefix the returned URL with that.
501 el.append(create_href(self.current_user_principal))
500502
501503
502504 class PrincipalURLProperty(Property):
2121
2222 import logging
2323 import os
24 import urllib.parse
2425
2526 from xandikos.web import XandikosBackend, XandikosApp
2627
4546 current_user_principal))
4647
4748 backend._mark_as_principal(current_user_principal)
48 app = XandikosApp(backend, current_user_principal)
49 current_user_principal_href = urllib.parse.urljoin(
50 os.environ.get('ROUTE_PREFIX', '/'), current_user_principal.lstrip('/'))
51 app = XandikosApp(backend, current_user_principal_href)
00 Metadata-Version: 1.1
11 Name: xandikos
2 Version: 0.0.5
3 Summary: CalDAV/CardDAV server
4 Home-page: https://www.jelmer.uk/projects/xandikos
2 Version: 0.0.6
3 Summary: Lightweight CalDAV/CardDAV server
4 Home-page: https://www.xandikos.org/
55 Author: Jelmer Vernooij
66 Author-email: jelmer@jelmer.uk
77 License: GNU GPLv3 or later
2626 examples/uwsgi-standalone.ini
2727 examples/uwsgi.ini
2828 notes/auth.rst
29 notes/config.rst
2930 notes/context.rst
3031 notes/dav-compliance.rst
3132 notes/file-format.rst
3233 notes/goals.rst
3334 notes/hacking.txt
3435 notes/monitoring.rst
35 notes/principal.rst
3636 notes/release-process.rst
3737 notes/store.rst
3838 notes/structure.rst
0 defusedxml
1 dulwich
02 icalendar
1 dulwich
2 defusedxml
33 jinja2