Command line tool / Emacs (and Vim) plugin to convert HTML to Hiccup syntax.
Download hiccup-cli from the releases page.
The Emacs package can be installed through melpa:
M-x package-install hiccup-cli
Function |
---|
hiccup-cli-paste-as-hiccup |
hiccup-cli-region-as-hiccup |
hiccup-cli-yank-as-hiccup |
Use hiccup-cli-region-as-hiccup
to transform the selected HTML to Hiccup syntax
Use hiccup-cli-yank-as-hiccup
or hiccup-cli-paste-as-hiccup
to paste HTML as Hiccup from either your kill-ring or clipboard
- Download the hiccup-cli binary from here.
- Add hiccup-cli to your
$PATH
- Because the hiccup-cli does not support reading from stdin, we need to configure it with a bash script called
html2hiccup
.
#!/usr/bin/env bash
middle="$(mktemp)"
while IFS= read -r line; do
echo "$line" >> "$middle"
done
hiccup-cli --html-file "$middle"
- Add
html2hiccup
to your$PATH
vim reference with external command
Make sure you have GraalVM installed.
git clone git@github.com:kwrooije/hiccup-cli
cd hiccup-cli
lein native-image
sudo cp target/hiccup-cli-0.1.0-SNAPSHOT /usr/local/bin/hiccup-cli
Released under the MIT License by Kevin William van Rooijen.