From 7fe3def61e64fcf144178ddc5f1f5ce1ef3ae25f Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sun, 17 Feb 2008 01:17:01 +0100 Subject: another checkpoint, works again! --- src/tekuti | 54 ++++++------------------------------------------------ 1 file changed, 6 insertions(+), 48 deletions(-) (limited to 'src') diff --git a/src/tekuti b/src/tekuti index 2873ff6..bfff6b2 100755 --- a/src/tekuti +++ b/src/tekuti @@ -1,6 +1,6 @@ #! /bin/bash # -*- scheme -*- -exec guile $GUILE_FLAGS -l $0 -e main "$@" +exec guile $GUILE_FLAGS -l $0 -e main -- "$@" !# ;; Tekuti ;; Copyright (C) 2008 Andy Wingo @@ -30,52 +30,10 @@ exec guile $GUILE_FLAGS -l $0 -e main "$@" ;;hack! -(debug-enable 'backtrace) -(use-modules (tekuti git) - (tekuti page) - (tekuti util) - (tekuti post) - (tekuti categories) - (tekuti mod-lisp) - (tekuti web)) - -(define (handle-request headers post-data index) - (let-headers headers ((method "method") (path "url")) - (url-relative-path-case - method path - ((POST admin new-post) - (unimplemented 'new-post)) - ((POST admin modify-post) - (unimplemented 'modify-post)) - ((POST admin new-comment) - (unimplemented 'new-comment)) - ((POST admin delete-comment) - (unimplemented 'delete-comment)) - ((POST admin delete-post) - (unimplemented 'delete-post)) - ((GET) - (unimplemented 'index)) - ((GET archives year? month? day? post?) - (unimplemented 'archives)) - ((GET debug) - (page-debug headers)) - ((POST search) - (unimplemented 'search)) - (else (page-not-found path))))) - -(define (maybe-reindex old-master old-index) - (let ((master (git-rev-parse "master"))) - (values - master - (if (equal? master old-master) - old-index - (acons 'master master - (map (lambda (k reindex) - (cons k (reindex master))) - (list 'posts 'categories) - (list reindex-posts reindex-categories))))))) - +(turn-on-debugging) +(use-modules (tekuti boot)) (define (main args) - (ensure-git-repo) - (event-loop handle-request maybe-reindex)) + (start-stack 'tekuti + (boot args))) + -- cgit v1.2.3-54-g00ecf