source code for simplicialcomplex's tilde.club gopherhole
git clone https://tilde.club/~simplicialcomplex/git/gophersource.git
Log | Files | Refs

getbookmarks.el (497B)


      1 #!/usr/bin/env -S emacs -Q --script
      2 
      3 (require 'seq)
      4 
      5 (princ
      6 (mapconcat
      7  (lambda (e) 
      8    (replace-regexp-in-string "^gopher://\\(.*?\\)/\\([0135789ghiIds;cM]\\)/\\(.*\\)$" (format "\\2%s\t/\\3\t\\1" (car e)) (cdr (assoc 'location (cdr e)))))
      9  (seq-filter (lambda (entry) (equal (cdr (assoc 'handler (cdr entry))) 'elpher-bookmark-jump))
     10 	    (car (read-from-string
     11 		  (with-temp-buffer
     12 		    (insert-file-contents "/home/simplicialcomplex/.emacs.d/bookmarks")
     13 		    (buffer-string)))))
     14 
     15  "\n"
     16  ))