radicale.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/usr/bin/python
  2. # -*- coding: utf-8 -*-
  3. #
  4. # This file is part of Radicale Server - Calendar Server
  5. # Copyright © 2008-2010 Guillaume Ayoub
  6. # Copyright © 2008 Nicolas Kandel
  7. # Copyright © 2008 Pascal Halter
  8. #
  9. # This library is free software: you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation, either version 3 of the License, or
  12. # (at your option) any later version.
  13. #
  14. # This library is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. # GNU General Public License for more details.
  18. #
  19. # You should have received a copy of the GNU General Public License
  20. # along with Radicale. If not, see <http://www.gnu.org/licenses/>.
  21. # TODO: Manage depth and calendars/collections (see xmlutils)
  22. # TODO: Manage smart and configurable logs
  23. # TODO: Manage authentication
  24. # TODO: Magage command-line options
  25. """
  26. Radicale Server entry point.
  27. Launch the Radicale Serve according to the configuration.
  28. """
  29. import sys
  30. import BaseHTTPServer
  31. import radicale
  32. if radicale.config.get("server", "type") == "http":
  33. server = BaseHTTPServer.HTTPServer(
  34. ("", radicale.config.getint("server", "port")),
  35. radicale.CalendarHandler)
  36. server.serve_forever()