Changeset 36104 in project


Ignore:
Timestamp:
08/11/18 00:01:54 (13 months ago)
Author:
sjamaan
Message:

Port qwiki to CHICKEN 5

Location:
release/5/qwiki
Files:
1 added
2 deleted
9 edited
2 copied

Legend:

Unmodified
Added
Removed
  • release/5/qwiki/trunk/qwiki-install.scm

    r32678 r36104  
    22;; qwiki-install - installation script for the quick wiki
    33;;
    4 ;; Copyright (c) 2009-2012 Peter Bex and Ivan Raikov
     4;; Copyright (c) 2009-2018 Peter Bex and Ivan Raikov
    55;;
    66;;  Redistribution and use in source and binary forms, with or without
     
    3737  (qwiki-install! qwiki-pre-install-handlers)
    3838
    39 (import chicken scheme)
    40 (use qwiki-svn posix srfi-13 qwiki)
     39(import scheme (chicken base) (chicken file) (chicken file posix)
     40        qwiki qwiki-svn srfi-13)
    4141
    4242(define (traverse-file-tree base-path)
  • release/5/qwiki/trunk/qwiki-menu.scm

    r26108 r36104  
    44;; The menu is itself a wiki file so it can be easily maintained.
    55;;
    6 ;; Copyright (c) 2009-2012 Peter Bex
     6;; Copyright (c) 2009-2018 Peter Bex
    77;;
    88;;  Redistribution and use in source and binary forms, with or without
     
    3939        (menu-install! menu-file)
    4040
    41 (import chicken scheme)
    42 (use data-structures files svnwiki-sxml qwiki qwiki-sxml sxml-transforms)
     41(import scheme (chicken base) (chicken string) (chicken file)
     42        (chicken pathname) qwiki svnwiki-sxml sxml-transforms)
    4343
    4444(define menu-file (make-parameter "/menu"))
  • release/5/qwiki/trunk/qwiki-nowiki.scm

    r26108 r36104  
    4040        (nowiki-install!)
    4141
    42 (import chicken scheme)
    43 (use data-structures qwiki qwiki-sxml  sxml-transforms)
     42(import scheme qwiki sxml-transforms)
    4443
    4544(define nowiki-rules
  • release/5/qwiki/trunk/qwiki-post-commit-hook.scm

    r26108 r36104  
    22;; qwiki-post-commit-hook - updater script for the quick wiki
    33;;
    4 ;; Copyright (c) 2009-2012 Peter Bex and Ivan Raikov
     4;; Copyright (c) 2009-2018 Peter Bex and Ivan Raikov
    55;;
    66;;  Redistribution and use in source and binary forms, with or without
     
    3737  (qwiki-post-commit-hook!)
    3838
    39 (import scheme chicken data-structures files)
    40 (use srfi-13 posix svn-client qwiki-svn qwiki-sxml qwiki uri-common)
     39(import scheme (chicken base) (chicken pathname) (chicken string)
     40        (chicken file) (chicken file posix)
     41        srfi-13 svn-client qwiki-svn qwiki-sxml qwiki uri-common)
    4142
    4243(define (string-drop-prefix s p)
  • release/5/qwiki/trunk/qwiki-search.scm

    r32671 r36104  
    22;; qwiki-search - search extension for qwiki
    33;;
    4 ;; Copyright (c) 2009-2012 Peter Bex
     4;; Copyright (c) 2009-2018 Peter Bex
    55;;
    66;;  Redistribution and use in source and binary forms, with or without
     
    3838         wiki-page->estraier-doc)
    3939
    40 (import chicken scheme)
    41 (use data-structures extras srfi-1 srfi-13 intarweb uri-common spiffy
    42      qwiki qwiki-sxml sxml-transforms sxpath sxpath-lolevel
    43      estraier-client irregex qwiki-install)
     40(import scheme (chicken base) (chicken process-context) (chicken irregex)
     41        (chicken condition) (chicken format) (chicken string)
     42        srfi-1 srfi-13 sxml-transforms sxpath sxpath-lolevel
     43        estraier-client uri-common intarweb qwiki spiffy
     44        qwiki-install)
    4445
    4546(define search-server-uri
  • release/5/qwiki/trunk/qwiki-svn.scm

    r33983 r36104  
    4040   get-extended-property get-last-modified-revision)
    4141
    42 (import chicken scheme)
    43 (use data-structures regex posix files svn-client)
     42(import scheme svn-client (chicken time posix) (chicken base)
     43        (chicken condition) (chicken file) (chicken file posix)
     44        (chicken pathname) (chicken irregex))
    4445
    4546;; The version control system's repos uri, username and password
     
    6263           ;; What about the timezone?  Is it always GMT?  POSIX strptime
    6364           ;; doesn't know about this so we may need to use srfi-19...
    64            (let* ((seconds-date (string-substitute "\\.[0-9]+.*" ""
    65                                                    (svn-log-date entry)))
     65           (let* ((seconds-date (irregex-replace
     66                                 "\\.[0-9]+.*" (svn-log-date entry)))
    6667                  (date (string->time (svn-log-date entry) "%Y-%m-%dT%H:%M")))
    6768             (list (svn-log-revision entry)
  • release/5/qwiki/trunk/qwiki-sxml.scm

    r33985 r36104  
    3939 qwiki-html-transformation-rules)
    4040
    41 (import chicken scheme)
    42 
    43 (use posix srfi-1 srfi-13 data-structures extras irregex)
    44 (use sxml-transforms doctype sxpath colorize html-parser)
     41(import scheme (chicken base) (chicken irregex) (chicken condition)
     42        (chicken string) (chicken time posix)
     43        srfi-1 srfi-13 sxpath sxml-transforms html-parser colorize)
    4544
    4645;; Try to extract a meaningful title from the page contents
     
    370369    ((html:begin
    371370      . ,(lambda (tag elems)
    372            (list xhtml-1.0-strict
     371           (list "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">"
    373372                 "<html xmlns=\"http://www.w3.org/1999/xhtml\">"
    374373                 elems
  • release/5/qwiki/trunk/qwiki.egg

    r36090 r36104  
    22
    33((synopsis "qwiki - the quick wiki")
    4  (depends (intarweb "1.0") (uri-common "1.0") (spiffy "5.1") (doctype "1.2")
    5           (sxml-transforms "1.4") (svn-client "0.23") estraier-client
    6           sxpath (message-digest "3.0.0") (sha1 "3.0.0") (svnwiki-sxml 0.2.1)
    7           html-parser colorize)
    8  (test-depends test)
     4 (dependencies intarweb uri-common spiffy
     5               sxml-transforms svn-client estraier-client
     6               sxpath simple-sha1 svnwiki-sxml
     7               html-parser colorize srfi-1 srfi-13 srfi-14)
     8 (test-dependencies test)
    99 (author "Peter Bex")
    1010 (category web)
    11  (license "BSD"))
     11 (license "BSD")
     12 (components
     13  (extension qwiki-sxml)
     14  (extension qwiki-svn)
     15  (extension qwiki (component-dependencies qwiki-sxml qwiki-svn))
     16  (extension qwiki-install (component-dependencies qwiki qwiki-svn))
     17  ;; Optional modules
     18  (extension qwiki-search (component-dependencies
     19                           qwiki-sxml qwiki qwiki-install))
     20  (extension qwiki-menu (component-dependencies qwiki qwiki-sxml))
     21  (extension qwiki-post-commit-hook (component-dependencies
     22                                     qwiki qwiki-svn qwiki-sxml))
     23  (extension qwiki-nowiki (component-dependencies qwiki qwiki-sxml))))
  • release/5/qwiki/trunk/qwiki.scm

    r33985 r36104  
    22;; qwiki - the quick wiki
    33;;
    4 ;; Copyright (c) 2009-2017 Peter Bex and Ivan Raikov
     4;; Copyright (c) 2009-2018 Peter Bex and Ivan Raikov
    55;;
    66;;  Redistribution and use in source and binary forms, with or without
     
    6464   )
    6565
    66 (import chicken scheme)
    67 (use extras files posix ports data-structures srfi-1 srfi-13 srfi-14
    68      intarweb uri-common spiffy sxml-transforms sxpath
    69      svnwiki-sxml qwiki-sxml doctype sha1 message-digest
    70      ;; There should be a way to parameterize the versioning implementation
    71      qwiki-svn)
     66(import scheme (chicken base) (chicken pathname) (chicken string)
     67        (chicken file) (chicken process-context) (chicken file posix)
     68        (chicken port) (chicken format) (chicken condition)
     69        (chicken io) (chicken time) (chicken random)
     70        srfi-1 srfi-13 srfi-14 uri-common intarweb spiffy simple-sha1
     71        sxml-transforms svnwiki-sxml qwiki-sxml
     72        ;; There should be a way to parameterize the versioning implementation
     73        qwiki-svn)
    7274
    7375;; HTML files are stored here, relative to the current Spiffy docroot
     
    358360         (make-spam-control-hash
    359361          (lambda (answer time)
    360             (message-digest-string
    361              (sha1-primitive)
     362            (string->sha1sum
    362363             (sprintf "Answer: ~A for file ~A (r~A by ~A) at ~A"
    363364                      answer source-file file-rev file-author time))))
     
    434435                     ,(if auth-required ;; No point in including a spam check
    435436                          `(div)
    436                           (let* ((op (vector-ref '#(+ - *) (random 3)))
    437                                  (a (random (if (eq? op '*) 10 25)))
    438                                  (b (random (if (eq? op '*) 10 25)))
     437                          (let* ((op (vector-ref
     438                                      '#(+ - *)
     439                                      (pseudo-random-integer 3)))
     440                                 (a (pseudo-random-integer
     441                                     (if (eq? op '*) 10 25)))
     442                                 (b (pseudo-random-integer
     443                                     (if (eq? op '*) 10 25)))
    439444                                 (res ((case op ((+) +) ((-) -) ((*) *)) a b))
    440445                                 (time (->string (current-seconds))))
  • release/5/qwiki/trunk/tests/run.scm

    r32669 r36104  
    1 (require-extension test qwiki-sxml sxml-transforms svnwiki-sxml)
     1(import (chicken string) (chicken pretty-print) srfi-1
     2        test qwiki-sxml sxml-transforms svnwiki-sxml)
    23
    34;; From sxml-fu
Note: See TracChangeset for help on using the changeset viewer.