md-to-html/convert-to-html-and-upload-to-apache.sh
alvaro@thinkpad bf0983a5bc
All checks were successful
run-test-on-push / run-script (push) Successful in 29s
con cat
2026-05-16 13:24:21 +02:00

36 lines
539 B
Bash
Executable file

#!/bin/sh
dependencies(){
apt update
apt install -y pandoc
}
convert_to_html(){
# NOTA: FICHEROS SIN ESPACIOS EN LOS NOMBRES
for MD in $(ls *.md)
do
local FILENAME="${MD%.*}"
pandoc -o $FILENAME.html $MD
done
}
upload(){
for HTML in $(ls *.html)
do
echo "::::::::::::::::::::::::::::::::::"
echo "USAR scp O ftp O CUALQUIER OTRA COSA PARA SUBIR LOS HTML A UN APACHE: $HTML"
cat $HTML
done
}
main(){
dependencies
convert_to_html
upload
}
main