Commit 181e1920 authored by Keith Packard's avatar Keith Packard

Rename to calypso

parent 284c74b7
==========================
Cadaver - CalDAV Server
Calypso - CalDAV Server
==========================
------
......
==========================
Cadaver - CalDAV Server
Calypso - CalDAV Server
==========================
--------
README
--------
The Cadaver Project is a free and open-source CalDAV calendar server.
The Calypso Project is a free and open-source CalDAV calendar server.
For complete documentation, please visit the `Cadaver online documentation
<http://www.cadaver.org/documentation>`_
For complete documentation, please visit the `Calypso online documentation
<http://www.calypso.org/documentation>`_
==========================
Cadaver - CalDAV Server
Calypso - CalDAV Server
==========================
------
......
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This file is part of Cadaver Server - Calendar Server
# This file is part of Calypso Server - Calendar Server
# Copyright © 2011 Keith Packard
# Copyright © 2008-2011 Guillaume Ayoub
# Copyright © 2008 Nicolas Kandel
......@@ -18,18 +18,18 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Cadaver. If not, see <http://www.gnu.org/licenses/>.
# along with Calypso. If not, see <http://www.gnu.org/licenses/>.
# This file is just a script, allow [a-z0-9]* variable names
# pylint: disable-msg=C0103
# ``import cadaver`` refers to the ``cadaver`` module, not ``cadaver.py``
# ``import calypso`` refers to the ``calypso`` module, not ``calypso.py``
# pylint: disable-msg=W0406
"""
Cadaver Server entry point.
Calypso Server entry point.
Launch the Cadaver Server according to configuration and command-line
Launch the Calypso Server according to configuration and command-line
arguments.
"""
......@@ -40,7 +40,7 @@ import os
import sys
import optparse
import cadaver
import calypso
# Get command-line options
parser = optparse.OptionParser()
......@@ -50,56 +50,56 @@ parser.add_option(
help="show version and exit")
parser.add_option(
"-d", "--daemon", action="store_true",
default=cadaver.config.getboolean("server", "daemon"),
default=calypso.config.getboolean("server", "daemon"),
help="launch as daemon")
parser.add_option(
"-f", "--foreground", action="store_false", dest="daemon",
help="launch in foreground (opposite of --daemon)")
parser.add_option(
"-H", "--host",
default=cadaver.config.get("server", "host"),
default=calypso.config.get("server", "host"),
help="set server hostname")
parser.add_option(
"-p", "--port", type="int",
default=cadaver.config.getint("server", "port"),
default=calypso.config.getint("server", "port"),
help="set server port")
parser.add_option(
"-s", "--ssl", action="store_true",
default=cadaver.config.getboolean("server", "ssl"),
default=calypso.config.getboolean("server", "ssl"),
help="use SSL connection")
parser.add_option(
"-S", "--no-ssl", action="store_false", dest="ssl",
help="do not use SSL connection (opposite of --ssl)")
parser.add_option(
"-k", "--key",
default=cadaver.config.get("server", "key"),
default=calypso.config.get("server", "key"),
help="private key file ")
parser.add_option(
"-c", "--certificate",
default=cadaver.config.get("server", "certificate"),
default=calypso.config.get("server", "certificate"),
help="certificate file ")
options = parser.parse_args()[0]
# Update Cadaver configuration according to options
# Update Calypso configuration according to options
for option in parser.option_list:
key = option.dest
if key:
value = getattr(options, key)
cadaver.config.set("server", key, value)
calypso.config.set("server", key, value)
# Print version and exit if the option is given
if options.version:
print(cadaver.VERSION)
print(calypso.VERSION)
sys.exit()
# Fork if Cadaver is launched as daemon
# Fork if Calypso is launched as daemon
if options.daemon:
if os.fork():
sys.exit()
sys.stdout = sys.stderr = open(os.devnull, "w")
# Launch calendar server
server_class = cadaver.HTTPSServer if options.ssl else cadaver.HTTPServer
server_class = calypso.HTTPSServer if options.ssl else calypso.HTTPServer
server = server_class(
(options.host, options.port), cadaver.CalendarHTTPHandler)
(options.host, options.port), calypso.CalendarHTTPHandler)
server.serve_forever()
# -*- coding: utf-8 -*-
#
# This file is part of Cadaver Server - Calendar Server
# This file is part of Calypso Server - Calendar Server
# Copyright © 2008-2011 Guillaume Ayoub
# Copyright © 2008 Nicolas Kandel
# Copyright © 2008 Pascal Halter
......@@ -16,10 +16,10 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Cadaver. If not, see <http://www.gnu.org/licenses/>.
# along with Calypso. If not, see <http://www.gnu.org/licenses/>.
"""
Cadaver Server module.
Calypso Server module.
This module offers 3 useful classes:
......@@ -28,7 +28,7 @@ This module offers 3 useful classes:
managing SSL connections;
- ``CalendarHTTPHandler`` is a CalDAV request handler for HTTP(S) servers.
To use this module, you should take a look at the file ``cadaver.py`` that
To use this module, you should take a look at the file ``calypso.py`` that
should have been included in this package.
"""
......@@ -46,7 +46,7 @@ except ImportError:
import BaseHTTPServer as server
# pylint: enable=F0401
from cadaver import acl, config, ical, xmlutils
from calypso import acl, config, ical, xmlutils
VERSION = "0.5"
......@@ -74,7 +74,7 @@ def _check(request, function):
request.send_response(client.UNAUTHORIZED)
request.send_header(
"WWW-Authenticate",
"Basic realm=\"Cadaver Server - Password Required\"")
"Basic realm=\"Calypso Server - Password Required\"")
request.end_headers()
# pylint: enable=W0212
......@@ -181,7 +181,7 @@ class CalendarHTTPHandler(server.BaseHTTPRequestHandler):
content_type = self.headers.get("Content-Type", None)
if content_type and "charset=" in content_type:
charsets.append(content_type.split("charset=")[1].strip())
# Then append default Cadaver charset
# Then append default Calypso charset
charsets.append(self._encoding)
# Then append various fallbacks
charsets.append("utf-8")
......
# -*- coding: utf-8 -*-
#
# This file is part of Cadaver Server - Calendar Server
# This file is part of Calypso Server - Calendar Server
# Copyright © 2008-2011 Guillaume Ayoub
# Copyright © 2008 Nicolas Kandel
# Copyright © 2008 Pascal Halter
......@@ -16,7 +16,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Cadaver. If not, see <http://www.gnu.org/licenses/>.
# along with Calypso. If not, see <http://www.gnu.org/licenses/>.
"""
Users and rights management.
......@@ -26,10 +26,10 @@ configuration.
"""
from cadaver import config
from calypso import config
def load():
"""Load list of available ACL managers."""
module = __import__("cadaver.acl", fromlist=[config.get("acl", "type")])
module = __import__("calypso.acl", fromlist=[config.get("acl", "type")])
return getattr(module, config.get("acl", "type"))
# -*- coding: utf-8 -*-
#
# This file is part of Cadaver Server - Calendar Server
# This file is part of Calypso Server - Calendar Server
# Copyright © 2008-2011 Guillaume Ayoub
# Copyright © 2008 Nicolas Kandel
# Copyright © 2008 Pascal Halter
......@@ -16,7 +16,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Cadaver. If not, see <http://www.gnu.org/licenses/>.
# along with Calypso. If not, see <http://www.gnu.org/licenses/>.
"""
Fake ACL.
......
# -*- coding: utf-8 -*-
#
# This file is part of Cadaver Server - Calendar Server
# This file is part of Calypso Server - Calendar Server
# Copyright © 2008-2011 Guillaume Ayoub
# Copyright © 2008 Nicolas Kandel
# Copyright © 2008 Pascal Halter
......@@ -16,7 +16,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Cadaver. If not, see <http://www.gnu.org/licenses/>.
# along with Calypso. If not, see <http://www.gnu.org/licenses/>.
"""
Htpasswd ACL.
......@@ -30,7 +30,7 @@ supported, but md5 is not (see ``htpasswd`` man page to understand why).
import base64
import hashlib
from cadaver import config
from calypso import config
def _plain(hash_value, password):
......
# -*- coding: utf-8 -*-
#
# This file is part of Cadaver Server - Calendar Server
# This file is part of Calypso Server - Calendar Server
# Copyright © 2008-2011 Guillaume Ayoub
# Copyright © 2008 Nicolas Kandel
# Copyright © 2008 Pascal Halter
......@@ -16,10 +16,10 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Cadaver. If not, see <http://www.gnu.org/licenses/>.
# along with Calypso. If not, see <http://www.gnu.org/licenses/>.
"""
Cadaver configuration module.
Calypso configuration module.
Give a configparser-like interface to read and write configuration.
......@@ -51,10 +51,10 @@ INITIAL_CONFIG = {
"acl": {
"type": "fake",
"personal": "False",
"filename": "/etc/cadaver/users",
"filename": "/etc/calypso/users",
"encryption": "crypt"},
"storage": {
"folder": os.path.expanduser("~/.config/cadaver/calendars")}}
"folder": os.path.expanduser("~/.config/calypso/calendars")}}
# Create a ConfigParser and configure it
_CONFIG_PARSER = ConfigParser()
......@@ -64,8 +64,8 @@ for section, values in INITIAL_CONFIG.items():
for key, value in values.items():
_CONFIG_PARSER.set(section, key, value)
_CONFIG_PARSER.read("/etc/cadaver/config")
_CONFIG_PARSER.read(os.path.expanduser("~/.config/cadaver/config"))
_CONFIG_PARSER.read("/etc/calypso/config")
_CONFIG_PARSER.read(os.path.expanduser("~/.config/calypso/config"))
# Wrap config module into ConfigParser instance
sys.modules[__name__] = _CONFIG_PARSER
# -*- coding: utf-8 -*-
#
# This file is part of Cadaver Server - Calendar Server
# This file is part of Calypso Server - Calendar Server
# Copyright © 2008-2011 Guillaume Ayoub
# Copyright © 2008 Nicolas Kandel
# Copyright © 2008 Pascal Halter
......@@ -17,10 +17,10 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Cadaver. If not, see <http://www.gnu.org/licenses/>.
# along with Calypso. If not, see <http://www.gnu.org/licenses/>.
"""
Cadaver calendar classes.
Calypso calendar classes.
Define the main classes of a calendar as seen from the server.
......@@ -35,7 +35,7 @@ import glob
import tempfile
import vobject
from cadaver import config
from calypso import config
FOLDER = os.path.expanduser(config.get("storage", "folder"))
......@@ -345,7 +345,7 @@ class Calendar(object):
def write(self, headers=None, items=None):
#"""Write calendar with given parameters."""
#headers = headers or self.headers or (
# Header("PRODID:-//Cadaver//NONSGML Cadaver Server//EN"),
# Header("PRODID:-//Calypso//NONSGML Calypso Server//EN"),
# Header("VERSION:2.0"))
#items = items if items is not None else self.items
......@@ -376,7 +376,7 @@ class Calendar(object):
self.scan_dir()
headers = []
# headers.append(Item("PRODID:-//Cadaver//NONSGML Cadaver Server//EN"))
# headers.append(Item("PRODID:-//Calypso//NONSGML Calypso Server//EN"))
# headers.append(Item("VERSION:2.0"))
return ""
......@@ -386,7 +386,7 @@ class Calendar(object):
"""Find headers items in calendar."""
header_lines = []
# header_lines.append(Item("PRODID:-//Cadaver//NONSGML Cadaver Server//EN"))
# header_lines.append(Item("PRODID:-//Calypso//NONSGML Calypso Server//EN"))
# header_lines.append(Item("VERSION:2.0"))
return header_lines
......
# -*- coding: utf-8 -*-
#
# This file is part of Cadaver Server - Calendar Server
# This file is part of Calypso Server - Calendar Server
# Copyright © 2008-2011 Guillaume Ayoub
# Copyright © 2008 Nicolas Kandel
# Copyright © 2008 Pascal Halter
......@@ -16,7 +16,7 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Cadaver. If not, see <http://www.gnu.org/licenses/>.
# along with Calypso. If not, see <http://www.gnu.org/licenses/>.
"""
XML and iCal requests manager.
......@@ -31,7 +31,7 @@ import xml.etree.ElementTree as ET
import urllib
from cadaver import client, config, ical
from calypso import client, config, ical
NAMESPACES = {
......@@ -51,7 +51,7 @@ def _response(code):
def name_from_path(path):
"""Return Cadaver item name from ``path``."""
"""Return Calypso item name from ``path``."""
path_parts = path.strip("/").split("/")
return urllib.unquote(path_parts[-1]) if len(path_parts) > 2 else None
......
# Config file for Cadaver - A simple calendar server
# Config file for Calypso - A simple calendar server
#
# Place it into /etc/cadaver/config (global)
# or ~/.config/cadaver/config (user)
# Place it into /etc/calypso/config (global)
# or ~/.config/calypso/config (user)
#
# The current values are the default ones
......@@ -32,7 +32,7 @@ type = fake
# Personal calendars only available for logged in users (if needed)
personal = False
# Htpasswd filename (if needed)
filename = /etc/cadaver/users
filename = /etc/calypso/users
# Htpasswd encryption method (if needed)
# Value: plain | sha1 | crypt
encryption = crypt
......@@ -40,6 +40,6 @@ encryption = crypt
[storage]
# Folder for storing local calendars,
# created if not present
folder = ~/.config/cadaver/calendars
folder = ~/.config/calypso/calendars
# vim:ft=cfg
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This file is part of Cadaver Server - Calendar Server
# This file is part of Calypso Server - Calendar Server
# Copyright © 2009-2011 Guillaume Ayoub
#
# This library is free software: you can redistribute it and/or modify
......@@ -15,24 +15,24 @@
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Cadaver. If not, see <http://www.gnu.org/licenses/>.
# along with Calypso. If not, see <http://www.gnu.org/licenses/>.
"""
Cadaver CalDAV server
Calypso CalDAV server
======================
The Cadaver Project is a CalDAV calendar server. It aims to be a light
The Calypso Project is a CalDAV calendar server. It aims to be a light
solution, easy to use, easy to install, easy to configure. As a consequence,
it requires few software dependances and is pre-configured to work
out-of-the-box.
The Cadaver Project runs on most of the UNIX-like platforms (Linux, BSD,
The Calypso Project runs on most of the UNIX-like platforms (Linux, BSD,
MacOS X) and Windows. It is known to work with Evolution 2.30+, Lightning 0.9+
and Sunbird 0.9+. It is free and open-source software, released under GPL
version 3.
For further information, please visit the `Cadaver Website
<http://www.cadaver.org/>`_.
For further information, please visit the `Calypso Website
<http://www.calypso.org/>`_.
"""
......@@ -40,7 +40,7 @@ import os
from distutils.core import setup
from distutils.command.build_scripts import build_scripts
import cadaver
import calypso
# build_scripts is known to have a lot of public methods
......@@ -49,7 +49,7 @@ class BuildScripts(build_scripts):
"""Build the package."""
def run(self):
"""Run building."""
# These lines remove the .py extension from the cadaver executable
# These lines remove the .py extension from the calypso executable
self.mkpath(self.build_dir)
for script in self.scripts:
root, _ = os.path.splitext(script)
......@@ -57,23 +57,23 @@ class BuildScripts(build_scripts):
# pylint: enable=R0904
# When the version is updated, ``cadaver.VERSION`` must be modified.
# When the version is updated, ``calypso.VERSION`` must be modified.
# A new section in the ``NEWS`` file must be added too.
setup(
name="Cadaver",
version=cadaver.VERSION,
name="Calypso",
version=calypso.VERSION,
description="CalDAV and CardDAV Server",
long_description=__doc__,
author="Keith Packard",
author_email="keithp@keithp.com",
url="http://keithp.com/",
download_url="http://keithp.com/git/cadaver" % \
cadaver.VERSION,
download_url="http://keithp.com/git/calypso" % \
calypso.VERSION,
license="GNU GPL v3",
platforms="Any",
packages=["cadaver", "cadaver.acl"],
provides=["cadaver"],
scripts=["cadaver.py"],
packages=["calypso", "calypso.acl"],
provides=["calypso"],
scripts=["calypso.py"],
cmdclass={"build_scripts": BuildScripts},
keywords=["calendar", "CalDAV"],
classifiers=[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment