aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/update-makefile.scm16
1 files changed, 8 insertions, 8 deletions
diff --git a/build/update-makefile.scm b/build/update-makefile.scm
index 939b87b..4eea4f3 100644
--- a/build/update-makefile.scm
+++ b/build/update-makefile.scm
@@ -18,11 +18,11 @@
#:use-module (rnrs base))
;; Input https://blog.replicant.us/2023/12/replicant-37c3/
-;; Ouptut: markdown/2023_12_replicant-37c3.md
+;; Ouptut: posts/2023_12_replicant-37c3.md
(define-public (html-to-markdown url)
"""Convert an URL like https://blog.replicant.us/2023/12/replicant-37c3/
to the corresponding markdown file path like
- markdown/2023_12_replicant-37c3.md"""
+ posts/2023_12_replicant-37c3.md"""
;; Output: replicant-37c3
(define page
@@ -36,11 +36,11 @@
(define month
(list-ref (string-split url #\/) 4))
- (string-append "markdown/" year "_" month "_" page ".md"))
+ (string-append "posts/" year "_" month "_" page ".md"))
(define-public (get-markdown-article-lines port)
"""Generate the list of lines like
- '\tmarkdown/2023_12_replicant-37c3.md \\' from links.txt."""
+ '\tposts/2023_12_replicant-37c3.md \\' from links.txt."""
(define lines '())
(define (func port lines)
(let ((line (get-line port)))
@@ -57,7 +57,7 @@
(define-public (generate-new-makefile generated-text)
"""Generate a Makefile with the generated-text instead to replace the
- 'MARKDOWN_ARTICLES = [...]' part of the Makefile."""
+ 'POSTS = [...]' part of the Makefile."""
(define lines '())
(define (process-makefile port)
(define print? #t)
@@ -66,7 +66,7 @@
(if (eof-object? line)
(reverse lines)
((lambda _
- (if (string=? line "MARKDOWN_ARTICLES = \\")
+ (if (string=? line "POSTS = \\")
(set! print? #f))
(if print?
(set! lines (cons (string-append line "\n") lines)))
@@ -81,7 +81,7 @@
(define-public new-markdown-articles-text
(generate-new-makefile
(string-append
- "MARKDOWN_ARTICLES = \\\n"
+ "POSTS = \\\n"
(string-join
(call-with-input-file "links.txt" get-markdown-article-lines)
"")
@@ -103,7 +103,7 @@
(assert
(string=?
(html-to-markdown "https://blog.replicant.us/2023/12/replicant-37c3/")
- "markdown/2023_12_replicant-37c3.md"))))
+ "posts/2023_12_replicant-37c3.md"))))
(list
"get-markdown-article-lines"