File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 775775 neovim
776776 vibe
777777 qute
778+ ( import ./pdfmaker.nix )
778779 ( import ./vidmaker.nix )
779780 ( import ./clipmaker.nix )
780781 ( import ./bar.nix { inherit pkgs ; } )
Original file line number Diff line number Diff line change 1212
1313 TMP="$(mktemp -d)"
1414 WORK="$TMP/processed.md"
15+ HEADER="$TMP/header.tex"
16+
17+ echo '\usepackage{graphicx}' > "$HEADER"
18+
1519 cp "$INPUT" "$WORK"
1620
1721 LINKS=$(sed -n 's/.*(\(http[^)]*\)).*/\1/p' "$INPUT" | sort -u)
2226 PDF="$TMP/qr_$i.pdf"
2327
2428 qrencode -o "$PNG" -s 3 -m 1 "$URL"
25-
2629 magick "$PNG" "$PDF"
2730
2831 ESCAPED=$(printf '%s\n' "$URL" | sed -e 's/[\/&]/\\&/g')
29- sed -i "s|($ESCAPED)|($ESCAPED)\n\n{ width=2cm }|g" "$WORK"
32+
33+ sed -i "s|($ESCAPED)|($ESCAPED)\n\n\\\\begin{center}\n\\\\includegraphics[width=2cm]{$PDF}\n\\\\end{center}\n|g" "$WORK"
3034
3135 i=$((i+1))
3236 done
3337
34- pandoc "$WORK" --standalone --pdf-engine=xelatex -o "$OUTPUT"
38+ pandoc "$WORK" --standalone --pdf-engine=xelatex --include-in-header="$HEADER" - o "$OUTPUT"
3539 '' ;
3640
3741 runtimeInputs = with pkgs ; [
You can’t perform that action at this time.
0 commit comments