(concord-images-encode-url-as-id): Support image.chise.org and
authorMORIOKA Tomohiko <tomo.git@chise.org>
Fri, 19 Oct 2018 08:19:37 +0000 (17:19 +0900)
committerMORIOKA Tomohiko <tomo.git@chise.org>
Sun, 31 Mar 2019 05:25:28 +0000 (14:25 +0900)
image.kanji.zinbun.kyoto-u.ac.jp.

concord-images.el

index 84a6461..e51775d 100644 (file)
@@ -3,13 +3,13 @@
 (defun concord-images-encode-url-as-id (url)
   (let (ret)
     (cond
-     ((string-match "^http://hng\\.chise\\.org/images/iiif/" url)
+     ((string-match "^http://\\(hng\\|image\\)\\.\\(chise\\.org\\|kanji\\.zinbun\\.kyoto-u\\.ac\\.jp\\)/images/iiif/" url)
       (setq ret (substring url (match-end 0)))
       (if (string-match "\\.[a-zA-Z0-9]+$" ret)
          (substring ret 0 (match-beginning 0))
        ret)
       )
-     ((string-match "^http://hng\\.chise\\.org/images/" url)
+     ((string-match "^http://\\(hng\\|image\\)\\.\\(chise\\.org\\|kanji\\.zinbun\\.kyoto-u\\.ac\\.jp\\)/images/" url)
       (setq ret (substring url (match-end 0)))
       (if (string-match "\\.[a-zA-Z0-9]+$" ret)
          (substring ret 0 (match-beginning 0))