26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
+
|
"dust.rkt")
;; ~~~ Provides ~~~
(provide spell-of-summoning!
crystalize-article!
crystalize-series!
crystalize-index-entries!
article-plain-title
list/articles
list/articles+notes
listing<>-short/articles
listing<>-full/articles
listing<>-full/articles+notes
unfence
|
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
|
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
|
-
+
|
;; "entry!sub" → '("entry" "sub")
;; "entry!sub!why?!? '("entry" "sub")
(define (split-entry str)
(define splits (string-split str "!"))
(list (car splits)
(cadr (append splits (list "")))))
;; (private) Save any index entries in doc to the SQLite cache
;; Save any index entries in doc to the SQLite cache.
;; Sub-entries are specified by "!" in the index key
(define (crystalize-index-entries! pagenode doc)
(define (index-entry? tx)
(and (txexpr? tx)
(string=? "index-link" (attr-ref tx 'class "")) ; see definition of html-index
(attr-ref tx 'data-index-entry #f)))
(define-values (_ entries) (splitf-txexpr doc index-entry?))
|