2026-05-16 16:40:45 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
|
|
dependencies(){
|
|
|
|
|
apt-get update -qq
|
|
|
|
|
apt-get install -y -qq pandoc
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
convert_to_html(){
|
|
|
|
|
for md in *.md; do
|
|
|
|
|
[ -f "$md" ] || continue
|
|
|
|
|
filename="${md%.*}"
|
|
|
|
|
pandoc -o "$filename.html" "$md"
|
|
|
|
|
echo "Convertido: $md -> $filename.html"
|
|
|
|
|
done
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
upload(){
|
|
|
|
|
for html in *.html; do
|
|
|
|
|
[ -f "$html" ] || continue
|
|
|
|
|
cp "$html" /output/
|
|
|
|
|
echo "✅ Publicado: $html"
|
|
|
|
|
done
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies
|
|
|
|
|
convert_to_html
|
|
|
|
|
upload
|