MNT Reform: Open Source Portable Computer https://mntre.com/reform
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.

23 lines
582B

  1. #!/bin/bash
  2. function build {
  3. dot -Tsvg system-diagram.dot -o system-diagram.svg
  4. rsvg-convert -f pdf -o system-diagram.pdf system-diagram.svg
  5. echo '<!DOCTYPE html><html lang="en"><meta charset="UTF-8">' >system.html
  6. kramdown system.md >>system.html
  7. echo '</html>' >>system.html
  8. sed -i 's/width="[^"]*"/width="100%"/' system-diagram.svg
  9. sed -i 's/height="[^"]*"//' system-diagram.svg
  10. sed -i 's/"Inter"/"Inter,Roboto,Helvetica,Helvetica Neue,Open Sans,Arial,sans-serif"/g' system-diagram.svg
  11. }
  12. build
  13. while :
  14. do inotifywait -e modify -r *.dot *.md
  15. build
  16. done