This shell script and PHP file create a browseable HTML site from the Zig standard library source.

Overview

Browseable Zig standard library

This shell script and PHP file create a browseable HTML site from the Zig standard library source.

The idea is to inverse the typical emphasis put on comments vs source (comments are the star of the show), and highlighting only the most important public names in the source to make them easy to spot.

Most importantly, @import() calls get converted to hyperlinks so the library becomes browseable. Since include paths in the standard library are all relative, the link structure works perfectly with absolutely no modifications. Too easy!

Check out the results: http://ratfactor.com/zig/stdlib-browseable/std.zig.html

screenshot of example output

Bash and PHP? Ew!

Seriously, Bash is perfect for gathering the source files and PHP is perfect for generating HTML documents from a template.

Because Zig syntax is so regular and minimal, it is trivial to parse. A handful of regexes are all you need for something like this.

The source is tiny, easy to read (see for yourself!), and pages get generated at a rate of 42 per second, which is fast enough for me. Oh, and the whole project took just a couple hours to create from scratch, including this README. I think these are the right tools for the job.

I've also got a short article with a little more detail: http://ratfactor.com/zig/browseable-standard-library

You might also like...
Psl is a standard library for PHP, inspired by hhvm/hsl
Psl is a standard library for PHP, inspired by hhvm/hsl

📚 PHP Standard Library - a modern, consistent, centralized, well-typed, non-blocking set of APIs for PHP programmers

A webshell plugin and interactive shell for pentesting a Moodle instance.
A webshell plugin and interactive shell for pentesting a Moodle instance.

Moodle webshell plugin for RCE A webshell plugin and interactive shell for pentesting a Moodle instance. Features Webshell plugin for Moodle. Execute

Composer script handling your ignored parameter file

Managing your ignored parameters with Composer This tool allows you to manage your ignored parameters when running a composer install or update. It wo

Shell Tools for Qiniu Cloud
Shell Tools for Qiniu Cloud

qshell 简介 qshell是利用七牛文档上公开的API实现的一个方便开发者测试和使用七牛API服务的命令行工具。该工具设计和开发的主要目的就是帮助开发者快速解决问题。目前该工具融合了七牛存储,CDN,以及其他的一些七牛服务中经常使用到的方法对应的便捷命令,比如b64decode,就是用来解码七

Magento 2 Italian Language Pack is special gift for Magento 2 Community Edition. The data of the translation is supplied by Magento 2 Translation Project of Crowdin site, on which you will contribute into the project and download the zip file to install on your own store. This knowledge base will include full of the clear guides that supports you to convert the default language (English) into Italian language on your entire store. Check modules in app/code and vendor for PHP 8 compatibility status - PHP_CodeSniffer & php-compatibility standard
Check modules in app/code and vendor for PHP 8 compatibility status - PHP_CodeSniffer & php-compatibility standard

M2 PHP version compatibility check How To use Requires PHP 7.3+ | PHP 8 This app will run PHP_CodeSniffer with phpcompatibility/php-compatibility on t

Create eye-catching Open Graph images for each (or some) site pages
Create eye-catching Open Graph images for each (or some) site pages

Open Graph Image Generator for Laravel Create Open Graph images (og:image, twitter:image, vk:image) for each (or some) site pages. Use page title to c

 Learning about - Basic HTML & CSS, JSON, XML, Session & Cookies, CRUD Operations in Php using MySQL and Create MVC from scratch
Learning about - Basic HTML & CSS, JSON, XML, Session & Cookies, CRUD Operations in Php using MySQL and Create MVC from scratch

This Project is based on course CSC 3215. Learning about - Basic HTML & CSS, JSON, XML, Session & Cookies, CRUD Operations in Php using MySQL and Create MVC (Model–View–Controller) from scratch. Just learning about web technologies, Not focusing on UI (Bootstrap or other 3rd-Party UI libraries or frameworks).

Sanitize untrustworthy HTML user input (Symfony integration for https://github.com/tgalopin/html-sanitizer)

html-sanitizer is a library aiming at handling, cleaning and sanitizing HTML sent by external users (who you cannot trust), allowing you to store it and display it safely. It has sensible defaults to provide a great developer experience while still being entierely configurable.

Owner
Dave Gauer
Dave Gauer
Coding-standard - Magento PHP CodeSniffer Coding Standard

ECG Magento Code Sniffer Coding Standard ECG Magento Code Sniffer Coding Standard is a set of rules and sniffs for PHP_CodeSniffer tool. It allows aut

Magento ECG 309 Jan 3, 2023
A simple shell script which loads a magento environment

A simple shell script to load up a Magento environment and execute PHP code Very experimental and should only be ran on dev servers REQUIRES php pcntl

beeplogic 28 Feb 4, 2022
Run your WP site on github pages, php innovation award winner https://www.phpclasses.org/package/12091-PHP-Make-a-WordPress-site-run-on-GitHub-pages.html

Gitpress Run wordpress directly on github pages Gitpress won the innovation award for may 2021 Read more about this https://naveen17797.github.io/gitp

naveen 13 Nov 18, 2022
A PHP library that can be used manually as well as a CLI script that you can just run on your file

Run phpcs on files and only report new warnings/errors compared to the previous version. This is both a PHP library that can be used manually as well

Payton Swick 20 Aug 4, 2022
A small PHP Script to protect your site against DDoS attack .

Anti-DDoS A small PHP Script to protect your site against DDoS attack. Description Most of bots can't execute JavaScript code or can execute code part

Arman Msv 3 Dec 20, 2022
Yclas Self Hosted is a powerful script that can transform any domain into a fully customizable classifieds site within a few seconds.

Yclas 4.4.0. Description Yclas self-hosted is a powerful script that can transform any domain into a fully customizable classifieds site within a few

Yclas 299 May 29, 2022
html-sanitizer is a library aiming at handling, cleaning and sanitizing HTML sent by external users

html-sanitizer html-sanitizer is a library aiming at handling, cleaning and sanitizing HTML sent by external users (who you cannot trust), allowing yo

Titouan Galopin 381 Dec 12, 2022
PHP library to create and validate html forms

FormManager Note: this is the documentation of FormManager 6.x For v5.x version Click here Installation: This package requires PHP>=7.1 and is availab

Oscar Otero 145 Sep 20, 2022
Site Web pour un site de conciergerie d'entreprise

DATE DE CREATION : 30 novembre 2021 • Développement d'un site Web pour une entreprise de conciergerie pour entreprise, une interface pour les dirigea

Tiffany Dufetel 1 Jan 10, 2022
A highly compressed version of the magento 1.9 sample data and a script to create it.

Compressed Magento 1.9 Sample Data The following variations are available: 65M compressed-magento-sample-data-1.9.2.4.tgz 64M compressed-magento-sampl

Vinai Kopp 120 Sep 9, 2022