Skip to content

Commit 33712d3

Browse files
committed
fix missing .xbb 2
1 parent fc4b5a9 commit 33712d3

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

.github/workflows/serve-ximera.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ jobs:
6363
run: |
6464
git config --global --add safe.directory "$GITHUB_WORKSPACE"
6565
mkdir -p .git/refs/heads
66-
[[ -f ".git/refs/heads/master.tex" ]] || date >".git/refs/heads/master.tex"
67-
./xmScripts/add_xbb.sh *
66+
[ -f ".git/refs/heads/master.tex" ] || date >".git/refs/heads/master.tex"
67+
echo "Add .xbb"
68+
./xmScripts/add_xbb.sh linesAndCurvesInSpace
6869
# xmlatex bake --compile pdfexport -j 5 $XM_TO_PROCESS
6970
xmlatex bake --compile htmlexport -j 5 $XM_TO_PROCESS
7071

xmScripts/add_xbb.sh

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,21 @@ if ! command -v ebb >/dev/null 2>&1; then
1414
fi
1515

1616
# Find all .svg files in subfolders and process them if .xbb is missing
17-
find "$FOLDER" -type f -name "*.png" | while read -r svgfile; do
18-
xbbfile="${svgfile%.png}.xbb"
17+
find "$FOLDER" -type f -name "*.svg" ! -name "*x.svg" | while read -r svgfile; do
18+
xbbfile="${svgfile%.svg}.xbb"
19+
pngfile="${svgfile%.svg}.png"
20+
pdffile="${svgfile%.svg}.pdf"
21+
if [ ! -f "$pdffile" ]; then
22+
echo "Missing PDF file for $svgfile"
23+
continue
24+
fi
25+
if [ ! -f "$pngfile" ]; then
26+
echo "Generating: $pngfile"
27+
mutool draw -r 150 -c rgbalpha -o "$pngfile" "$pdffile"
28+
ebb -x "$svgfile"
29+
# else
30+
# echo "Skipping (exists): $xbbfile"
31+
fi
1932
if [ ! -f "$xbbfile" ]; then
2033
echo "Generating: $xbbfile"
2134
ebb -x "$svgfile"

0 commit comments

Comments
 (0)