close but not there yet

This commit is contained in:
2026-07-20 19:44:35 +02:00
parent a6abe939e8
commit cfa5985f44
3 changed files with 70 additions and 43 deletions
+47
View File
@@ -0,0 +1,47 @@
#!/usr/bin/bash
BASEDIR=$(pwd)
INPUT_DIR="$BASEDIR/input"
OUTPUT_DIR="$BASEDIR/91_sonnensystem"
TEMPLATES="$BASEDIR/templates"
chown -R appuser:appgroup "$OUTPUT_DIR"
function convert_adoc() {
if [ -f "$1" ]; then
echo "-> Konvertiere $1 zu HTML..."
asciidoctor -b html5 -a stylesheet=$TEMPLATES/retro-dark.css -a linkcss -a toc=left "$INPUT_DIR/$1" -o "$OUTPUT_DIR/$2"
else
echo " [INFO] $1 nicht gefunden, überspringe..."
fi
}
echo '--- Baue README ---'
convert_adoc README.adoc README.html
echo '--- Baue Lore (Master-Dokument) ---'
LORE_SRC="$INPUT_DIR/index.adoc"
if [ -f "$INPUT_DIR/master.adoc" ]; then LORE_SRC="$INPUT_DIR/master.adoc"; fi
if [ -f "$LORE_SRC" ]; then
echo "-> Generiere Lore-Dokument (HTML & Markdown) aus $LORE_SRC..."
asciidoctor -b html5 -d book -a stylesheet=$TEMPLATES/retro-dark.css -a linkcss -a toc=left "$LORE_SRC" -o "$OUTPUT_DIR/lore.html"
asciidoctor -b docbook -d book "$LORE_SRC" -o "$OUTPUT_DIR/temp_lore.xml"
pandoc -f docbook -t markdown_strict "$OUTPUT_DIR/temp_lore.xml" -o "$OUTPUT_DIR/lore.md"
rm "$OUTPUT_DIR/temp_lore.xml"
else
echo " [WARNUNG] Weder index.adoc noch master.adoc gefunden!"
fi
echo '--- Baue Fließtexte / Geschichten ---'
if [ -f "$INPUT_DIR/darkCenter.adoc" ]; then
echo "-> Konvertiere darkCenter.adoc zu HTML..."
asciidoctor -b html5 -d book -a stylesheet=$TEMPLATES/retro-dark.css -a linkcss -a toc=left "$INPUT_DIR/darkCenter.adoc" -o "$OUTPUT_DIR/darkCenter.html"
fi
rm -rf ./export
mkdir "$OUTPUT_DIR/css"
cp "$TEMPLATES/retro-dark.css" "$OUTPUT_DIR/css/"
cp "$TEMPLATES/index.html" "$OUTPUT_DIR/"
sed -i 's/\/workspace\/templates/css/g' "$OUTPUT_DIR/darkCenter.html"
chown -R appuser:appgroup "$OUTPUT_DIR"
+16
View File
@@ -0,0 +1,16 @@
FROM debian:stable-slim
RUN apt-get update && apt-get upgrade && apt-get -y install asciidoctor pandoc bash
RUN groupadd --gid 1000 appgroup && \
useradd --uid 1000 --gid appgroup --shell /bin/bash --create-home appuser
WORKDIR /workspace
ADD ./90_builder/templates templates
ADD ./90_builder/bookFold.sh ./
RUN chown -R appuser:appgroup /workspace
CMD ["/usr/bin/bash" "./bookFold.sh"]