This script will download metadata from HackageDB and use it to generate a webpage containing the full module hierarchy along with links to all info pages and source archives.
If you find it tedious to use the full formatting range of BBCode when posting longer posts here on the forum then this is for you. This script contains a Pandoc writer that can be used in your own scripts to convert any format recognized by Pandoc to BBCode. The script itself will compile to an executable that converts Markdown on
stdin to BBCode on
stdout for simplified forum posting.
This entire post was written in Markdown. You can get it here.
The writer is simple and could be optimized. It only supports FluxBB's (sub?)set of BBCode, so some formatting features are not supported (e.g. subscripts and superscripts).
Emphasized, strongly emphasized,
struckout text and
inline code (which I have arbitrarily made red for now).
$ echo foo
And also, Allan insulted me
It also supports headers and links as seen above.
main function will read Markdown from stdin and print BBcode to stdout.
ghc -O2 --make -o markdown2bbcode markdown2bbcode.hs
By default GHC will create a relatively large independent executable. To create a smaller dynamically linked exectuable, use
ghc -dynamic -O2 --make -o markdown2bbcode markdown2bbcode.hs
Be warned though, if you use dynamic linking then you will need to recompile it every time you update one of the dependencies.
To reduce the size further, use
upx --best markdown2bbcode
Open an editor, write your post in Markdown, save it to
input.md, then run
markdown2bbcode < input.md > output.txt
output.txt, copy the contents and paste it into the forum text area. Preview it and then submit if everything looks good.
I will package this if people show interest. I need to figure out how to properly package Haskell modules before I do as this should install
Text.Pandoc.Writers.BBCode along with the script
markdown2bbcode. I'll try to get to that soon as I have a larger Haskell project that I hope to release in the coming weeks.
Sigo retrieves Google search results from Google's HTTPS API via Privoxy and Tor. It should thus offer both end-to-end encryption (HTTPS) as well as anonymization (Tor) for users who need it, the paranoid, and people who just think that encryption and anonymization should be the default.
At some point I would like to add a simple server to the script to enable viewing in a browser.
|bbcode_gradient||2.74 KiB||2012-03-05 00:37 UTC|
|chess_imager||6.09 KiB||2011-04-17 18:03 UTC|
|get_hackagedb_module_hierarchy||7.24 KiB||2011-01-29 01:43 UTC|
|markdown2bbcode||8.61 MiB||2013-09-24 20:11 UTC|
|markdown2bbcode.hi||10.14 KiB||2013-09-24 20:11 UTC|
|markdown2bbcode.hs||4.75 KiB||2016-04-19 14:59 UTC|
|markdown2bbcode.o||47.91 KiB||2013-09-24 20:11 UTC|
|sigo||8.05 KiB||2010-07-11 18:59 UTC|