(concord-images-encode-url-as-id): Support image.chise.org and
[chise/concord-images.git] / 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))