From b53376d1d25455fe19a61775b0e349b2b3f6b899 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann <10477760+JadedCtrl@users.noreply.github.com> Date: Mon, 27 May 2024 23:14:33 -0500 Subject: [PATCH] Formatting tweaks (no functional changes) --- mirror-img.lisp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/mirror-img.lisp b/mirror-img.lisp index 3983edf..751f5f3 100644 --- a/mirror-img.lisp +++ b/mirror-img.lisp @@ -1,3 +1,5 @@ +;;;; mirror-img: Mirror an HTML page’s remote images, CSS, etc. + ;; Copyright © 2024 Jaidyn Ann ;; ;; This program is free software: you can redistribute it and/or @@ -42,7 +44,6 @@ Returns a string of the modified page’s HTML." (append *src-tags* *href-tags*)) (aref (lquery:$ dom (serialize)) 0))) - ;; lquery-dom list pathname → alist (defun mirror-linked-urls (dom &optional (tags '("link" "img" "script")) base-dir) "Mirror all URLs in the HREF/SRC attributes of the given tags in an LQuery @@ -61,7 +62,6 @@ For example: (cons url download-path)))) (linked-urls dom tags)))) - ;; lquery-dom alist list → nil (defun substitute-urls (dom substitution-alist &optional (tags '("img"))) "Replace SRC or HREF attributes of certain tags in an LQuery DOM, based on a @@ -83,7 +83,6 @@ among the given tags." tags) dom) - ;; string pathname → pathname (defun mirrored-pathname (url &optional base-dir) "Given a URL, return the corresponding path we would download it to, were we @@ -114,7 +113,6 @@ HREF and SRC attributes." (loop for tag in tags append (url-list-of-tag tag)))) - ;; lquery-node → string (defun node-url (node) "Return the SRC or HREF attribute of an LQuery node, if such a thing exists." @@ -122,7 +120,6 @@ HREF and SRC attributes." (or (lquery-funcs:attr node "src") (lquery-funcs:attr node "href")))) - ;; lquery-node → nil (defun set-node-url (node url) "Set the SRC or HREF attribute of an LQuery node (based on which attribute is @@ -147,7 +144,6 @@ already set)." path) (error nil))) - ;; string → string (defun url-encode-uri (uri) "URL-encode the path component of a URI. For example, @@ -159,7 +155,6 @@ already set)." (quri:uri-port uri) (url-encode-path (quri:uri-path uri))))) - ;; string → string (defun url-encode-path (path) "URL-encode a pathname’s components (directory and filenames). For example,