by gwern · 15y ago · 0 comments
And you can easily script it in Haskell - I wrote one plugin that archives external links in the Internet Archive & WebCitation, and another link which adds interwiki syntax to markdown, eg. '[Plato](!Wikipedia)' or '[abstruse](!Wiktionary)' or '[scanl](!Hoogle)' or '[gitit](!Hackage)'.
If you extended Pandoc, do you mind giving a pointer to your source? I write Haskell poorly, so an example would be appreciated.
https://github.com/jgm/gitit/blob/master/plugins/Interwiki.h...
https://github.com/jgm/gitit/blob/master/plugins/Subst.hs
https://github.com/jgm/gitit/blob/master/plugins/WebArchiver...
They are meant for use with Gitit, but they are easily adapted for other purposes. For example, the archive code was easily adapted into a script to read Markdown files and spit out external links to stdout: http://groups.google.com/group/pandoc-discuss/browse_thread/...