Wikipedia:WikiProject Electronics/

From Wikipedia, the free encyclopedia
Jump to: navigation, search
#!/bin/sh -e
# you need gs-common, pstoedit and skencil to
# get this script working
BASENAME=$(basename "$1"; echo x) BASENAME=${BASENAME%x}

# Outline fonts
eps2eps -dNOCACHE "$1" "${BASENAME}"

# Fix bounding box
ps2epsi "${BASENAME}" "${BASENAME}".ps
rm "${BASENAME}"

# Convert to Sketch
pstoedit -f sk "${BASENAME}".ps "${BASENAME}".sk

# Convert to SVG
skconvert "${BASENAME}".sk "${BASENAME}".svg
# You can also make the whole thing a big long pipe and eliminate the use of tmp files.