fixing gopher title - cl-yag - Common Lisp Yet Another website Generator | |
git clone git://bitreich.org/cl-yag/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
LICENSE | |
--- | |
commit 0beb1a03cf6a8f8aa14c515b74938bddc7b33fbe | |
parent b0fb013bac0ad806bc90e487b552d3affa7f7413 | |
Author: Solène Rapenne <[email protected]> | |
Date: Fri, 24 Mar 2017 13:07:52 +0100 | |
fixing gopher title | |
Diffstat: | |
M generator.lisp | 30 ++++++++++++++++++++---------- | |
1 file changed, 20 insertions(+), 10 deletions(-) | |
--- | |
diff --git a/generator.lisp b/generator.lisp | |
@@ -186,16 +186,26 @@ | |
(let ((output (load-file "template/gopher_head.tpl"))) | |
(dolist (article *articles*) | |
(setf output | |
- (concatenate 'string output | |
- (format nil "~a by ~a (~a) ~%0~a /a… | |
- (getf article :date) | |
- (getf article :author (getf *confi… | |
- (format nil "~{#~a ~}" (split-str … | |
- (getf article :title) | |
- (getf article :id) | |
- (getf *config* :gopher-server) | |
- (getf *config* :gopher-port) | |
- )))) | |
+ (string | |
+ (concatenate 'string output | |
+ (format nil "0~a ~a/article-~d.txt… | |
+ | |
+ ;; here we create a 80 width char… | |
+ ;; and date on the right | |
+ ;; we truncate the article title … | |
+ (let ((title (format nil "~80a" | |
+ (if (< 80 (l… | |
+ (subseq … | |
+ (getf arti… | |
+ (replace title (getf article :d… | |
+ | |
+ | |
+ (getf *config* :gopher-path) | |
+ (getf article :id) | |
+ (getf *config* :gopher-server) | |
+ (getf *config* :gopher-port) | |
+ ))))) | |
+ | |
output)) | |
;; produce each article file (only a copy/paste in fact) |