diff --git a/mirror-img.asd b/mirror-img.asd new file mode 100644 index 0000000..8fae1cb --- /dev/null +++ b/mirror-img.asd @@ -0,0 +1,6 @@ +(defsystem "mirror-img" + :version "0.1" + :license "GPLv3" + :author "Jaidyn Ann " + :depends-on (lquery dexador split-sequence) + :components ((:file "mirror-img"))) diff --git a/mirror-img.lisp b/mirror-img.lisp index 68e3e7b..d5ac9b8 100644 --- a/mirror-img.lisp +++ b/mirror-img.lisp @@ -13,14 +13,19 @@ ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . +(defpackage :mirror-img + (:use :cl) + (:export :mirror-img)) + +(in-package :mirror-img) + (defvar *src-tags* '("audio" "embed" "img" "input" "script" "source" "track" "video")) (defvar *href-tags* '("link")) - ;;; Mirror-img ;;; ———————————————————————————————————————— -(defun mirror-remote-urls (html-file base-dir &optional (tags '("img"))) +(defun mirror-img (html-file base-dir &optional (tags '("img"))) "Attempt to mirror all remote HREF/SRC URLs of an HTML file’s tags, downloading them to base-dir. The remote URLs will be replaced with the local version, where downloading was successful.