summaryrefslogtreecommitdiff
path: root/export.sh
blob: 085ea644a1d75c566e03ea7e8035c369098877d8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env bash

shopt -s nullglob
for i in *.org; do
    name="${i%%.*}"
    echo $name
    emacs "$i" --batch -f org-html-export-to-html --kill
    tail -n +4 "$name.html" | tee "$name.php"
    rm "$name.html" "$name.html~"
done