1
0
Fork 0

remove trailing whitespace

This commit is contained in:
Andy Wingo 2012-02-12 20:48:50 +01:00
parent 29a6144123
commit 82c7790016
18 changed files with 222 additions and 222 deletions

View file

@ -1,17 +1,17 @@
;; Tekuti ;; Tekuti
;; Copyright (C) 2008, 2010 Andy Wingo <wingo at pobox dot com> ;; Copyright (C) 2008, 2010, 2012 Andy Wingo <wingo at pobox dot com>
;; Copyright (C) 2009 Andreas Rottmann <a dot rottmann at gmx dot at> ;; Copyright (C) 2009 Andreas Rottmann <a dot rottmann at gmx dot at>
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3 of ;; published by the Free Software Foundation; either version 3 of
;; the License, or (at your option) any later version. ;; the License, or (at your option) any later version.
;; ;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;; ;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact: ;; along with this program; if not, contact:
;; ;;
@ -35,7 +35,7 @@
(define (int->b64-byte i) (define (int->b64-byte i)
(bytevector-u8-ref b64-bytes (logand i 63))) (bytevector-u8-ref b64-bytes (logand i 63)))
(define b64-byte-ranges (define b64-byte-ranges
(map cons (map cons
(map char->integer '(#\A #\a #\0 #\+ #\/)) (map char->integer '(#\A #\a #\0 #\+ #\/))

View file

@ -1,16 +1,16 @@
;; Tekuti ;; Tekuti
;; Copyright (C) 2008, 2010 Andy Wingo <wingo at pobox dot com> ;; Copyright (C) 2008, 2010, 2012 Andy Wingo <wingo at pobox dot com>
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3 of ;; published by the Free Software Foundation; either version 3 of
;; the License, or (at your option) any later version. ;; the License, or (at your option) any later version.
;; ;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;; ;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact: ;; along with this program; if not, contact:
;; ;;
@ -45,7 +45,7 @@
(let ((required (and=> (assq 'required (cdr opt)) cadr))) (let ((required (and=> (assq 'required (cdr opt)) cadr)))
(format #f "~:[[~;~]--~a~@*~:[]~;~]" (format #f "~:[[~;~]--~a~@*~:[]~;~]"
(assq 'required? (cdr opt)) (car opt)))) (assq 'required? (cdr opt)) (car opt))))
(format #t "usage: tekuti ~{~a~^ ~}~%" (format #t "usage: tekuti ~{~a~^ ~}~%"
(map repr-option *option-grammar*))) (map repr-option *option-grammar*)))

View file

@ -1,16 +1,16 @@
;; Tekuti ;; Tekuti
;; Copyright (C) 2010 Andy Wingo <wingo at pobox dot com> ;; Copyright (C) 2010, 2012 Andy Wingo <wingo at pobox dot com>
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3 of ;; published by the Free Software Foundation; either version 3 of
;; the License, or (at your option) any later version. ;; the License, or (at your option) any later version.
;; ;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;; ;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact: ;; along with this program; if not, contact:
;; ;;
@ -34,7 +34,7 @@
#:export (make-empty-cache #:export (make-empty-cache
cached-response-and-body cached-response-and-body
update-cache)) update-cache))
(define (cacheable-request? request) (define (cacheable-request? request)
(and (memq (request-method request) '(GET HEAD)) (and (memq (request-method request) '(GET HEAD))
(not (request-authorization request)) (not (request-authorization request))

View file

@ -1,16 +1,16 @@
;; Tekuti ;; Tekuti
;; Copyright (C) 2008, 2010 Andy Wingo <wingo at pobox dot com> ;; Copyright (C) 2008, 2010, 2012 Andy Wingo <wingo at pobox dot com>
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3 of ;; published by the Free Software Foundation; either version 3 of
;; the License, or (at your option) any later version. ;; the License, or (at your option) any later version.
;; ;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;; ;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact: ;; along with this program; if not, contact:
;; ;;
@ -127,7 +127,7 @@
(let ((content (assoc-ref post-data "comment")) (let ((content (assoc-ref post-data "comment"))
(author (assoc-ref post-data "author")) (author (assoc-ref post-data "author"))
(email (assoc-ref post-data "email")) (email (assoc-ref post-data "email"))
(url (assoc-ref post-data "url"))) (url (assoc-ref post-data "url")))
(let ((sha1 (with-output-to-blob (let ((sha1 (with-output-to-blob
(for-each (for-each
(lambda (pair) (lambda (pair)

View file

@ -1,16 +1,16 @@
;; Tekuti ;; Tekuti
;; Copyright (C) 2008, 2010 Andy Wingo <wingo at pobox dot com> ;; Copyright (C) 2008, 2010, 2012 Andy Wingo <wingo at pobox dot com>
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3 of ;; published by the Free Software Foundation; either version 3 of
;; the License, or (at your option) any later version. ;; the License, or (at your option) any later version.
;; ;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;; ;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact: ;; along with this program; if not, contact:
;; ;;

View file

@ -1,16 +1,16 @@
;; Tekuti ;; Tekuti
;; Copyright (C) 2008, 2010, 2011 Andy Wingo <wingo at pobox dot com> ;; Copyright (C) 2008, 2010, 2011, 2012 Andy Wingo <wingo at pobox dot com>
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3 of ;; published by the Free Software Foundation; either version 3 of
;; the License, or (at your option) any later version. ;; the License, or (at your option) any later version.
;; ;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;; ;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact: ;; along with this program; if not, contact:
;; ;;
@ -51,7 +51,7 @@
(cons x (or p '())))) (cons x (or p '()))))
(define (pbreak p) (define (pbreak p)
(if p (cons '(br) p) p)) (if p (cons '(br) p) p))
(let* ((head (if (and (pair? (car body)) (let* ((head (if (and (pair? (car body))
(eq? (caar body) '@)) (eq? (caar body) '@))
(list tag (car body)) (list tag (car body))

View file

@ -1,16 +1,16 @@
;; Tekuti ;; Tekuti
;; Copyright (C) 2008, 2010, 2011 Andy Wingo <wingo at pobox dot com> ;; Copyright (C) 2008, 2010, 2011, 2012 Andy Wingo <wingo at pobox dot com>
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3 of ;; published by the Free Software Foundation; either version 3 of
;; the License, or (at your option) any later version. ;; the License, or (at your option) any later version.
;; ;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;; ;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact: ;; along with this program; if not, contact:
;; ;;
@ -44,7 +44,7 @@
git-commit-tree git-rev-list git-revert git-commit-tree git-rev-list git-revert
munge-tree munge-tree1 parse-commit commit-utc-timestamp munge-tree munge-tree1 parse-commit commit-utc-timestamp
with-output-to-blob with-input-from-blob)) with-output-to-blob with-input-from-blob))
@ -65,7 +65,7 @@
;;; ;;;
;;; running git ;;; running git
;;; ;;;
(define *debug* #f) (define *debug* #f)
(define (trc . args) (define (trc . args)
@ -114,7 +114,7 @@
;;; ;;;
;;; git commands ;;; git commands
;;; ;;;
(define (is-dir? path) (define (is-dir? path)
(catch 'system-error (catch 'system-error
@ -215,9 +215,9 @@
(format #f "GIT_AUTHOR_DATE=~a +0100" timestamp)) (format #f "GIT_AUTHOR_DATE=~a +0100" timestamp))
(list "GIT_COMMMITTER=tekuti"))))) (list "GIT_COMMMITTER=tekuti")))))
;;; ;;;
;;; utilities ;;; utilities
;;; ;;;
;; unused. ;; unused.
(define (patch-blob sha1 patch) (define (patch-blob sha1 patch)

View file

@ -1,16 +1,16 @@
;; Tekuti ;; Tekuti
;; Copyright (C) 2008, 2010, 2012 Andy Wingo <wingo at pobox dot com> ;; Copyright (C) 2008, 2010, 2012 Andy Wingo <wingo at pobox dot com>
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3 of ;; published by the Free Software Foundation; either version 3 of
;; the License, or (at your option) any later version. ;; the License, or (at your option) any later version.
;; ;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;; ;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact: ;; along with this program; if not, contact:
;; ;;
@ -55,7 +55,7 @@
(define (index->blob key value) (define (index->blob key value)
(with-output-to-blob (with-output-to-blob
((assoc-list-ref index-specs key 2 write) value))) ((assoc-list-ref index-specs key 2 write) value)))
(define (blob->index name sha1) (define (blob->index name sha1)
(with-input-from-blob (with-input-from-blob
sha1 sha1

View file

@ -1,16 +1,16 @@
;; (match-bind) -- binding variables from regular expression matches ;; (match-bind) -- binding variables from regular expression matches
;; Copyright (C) 2007, 2009, 2010 Andy Wingo <wingo at pobox dot com> ;; Copyright (C) 2007, 2009, 2010, 2012 Andy Wingo <wingo at pobox dot com>
;; This program is free software: you can redistribute it and/or modify ;; This program is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by ;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or ;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version. ;; (at your option) any later version.
;; ;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;; ;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
@ -52,7 +52,7 @@
(if (or (= start -1) (= end -1)) (if (or (= start -1) (= end -1))
#f #f
(substring (vector-ref m 0) start end)))))) (substring (vector-ref m 0) start end))))))
(define *cache* (make-weak-key-hash-table)) (define *cache* (make-weak-key-hash-table))
(define (memoize-re regex) (define (memoize-re regex)
(cond (cond

View file

@ -1,16 +1,16 @@
;; Tekuti ;; Tekuti
;; Copyright (C) 2008, 2010, 2011 Andy Wingo <wingo at pobox dot com> ;; Copyright (C) 2008, 2010, 2011, 2012 Andy Wingo <wingo at pobox dot com>
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3 of ;; published by the Free Software Foundation; either version 3 of
;; the License, or (at your option) any later version. ;; the License, or (at your option) any later version.
;; ;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;; ;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact: ;; along with this program; if not, contact:
;; ;;
@ -108,7 +108,7 @@
(define (write-headers/mod-lisp headers port) (define (write-headers/mod-lisp headers port)
(for-each (for-each
(lambda (pair) (lambda (pair)
(write-header/mod-lisp (car pair) (cdr pair) port)) (write-header/mod-lisp (car pair) (cdr pair) port))
headers)) headers))

View file

@ -1,16 +1,16 @@
;; Tekuti ;; Tekuti
;; Copyright (C) 2008, 2010, 2012 Andy Wingo <wingo at pobox dot com> ;; Copyright (C) 2008, 2010, 2012 Andy Wingo <wingo at pobox dot com>
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3 of ;; published by the Free Software Foundation; either version 3 of
;; the License, or (at your option) any later version. ;; the License, or (at your option) any later version.
;; ;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;; ;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact: ;; along with this program; if not, contact:
;; ;;
@ -113,7 +113,7 @@
(define* (relative-url uri path-components #:key query fragment) (define* (relative-url uri path-components #:key query fragment)
(uri->string (uri->string
(build-uri (uri-scheme uri) (build-uri (uri-scheme uri)
#:userinfo (uri-userinfo uri) #:host (uri-host uri) #:userinfo (uri-userinfo uri) #:host (uri-host uri)
#:port (uri-port uri) #:port (uri-port uri)
#:path (encode-and-join-uri-path #:path (encode-and-join-uri-path
(append (split-and-decode-uri-path (uri-path uri)) (append (split-and-decode-uri-path (uri-path uri))
@ -236,7 +236,7 @@
(value "Submit Comment")))))) (value "Submit Comment"))))))
(define (comments-sxml-content-edit post) (define (comments-sxml-content-edit post)
(map (map
(lambda (comment) (lambda (comment)
(let ((id (assq-ref comment 'key))) (let ((id (assq-ref comment 'key)))
`(,(comment-sxml-content comment) `(,(comment-sxml-content comment)
@ -246,7 +246,7 @@
(input (@ (type "submit") (name "delete") (value "delete")))) (input (@ (type "submit") (name "delete") (value "delete"))))
(br)))) (br))))
(post-comments post))) (post-comments post)))
(define (post-sxml-comments post) (define (post-sxml-comments post)
(let ((comments (post-comments post)) (let ((comments (post-comments post))
(comments-open? (post-comments-open? post))) (comments-open? (post-comments-open? post)))
@ -297,7 +297,7 @@
(if hash (if hash
(dsu-sort (dsu-sort
(take-max (take-max
(dsu-sort (dsu-sort
(hash-fold (lambda (k v seed) (acons k (length v) seed)) (hash-fold (lambda (k v seed) (acons k (length v) seed))
'() hash) '() hash)
cdr >) n) cdr >) n)

View file

@ -1,16 +1,16 @@
;; Tekuti ;; Tekuti
;; Copyright (C) 2008, 2010, 2011, 2012 Andy Wingo <wingo at pobox dot com> ;; Copyright (C) 2008, 2010, 2011, 2012 Andy Wingo <wingo at pobox dot com>
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3 of ;; published by the Free Software Foundation; either version 3 of
;; the License, or (at your option) any later version. ;; the License, or (at your option) any later version.
;; ;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;; ;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact: ;; along with this program; if not, contact:
;; ;;
@ -41,20 +41,20 @@
page-admin-posts page-admin-posts
page-admin-post page-admin-post
page-admin-new-post page-admin-new-post
page-admin-modify-post page-admin-modify-post
page-admin-delete-post page-admin-delete-post
page-admin-delete-comment page-admin-delete-comment
page-admin-changes page-admin-changes
page-admin-change page-admin-change
page-admin-revert-change page-admin-revert-change
page-index page-index
page-show-post page-show-post
page-new-comment page-new-comment
page-archives page-archives
page-show-tags page-show-tags
page-show-tag page-show-tag
page-debug page-debug
page-search page-search
page-feed-atom page-feed-atom
page-debug page-debug
page-not-found)) page-not-found))
@ -126,14 +126,14 @@
(let ((post (modify-post key (request-form-data request body)))) (let ((post (modify-post key (request-form-data request body))))
(respond `((p "redirecting...")) (respond `((p "redirecting..."))
#:redirect (admin-post-url post)))))) #:redirect (admin-post-url post))))))
(define (page-admin-delete-post request body index key) (define (page-admin-delete-post request body index key)
(with-authentication (with-authentication
request request
(lambda () (lambda ()
(delete-post (post-from-key index key #:allow-unpublished? #t)) (delete-post (post-from-key index key #:allow-unpublished? #t))
(respond `((p "redirecting...")) #:redirect (relurl `("admin")))))) (respond `((p "redirecting...")) #:redirect (relurl `("admin"))))))
(define (page-admin-delete-comment request body index key comment-id) (define (page-admin-delete-comment request body index key comment-id)
(with-authentication (with-authentication
request request
@ -141,8 +141,8 @@
(let ((post (post-from-key index key #:allow-unpublished? #t))) (let ((post (post-from-key index key #:allow-unpublished? #t)))
(delete-comment post comment-id) (delete-comment post comment-id)
(respond `((p "redirecting...")) #:redirect (admin-post-url post)))))) (respond `((p "redirecting...")) #:redirect (admin-post-url post))))))
(define (page-admin-changes request body index) (define (page-admin-changes request body index)
(with-authentication (with-authentication
request request
(lambda () (lambda ()
@ -160,7 +160,7 @@
#:query #:query
`(("start" . ,(caar (last-pair revs)))))))))))) `(("start" . ,(caar (last-pair revs))))))))))))
(define (page-admin-change request body index sha1) (define (page-admin-change request body index sha1)
(with-authentication (with-authentication
request request
(lambda () (lambda ()
@ -239,7 +239,7 @@
(lambda (post) #t))) (lambda (post) #t)))
(define (make-date-header post) (define (make-date-header post)
(lambda (x) #f)) (lambda (x) #f))
(let lp ((posts (latest-posts index #:limit -1))) (let lp ((posts (latest-posts index #:limit -1)))
(cond ((or (null? posts) (too-early? (car posts))) (cond ((or (null? posts) (too-early? (car posts)))
(respond `((h1 "No posts found") (respond `((h1 "No posts found")
@ -289,7 +289,7 @@
")") ")")
,@(map (lambda (post) `(p ,(post-link post))) ,@(map (lambda (post) `(p ,(post-link post)))
posts) posts)
,(related-tag-cloud tag index)) ,(related-tag-cloud tag index))
#:etag (assq-ref index 'master) #:etag (assq-ref index 'master)
#:title (string-append "posts tagged \"" tag "\"")) #:title (string-append "posts tagged \"" tag "\""))
(respond `((h2 "Unknown tag " ,tag) (respond `((h2 "Unknown tag " ,tag)
@ -361,7 +361,7 @@
(cont post))))) (cont post)))))
(lambda (post) #f) (lambda (post) #f)
without)) without))
(atom-feed-from-posts (atom-feed-from-posts
request body index request body index
(latest-posts index (latest-posts index

View file

@ -1,16 +1,16 @@
;; Tekuti ;; Tekuti
;; Copyright (C) 2008, 2010, 2011, 2012 Andy Wingo <wingo at pobox dot com> ;; Copyright (C) 2008, 2010, 2011, 2012 Andy Wingo <wingo at pobox dot com>
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3 of ;; published by the Free Software Foundation; either version 3 of
;; the License, or (at your option) any later version. ;; the License, or (at your option) any later version.
;; ;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;; ;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact: ;; along with this program; if not, contact:
;; ;;
@ -85,9 +85,9 @@
post post
#f))) #f)))
;;; ;;;
;;; accessors ;;; accessors
;;; ;;;
(define (post-published? post-alist) (define (post-published? post-alist)
(equal? (assq-ref post-alist 'status) "publish")) (equal? (assq-ref post-alist 'status) "publish"))
@ -145,7 +145,7 @@
'(timestamp tags status title name comment_status)))) '(timestamp tags status title name comment_status))))
(content (with-output-to-blob (display (assq-ref parsed 'body)))) (content (with-output-to-blob (display (assq-ref parsed 'body))))
(key (assq-ref parsed 'key)) (key (assq-ref parsed 'key))
(message (format #f "~a: \"~a\"" (message (format #f "~a: \"~a\""
(if old-key "post modified" "new post") (if old-key "post modified" "new post")
(assq-ref parsed 'title)))) (assq-ref parsed 'title))))
(define (maybe-rename ops) (define (maybe-rename ops)

View file

@ -1,16 +1,16 @@
;; Tekuti ;; Tekuti
;; Copyright (C) 2008, 2010, 2011, 2012 Andy Wingo <wingo at pobox dot com> ;; Copyright (C) 2008, 2010, 2011, 2012 Andy Wingo <wingo at pobox dot com>
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3 of ;; published by the Free Software Foundation; either version 3 of
;; the License, or (at your option) any later version. ;; the License, or (at your option) any later version.
;; ;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;; ;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact: ;; along with this program; if not, contact:
;; ;;

View file

@ -1,16 +1,16 @@
;; Tekuti ;; Tekuti
;; Copyright (C) 2008, 2010, 2012 Andy Wingo <wingo at pobox dot com> ;; Copyright (C) 2008, 2010, 2012 Andy Wingo <wingo at pobox dot com>
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3 of ;; published by the Free Software Foundation; either version 3 of
;; the License, or (at your option) any later version. ;; the License, or (at your option) any later version.
;; ;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;; ;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact: ;; along with this program; if not, contact:
;; ;;

View file

@ -1,16 +1,16 @@
;; Tekuti ;; Tekuti
;; Copyright (C) 2008, 2010 Andy Wingo <wingo at pobox dot com> ;; Copyright (C) 2008, 2010, 2012 Andy Wingo <wingo at pobox dot com>
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3 of ;; published by the Free Software Foundation; either version 3 of
;; the License, or (at your option) any later version. ;; the License, or (at your option) any later version.
;; ;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;; ;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact: ;; along with this program; if not, contact:
;; ;;

View file

@ -1,16 +1,16 @@
;; Tekuti ;; Tekuti
;; Copyright (C) 2008, 2010, 2011 Andy Wingo <wingo at pobox dot com> ;; Copyright (C) 2008, 2010, 2011, 2012 Andy Wingo <wingo at pobox dot com>
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3 of ;; published by the Free Software Foundation; either version 3 of
;; the License, or (at your option) any later version. ;; the License, or (at your option) any later version.
;; ;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;; ;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact: ;; along with this program; if not, contact:
;; ;;
@ -98,7 +98,7 @@
(display ch))) (display ch)))
str) str)
(display #\')))) (display #\'))))
(define (expanduser path) (define (expanduser path)
(let ((parts (string-split path #\/))) (let ((parts (string-split path #\/)))
(if (eqv? (string-ref (car parts) 0) #\~) (if (eqv? (string-ref (car parts) 0) #\~)

View file

@ -1,16 +1,16 @@
;; Tekuti ;; Tekuti
;; Copyright (C) 2008, 2010, 2011 Andy Wingo <wingo at pobox dot com> ;; Copyright (C) 2008, 2010, 2011, 2012 Andy Wingo <wingo at pobox dot com>
;; This program is free software; you can redistribute it and/or ;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as ;; modify it under the terms of the GNU General Public License as
;; published by the Free Software Foundation; either version 3 of ;; published by the Free Software Foundation; either version 3 of
;; the License, or (at your option) any later version. ;; the License, or (at your option) any later version.
;; ;;
;; This program is distributed in the hope that it will be useful, ;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details. ;; GNU General Public License for more details.
;; ;;
;; You should have received a copy of the GNU General Public License ;; You should have received a copy of the GNU General Public License
;; along with this program; if not, contact: ;; along with this program; if not, contact:
;; ;;
@ -32,7 +32,7 @@
#:use-module (tekuti page) #:use-module (tekuti page)
#:use-module (tekuti config) #:use-module (tekuti config)
#:export (main-loop)) #:export (main-loop))
(define (choose-handler request) (define (choose-handler request)
(request-path-case (request-path-case
request request