modified: src1/worker.c
[GalaxyCodeBases.git] / bash / etc / pdoc.sh
bloba478417367a941fac5b3017dcd63685bf1ab7614
1 #!/bin/sh
3 inPath="$1"
4 #inputname=${infile%%.*}
5 #allext="${infile#*.}"
7 mkdir -p ./work
8 #rm ./work/*.png
9 echo "# ${inPath} " > "${inPath}.md"
11 find "./$inPath" -type f -exec bash -c '
12 for item do
13 item=${item#foo}
14 filename=$(basename -- "$item")
15 newname="./work/'${inPath}'.$filename"
16 if [[ ! -e "$newname" ]]; then
17 convert "$item" -colors 128 -type Palette -set units PixelsPerInch -density 315 "$newname"
19 done
20 ' bash {} +
22 find "./work" -type f -name "${inPath}.*" -print0 | sort -z | xargs -r0 -I{} echo '![]('{}') ' >> "${inPath}.md"
23 pandoc -f markdown -t docx "${inPath}.md" -o "${inPath}.docx"