-
Notifications
You must be signed in to change notification settings - Fork 3
/
files.rkt
37 lines (29 loc) · 915 Bytes
/
files.rkt
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
#lang racket
(provide html-file-table
files
current-image-files
add-image-file!)
(require racket/runtime-path
(for-syntax racket))
(module files-mod racket
(provide file-table)
(define file-table
'(
("Home" . "index.rkt")
("Download" . "download.rkt")
("Documentation" . "documentation.rkt")
("Community" . "community.rkt")
)))
(require 'files-mod
(for-syntax 'files-mod))
(define-runtime-path-list files
(dict-values file-table))
(define html-file-table
(for/list ([f (in-list (dict-keys file-table))]
[v (in-list (dict-values file-table))])
(cons f (path-replace-suffix v ".html"))))
(define current-image-files* '())
(define (current-image-files)
current-image-files*)
(define (add-image-file! file)
(set! current-image-files* (cons file current-image-files*)))