colorful rat Ratfactor.com > Dave's Repos

zstd-browse2

Turns the Zig standard library into an HTML mini-site.
git clone http://ratfactor.com/repos/zstd-browse2/zstd-browse2.git

zstd-browse2/README.md

Download raw file: README.md

1 # Browseable Zig standard library 2 2 3 This is a little Ruby program that creates a browseable HTML mini-site from 4 the Zig standard library source. 5 6 <img src="raw/zig-stdlib-book.svg" alt="" style="float: right; margin: 1em;"> 7 8 The style was inspired by (as in, nearly identical to) 9 <a href="https://web.archive.org/web/20120428101624/http://jashkenas.github.com/docco/">docco.coffee</a> (archive.org). 10 11 To make it browseable, `@import()` calls get converted to hyperlinks. 12 13 <a href="http://ratfactor.com/zig/stdlib-browseable2/">See it live here!</a> 14 15 16 ## Run it! 17 18 The Ruby program generates a page for one Zig file at a time. 19 20 There's a Bash script to make the whole site. 21 22 The first parameter of the script must be a path to a Zig Std Lib (ending in trailing slash `/`): 23 24 ./build.sh /home/dave/zig/lib/std/ 25 26 The second parameter _can_ be a wildcard match of files/directories to generate: 27 28 ./build.sh /home/dave/zig/lib/std/ queue 29 atomic/queue.zig 30 priority_queue.zig 31 priority_dequeue.zig 32 33 Output will be generated in a new directory named `output/` in the current 34 working directory. 35 36 ## TODOs 37 38 * I don't need Bash here. Ruby can do all of this. I was just re-using script. 39 * Make an index page with big "browse" link at top followed by semi-automated, categorized file tree