diff options
author | Ekaitz Zarraga <ekaitz@elenq.tech> | 2023-10-04 20:44:16 +0200 |
---|---|---|
committer | Ekaitz Zarraga <ekaitz@elenq.tech> | 2023-10-04 20:49:17 +0200 |
commit | 959d4fd10f365bbb1cbba1de367544d519274b8e (patch) | |
tree | a745ebd51b2c3ed8741f68491fe875e00f74c9e8 /README.md | |
parent | bd6db7b4a2985e7ad5fd189fd005ce1ec5ce83b3 (diff) |
media-list: Make `as` module for listing media
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -21,18 +21,20 @@ The following script shows one way to do it: (define root (canonicalize-path (cadr (command-line)))) (define atom-feed (lambda () (atom:render (as 'atom root)))) -(define html-index (lambda () (html:render (as 'html root)))) - (atom-feed) ;; writes your feed to current-output-port + +(define html-index (lambda () (html:render (as 'html root)))) (html-index) ;; writes your html to current-output-port + +(define media-list (as 'media-list root)) ;; list of media files in your site ``` `(as 'atom root)` and `(as 'html root)` the scheme file in `root` and interpret it as atom and html respectively. From that, the result can be generated calling the `render` function of the modules as suggested in the example. -There's also a `media-uploader` module that would upload all the independent -media to the server, but it's still a WIP. +`(as 'media-list root)` returns an association list with the car set to the +path in the filesystem and the cdr to the uri of each media file. ## Format |