From Newsgroup: comp.lang.awk
Sort of an off-topic post in some ways, nevertheless...
Not boasting just happy it went well & sharing an idea =)
After creating a LibreOffice template, now I simply use
this tool-chain (from memory)...
create tmp dir if needed:
mkdir tmp
hop to tmp:
cd tmp
duplicate template:
cp ../template.odt tmp.odt
create puzzles:
awk -v foo=xyz -f ../mini-sudoku.awk > puzzles.txt
unpack template:
unzip tmp.odt
create puzzles:
awk -f ../update-xml.awk content.xml > new-content.xml
inject custom xml:
mv new-content.xml content.xml
repack (2 steps: file mimetype MUST be 1st in archive):
zip -q -0 -X tmp.odt mimetype
zip -q -r tmp.odt . -x mimetype
convert odt to pdf:
libreoffice --headless --convert-to pdf --outdir . tmp.odt
tmp.pdf is ready! witness...
<
https://drive.google.com/file/d/12gwDp9q_O-BOwvKuGZwr1OsxcuUWKeaj/view>
Have fun guys!
--
:wq
Mike Sanders
--- Synchronet 3.22a-Linux NewsLink 1.2