aboutsummaryrefslogtreecommitdiffstats
path: root/generasitio.sh
diff options
context:
space:
mode:
Diffstat (limited to 'generasitio.sh')
-rwxr-xr-xgenerasitio.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/generasitio.sh b/generasitio.sh
index f36173e..f03943e 100755
--- a/generasitio.sh
+++ b/generasitio.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
mkdir -p web
mkdir -p gem
@@ -36,9 +36,11 @@ echo "revisando y convirtiendo archivimos gmo a html y gmi..."
orig=$(date +"%s" -d "1989-07-27")
+i=0
# convierte y actualiza archivos gmi a html
for f in $(find src/ -iname *.gmo)
do
+
path=${f#src/} # quita el prefijo de "src/"
htmlpath="web/${path%gmo}html" # agrega "web/" y cambia el sufijo
gempath="gem/${path%gmo}gmi" # agrega "gem/"
@@ -51,10 +53,15 @@ do
fecha=$(date -r $f --rfc-3339=date)
- echo "${f}"
+# echo "${f}"
# echo "${f} -> ${htmlpath}"
# echo "${f} -> ${gempath}"
# haz la conversión
awk -v fecha=$fecha -v fechasjm="$fechasjm" -f gemtext2html.awk $f > $htmlpath
awk -v fecha=$fecha -v fechasjm="$fechasjm" -f gem2gem.awk $f > $gempath
+
+ (( i++ ))
+
done
+
+echo "convertidas ${i} páginas!"
Un proyecto texto-plano.xyz