work on tape and string
This commit is contained in:
parent
5827f9cf95
commit
7eb4c3104d
@ -5,9 +5,12 @@ cd ..
|
|||||||
files=(`find -not -path '_*'`)
|
files=(`find -not -path '_*'`)
|
||||||
for i in ${files[@]}; do
|
for i in ${files[@]}; do
|
||||||
if test -d $i; then
|
if test -d $i; then
|
||||||
|
if test -d ../$i; then
|
||||||
mkdir -p ../$i
|
mkdir -p ../$i
|
||||||
|
else continue
|
||||||
|
fi
|
||||||
elif test -f $i; then
|
elif test -f $i; then
|
||||||
tape $i | m4 -DTITLE=`${prog[title]} $i` .
|
tape $i | m4 -DTITLE=`${prog[title]}` ${prog[m4]} < $i ../$i
|
||||||
else
|
else
|
||||||
echo "Skipping $i, unknown file type"
|
echo "Skipping $i, unknown file type"
|
||||||
fi
|
fi
|
||||||
|
11
src/_tape/string.sh
Normal file
11
src/_tape/string.sh
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
declare -A prog
|
||||||
|
prog[m4]=`readlink -f main.html`
|
||||||
|
prog[title]=`readlink -f titlelookup`
|
||||||
|
function tape {
|
||||||
|
case $1 in
|
||||||
|
*.txti) redcloth $1 ;;
|
||||||
|
*.org) org-ruby --translate html $1 ;;
|
||||||
|
*.md) comrak --gfm $1 ;;
|
||||||
|
*) pandoc --cols 168 -t html $i || echo "Unable to render $i, unknown format" ;;
|
||||||
|
esac
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user