about summary refs log tree commit diff stats
path: root/wikme.sld
blob: abd0e4e3fe6a66724d9c607aa08e91e758a2260e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
(cond-expand
  (r7rs)
  (chicken-5
   (import (r7rs))))

(define-library wikme
  (import (scheme))
  (cond-expand
    (chicken-5 (import (chicken base)
                       (chicken file)
                       (chicken file posix)
                       (chicken format)
                       (chicken io)
                       (chicken irregex)
                       (chicken pathname)
                       (chicken port)
                       (chicken process)
                       (chicken process-context)
                       (chicken string)
                       (chicken time posix)
                       (cmark)
                       (regex)          ; XXX: deprecated upstream
                       (srfi-13)))
    (else (error "Wikme doesn't support this R7RS scheme implementation yet.")))

  ;; <wiki>
  (export <wiki>
          wiki-base-url
          wiki-origin-dir
          wiki-destination-dir
          wiki-pages
          wiki-defaults
          wiki-default-ref
          wiki-default-set!)

  ;; <page>
  (export <page>
          page-source
          page-body
          page-origin
          page-destination
          page-template
          page-source-transformers
          page-path-transformers
          page-wiki
          page-meta
          page-meta-ref
          page-meta-set!)

  ;; transformers
  (export transform
          transform-source!
          transform-path!
          page-cmark->html)

  ;; templates
  (export render-template
          env->replacements
          render)

  ;; links
  (export wiki-link-sre
          wikify-links
          linkify
          slugify
          string-capitalize
          unslugify
          path-relativize
          wiki-page-origin-path
          wiki-page-destination-path)

  ;; page building
  (export file->page
          guess-title
          basename
          indexify
          guess-last-updated
          page->file
          build-wiki)

  (include "wikme.ss"))