radicale.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 Server according to the configuration.
  28. """
  29. import radicale
  30. if radicale.config.get("server", "protocol") == "http":
  31. server = radicale.server.HTTPServer(
  32. (radicale.config.get("server", "name"),
  33. radicale.config.getint("server", "port")),
  34. radicale.CalendarHandler)
  35. server.serve_forever()