From 7c9774e11a9e86d8a492f6806c2dde6175abaaa3 Mon Sep 17 00:00:00 2001 From: Ray Miller Date: Wed, 28 Aug 2024 16:17:45 +0100 Subject: [PATCH] Rename functions for clarity. --- guile/de-blogger.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/guile/de-blogger.scm b/guile/de-blogger.scm index 70b90c2..a141ad7 100755 --- a/guile/de-blogger.scm +++ b/guile/de-blogger.scm @@ -70,7 +70,7 @@ (list-matches md-img-rx doc)) doc) -(define (replace-links doc) +(define (replace-image-links doc) (for-each (lambda (m) (let* ((url (match:substring m 1)) (filename (download-image url)) @@ -79,7 +79,7 @@ (list-matches md-img-link-rx doc)) doc) -(define (replace-amazon-tracking-images doc) +(define (remove-amazon-tracking-images doc) (for-each (lambda (m) (set! doc (string-replace-substring doc (match:substring m) ""))) (list-matches amazon-assoc-img-rx doc)) @@ -102,10 +102,10 @@ (define (process-file path) (format #t "process-file ~a~%" path) (let ((doc (chain (call-with-input-file path get-string-all) - (replace-amazon-tracking-images _) + (remove-amazon-tracking-images _) (remove-amazon-links _) (replace-images _) - (replace-links _) + (replace-image-links _) (replace-self-links _)))) (call-with-output-file path (cut put-string <> doc))))