2023-11-09 00:21:49 +00:00
|
|
|
|
|
|
|
# Tangling and weaving
|
|
|
|
|
2023-11-09 00:21:50 +00:00
|
|
|
webdriver.scm webdriver-impl.scm webdriver.html webdriver.egg webdriver.release-info tests/run.scm: webdriver.org vendor/htmlize.el
|
2023-11-09 00:21:49 +00:00
|
|
|
emacs --batch \
|
2023-11-09 00:21:50 +00:00
|
|
|
--load "~/.config/emacs/early-init.el" \
|
2023-11-09 00:21:49 +00:00
|
|
|
--load "vendor/htmlize.el" \
|
|
|
|
--eval "(setq enable-local-variables :all)" \
|
|
|
|
--eval "(setq org-confirm-babel-evaluate nil)" \
|
|
|
|
--eval "(require 'ob-tangle)" \
|
|
|
|
--eval "(require 'ob-lob)" \
|
|
|
|
--eval "(require 'htmlize)" \
|
|
|
|
--file "${.ALLSRC:[1]}" \
|
|
|
|
-f org-babel-tangle \
|
|
|
|
-f org-html-export-to-html
|
|
|
|
mv "${.ALLSRC:[1]:R}.html" "${.ALLSRC:[1]:R}.html.old"
|
|
|
|
echo "<div class='fossil-doc' data-title='`cat "${.ALLSRC:[1]:R}.html.old" | grep 'class="title"' | sed -e 's/^.*">//' | sed -e 's/<\/h1>//'`'>" > "${.ALLSRC:[1]:R}.html"
|
2023-11-09 00:21:50 +00:00
|
|
|
cat "${.ALLSRC:[1]:R}.html.old" | sed -e '1,11d' | head -n -2 >> "${.ALLSRC:[1]:R}.html"
|
2023-11-09 00:21:49 +00:00
|
|
|
echo "</div>" >> "${.ALLSRC:[1]:R}.html"
|
|
|
|
rm "${.ALLSRC:[1]:R}.html.old"
|
|
|
|
|
2023-11-09 00:21:50 +00:00
|
|
|
vendor/htmlize.el:
|
|
|
|
mkdir -p vendor
|
|
|
|
wget https://raw.githubusercontent.com/hniksic/emacs-htmlize/dd27bc3f26efd728f2b1f01f9e4ac4f61f2ffbf9/htmlize.el -O vendor/htmlize.el
|
|
|
|
|
2023-11-09 00:21:49 +00:00
|
|
|
# Extension Rules
|
|
|
|
.scm.so:
|
|
|
|
csc5 -R r7rs -X r7rs -sJ ${.IMPSRC}
|