Explorar el Código

Adding a utility to guess that a url is a x/twitter post

Yuchen Pei hace 11 meses
padre
commit
c78c62bd4a
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      exitter.el

+ 4 - 0
exitter.el

@@ -575,6 +575,10 @@ Including ancestors and descendants, if any."
             .favorite_count
             )))
 
+(defun exitter-post-url-p (url)
+  (string-match-p "^/[^/]+/status/\\([0-9]+\\)"
+                  (url-filename (url-generic-parse-url url))))
+
 (defun exitter-open-post (url)
   (interactive "sTwitter link: ")
   (let ((path-etc (url-filename (url-generic-parse-url url))))