Created
December 10, 2020 17:10
-
-
Save felixr/c1935e6c66fddd10aa7cc01db67bbff4 to your computer and use it in GitHub Desktop.
Generate searchIndex entries for janet docset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function dtype(t) { return t=="function" ? "Function" : (t=="macro" ? "Macro": "Builtin");} | |
let s = ""; | |
for (let b of document.querySelectorAll('.binding')) { | |
s += `INSERT OR IGNORE INTO searchIndex(name, type, path) VALUES ("${b.firstChild.id}","${dtype(b.children[1].innerText)}","api/index.html#${b.firstChild.id}");\n`; | |
} | |
s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment