Skip to content

Instantly share code, notes, and snippets.

View dmj's full-sized avatar

David Maus dmj

View GitHub Profile
@dmj
dmj / psi-explain.xsl
Created September 30, 2011 11:35
Translate Pica PSI response to SRU response
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:explain="http://explain.z3950.org/dtd/2.0/"
xmlns:zs="http://www.loc.gov/zing/srw/"
version="1.0">
<xsl:output indent="yes" method="xml"/>
<xsl:param name="host" select="''"/>
<xsl:param name="port" select="''"/>
<xsl:param name="database" select="''"/>
@dmj
dmj / .wl
Created December 12, 2009 15:14
;; Shimbun
;; Setup Feeds based on ~/.feeds
(let ((feedbuf (find-file-noselect "~/.feeds")))
(with-current-buffer feedbuf
(goto-char (point-min))
(while (re-search-forward "^\\([a\\|r]\\) \\([[:alnum:]]+\\) \\(.+\\)$" nil t)
(let ((sha (sha1-string (match-string 3))))
(cond
((equal (match-string 1) "a")
(add-to-list 'shimbun-atom-hash-group-path-alist
@dmj
dmj / *scratch*
Created December 9, 2009 10:28
emacs vs. zotero
(defun dmj/zotero-export-bibtex ()
"Ask for a search query, export matching items to bibtex."
(interactive)
(require 'moz)
(let* ((query (read-string "Query: "))
(tmpfile (make-temp-name
(expand-file-name "zotemacs" temporary-file-directory)))
(js (list
"var file = Components.classes['@mozilla.org/file/local;1'].createInstance(Components.interfaces.nsILocalFile);"
(concat