{"repo":"marhop/literate-binary","free":true,"listed":false,"github":"https://github.com/marhop/literate-binary","clone":"git clone https://github.com/marhop/literate-binary.git","description":"Integrate handcrafted binary and documentation","language":"Haskell","stars":36,"topics":["markdown","hex","binary"],"license":"MIT","category":"productivity","readme_excerpt":"literate-binary There are times when a binary file has to be crafted by hand , be it for testing purposes, for research, or just for some weird kind of fun. Usually, a hex editor is the tool of choice for straightforward binary editing. But what about documentation? There is no way to enter inline comments or other explanatory prose in a hex editor, leading to separation of hex code and documentation. (Or worse, to no documentation at all.) Wouldn't it be great if there was a way to combine binary (expressed as hex code) and textual content in the same file? If both a binary file and accompanying documentation in formats like HTML or PDF could be generated from the same source file? There is! Just write a [Markdown] file [like this example][example]. Run it through your favourite Markdown converter (mine is [Pandoc]) to create a pretty HTML or PDF document; run it through [ lb ][lb] to create a binary file from its hex content. pandoc - documentation.{html,pdf,docx,...} / source.bmp.md \\ lb - binary.bmp Obviously, this is inspired by Donald Knuth's ideas on literate programming; hence the name. There are several example files in the examples/ directory. I have also written a [long blog post][blog] that explains how to build a TIFF file using literate binary. Syntax The [ lb (literate binary) tool][lb] produces a binary file from a [Markdown] input file. The binary is made up by all [code blocks] in the input file tied together. All other content including inline code in backt","default_branch":null,"files":null,"tree":[],"storefront":"/r/marhop","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/marhop/literate-binary/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}