Add inkscape directory
This commit is contained in:
parent
4b1c3bdece
commit
8f7a8b3b16
18
figs/inkscape/convert_svg.sh
Executable file
18
figs/inkscape/convert_svg.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Directory containing SVG files
|
||||
INPUT_DIR="."
|
||||
|
||||
# Loop through all SVG files in the directory
|
||||
for svg_file in "$INPUT_DIR"/*.svg; do
|
||||
# Check if there are SVG files in the directory
|
||||
if [ -f "$svg_file" ]; then
|
||||
# Output PDF file name
|
||||
pdf_file="../${svg_file%.svg}.pdf"
|
||||
png_file="../${svg_file%.svg}"
|
||||
|
||||
# Convert SVG to PDF using Inkscape
|
||||
inkscape "$svg_file" --export-filename="$pdf_file" && \
|
||||
pdftocairo -png -singlefile -cropbox "$pdf_file" "$png_file"
|
||||
fi
|
||||
done
|
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 115 KiB |
Loading…
x
Reference in New Issue
Block a user