blob: 8c6d377c28ff3407e0bbe0fcc01083118a34437d (
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
;*=====================================================================*/
;* serrano/prgm/project/skribe/doc/dir/dir.skb */
;* ------------------------------------------------------------- */
;* Author : Manuel Serrano */
;* Creation : Wed Nov 28 10:37:39 2001 */
;* Last change : Thu Jan 1 17:12:43 2004 (serrano) */
;* Copyright : 2001-04 Manuel Serrano */
;* ------------------------------------------------------------- */
;* The Skribe directory */
;*=====================================================================*/
;*---------------------------------------------------------------------*/
;* The Skribe documentation style */
;*---------------------------------------------------------------------*/
(skribe-load "web-book.skr")
(skribe-load "skr/env.skr")
(skribe-load "skr/manual.skr")
(skribe-load "skr/api.skr")
;*---------------------------------------------------------------------*/
;* Html configuration */
;*---------------------------------------------------------------------*/
(let ((he (find-engine 'html)))
(engine-custom-set! he 'web-book-main-browsing-extra
(lambda (n e)
(table :width 100. :border 0 :cellspacing 0 :cellpadding 0
(tr (td :align 'left :valign 'top (bold "Skribe: "))
(td :align 'right :valign 'top
(ref :url *skribe-user-doc-url*
:text "User Manual")))))))
;*---------------------------------------------------------------------*/
;* The global index */
;*---------------------------------------------------------------------*/
(define *sui-index* (make-index "sui"))
;*---------------------------------------------------------------------*/
;* index-sui ... */
;*---------------------------------------------------------------------*/
(define (index-sui sui dir)
(sui-filter sui
(lambda (s)
(and (pair? s) (eq? (car s) 'marks)))
(lambda (e)
(let ((f (memq :file e))
(k (memq :mark e))
(c (memq :class e)))
(when (and (pair? f)
(pair? k)
(pair? c)
(string=? (cadr c) "public-definition"))
(index :index *sui-index*
:url (format "~a/~a#~a" dir (cadr f) (cadr k))
(cadr k)))
#f))))
;*---------------------------------------------------------------------*/
;* Intern all the sui files */
;*---------------------------------------------------------------------*/
(define extensions '())
(let loop ((files (directory->list "html")))
(when (pair? files)
(if (string=? (suffix (car files)) "sui")
(let* ((f (string-append "html/" (car files)))
(sui (load-sui f)))
(if (not (string=? (car files) "user.sui"))
(set! extensions (cons sui extensions)))
(index-sui sui (dirname (car files)))))
(loop (cdr files))))
(let loop ((files (directory->list ".")))
(when (pair? files)
(if (string=? (suffix (car files)) "sui")
(let* ((f (car files))
(sui (load-sui f)))
(if (not (string=? (car files) "user.sui"))
(set! extensions (cons sui extensions)))
(index-sui sui (dirname f))))
(loop (cdr files))))
;*---------------------------------------------------------------------*/
;* The document */
;*---------------------------------------------------------------------*/
(document :title "Skribe directory"
:author (list (author :name "Erick Gallesio"
:affiliation "Universit� de Nice - Sophia Antipolis"
:address '("930 route des Colles, BP 145"
"F-06903 Sophia Antipolis, Cedex"
"France")
:email (mailto "eg@essi.fr"))
(author :name "Manuel Serrano"
:affiliation "Inria Sophia-Antipolis"
:address `("2004 route des Lucioles - BP 93"
"F-06902 Sophia Antipolis, Cedex"
"France")
:url (ref :url *serrano-url*)
:email (mailto *serrano-mail*)))
(linebreak 1)
;;; extensions
(if (pair? extensions)
(section :title "Installed extensions" :number #f
(itemize (map (lambda (e)
(item :key (ref :url (sui-file e) :text (sui-title e))
(let ((d (sui-key e :description)))
(if d (list ": " d) #f))))
extensions))))
;;; global Index
(section :title "Global Markup Index" :number #f
(mark "global index")
(the-index :column 3 *sui-index*)))
|