init
This commit is contained in:
commit
a6929e88cf
12 changed files with 177 additions and 0 deletions
30
generate.sh
Executable file
30
generate.sh
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/bash
|
||||
set -e
|
||||
cd "$(realpath "$(dirname "$0")")"
|
||||
|
||||
|
||||
rm -fr './out'
|
||||
mkdir -p './out'
|
||||
|
||||
|
||||
(cd phoques; ls) | while read file
|
||||
do
|
||||
infos="$(echo "$file" | cut -d '.' -f 1)"
|
||||
nam="$(echo "$infos" | cut -d '_' -f 1)"
|
||||
ori="$(echo "$infos" | cut -d '_' -f 2)"
|
||||
row="$(echo "$infos" | cut -d '_' -f 3)"
|
||||
col="$(echo "$infos" | cut -d '_' -f 4)"
|
||||
msg="$(echo "$infos" | cut -d '_' -f 5)"
|
||||
|
||||
|
||||
echo "nam: '$nam', file: '$file', ori: '$ori', row: '$row', col: '$col', msg: '$msg'"
|
||||
cat src/index.html \
|
||||
| sed "s/FILE/$file/g" \
|
||||
| sed "s/NAM/$nam/g" \
|
||||
| sed "s/ORI/$ori/g" \
|
||||
| sed "s/COL/$col/g" \
|
||||
| sed "s/ROW/$row/g" \
|
||||
| sed "s/MSG/$msg/g" \
|
||||
> "out/$nam.html"
|
||||
chromium --headless --print-to-pdf="out/$nam.pdf" "out/$nam.html"
|
||||
done
|
Loading…
Add table
Add a link
Reference in a new issue