File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -20,19 +20,23 @@ jobs:
2020 - name : Checkout
2121 uses : actions/checkout@v4
2222
23- - name : Find tutorials
23+ - name : convert tutorials
2424 run : |
2525 cd MDtutorials
26- ls
2726 for path in ./*; do
28- [ -d "${path}" ] || continue # if not a directory, skip
27+ [ -d "${path}" ] || continue # skip if not a directory
2928 dirname="$(basename "${path}")"
30- mkdir -v ../$dirname
29+ dest="../$dirname)
30+ mkdir -v ${dest}
31+ [ -d "${path}/data" ] || cp -rv "${path}/data" ${dest}/
32+ [ -d "${path}/imgs" ] || cp -rv "${path}/imgs" ${dest}/
33+ cp -v tutorial.css ${dest}
3134 for fil in $dirname/*.md; do
3235 echo $fil
33- ls -l $fil
36+ outfile="${dest}/$(basename "${fil%.md}.html")"
37+ echo $outfile
38+ pandoc --standalone ${fil} --css tutorial.css -o ${outfile}
39+ sed -i '' 's/<figure>/<BR clear=all><figure>/g' ${outfile}
3440 done
3541 done
36- which pandoc
37- which sed
3842
You can’t perform that action at this time.
0 commit comments