Open-source election counting
https://yingtongli.me/opentally/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
668 B
11 lines
668 B
#!/bin/bash
|
|
|
|
# Gen docs
|
|
cargo doc --no-deps --document-private-items
|
|
|
|
# Remove wasm-bindgen items from HTML
|
|
find target/doc/opentally -type f -print0 | xargs -0 perl -0777 -i -pe 's#<tr class="module-item"><td><a class="fn" href="fn.__wasm_bindgen_generated_.*?</tr>##gs'
|
|
|
|
# Remove wasm-bindgen items from sidebars
|
|
find target/doc/opentally -name sidebar-items.js -print0 | xargs -0 perl -0777 -i -pe 's#initSidebarItems\({#initSidebarItems(Object.fromEntries(Object.entries({#g'
|
|
find target/doc/opentally -name sidebar-items.js -print0 | xargs -0 perl -0777 -i -pe 's#}\);#}).map(([k, v]) => [k, v.filter((w) => !w[0].startsWith("__wasm_bindgen_generated_"))])));#g'
|
|
|