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))))