Hi All,
So I'm at a query for the best location to store and use scripts. I'm used to command line binaries which I usually dump in /usr/bin. Since this is in my path, it makes the command line programs convenient to work with from any location. Is there a way to treat scripts in the same manner? I guess I'm looking for script etiquitte.
The script I'm using is to convert pdf to svg to be used in inkscape. Since the pdf's I will use in inkscape are pretty much scattered in my directories it would be nice if I didn't have to move them to employ the script. Any ideas? Thanks
Also does anyone know how I would run this script (pdf2svg.sh) on a file from the commandline:
#################################
#!/bin/bash
# you need gs-common, pstoedit and skencil to
# get this script working
export BASENAME="`basename $1 .pdf`";
# convert PDF to postscript
pdf2ps ${BASENAME}.pdf
# Outline fonts
eps2eps -dNOCACHE ${BASENAME}.ps ${BASENAME}2.ps
# Fix bounding box
ps2epsi ${BASENAME}2.ps ${BASENAME}3.ps
# Convert to Sketch
pstoedit -f sk ${BASENAME}3.ps ${BASENAME}.sk
# Convert to SVG
skconvert ${BASENAME}.sk ${BASENAME}.svg
#################################
I tried " pdf2svg.sh file.pdf " but that wasn't working.
Cheers,
ScKaSx
So I'm at a query for the best location to store and use scripts. I'm used to command line binaries which I usually dump in /usr/bin. Since this is in my path, it makes the command line programs convenient to work with from any location. Is there a way to treat scripts in the same manner? I guess I'm looking for script etiquitte.
The script I'm using is to convert pdf to svg to be used in inkscape. Since the pdf's I will use in inkscape are pretty much scattered in my directories it would be nice if I didn't have to move them to employ the script. Any ideas? Thanks
Also does anyone know how I would run this script (pdf2svg.sh) on a file from the commandline:
#################################
#!/bin/bash
# you need gs-common, pstoedit and skencil to
# get this script working
export BASENAME="`basename $1 .pdf`";
# convert PDF to postscript
pdf2ps ${BASENAME}.pdf
# Outline fonts
eps2eps -dNOCACHE ${BASENAME}.ps ${BASENAME}2.ps
# Fix bounding box
ps2epsi ${BASENAME}2.ps ${BASENAME}3.ps
# Convert to Sketch
pstoedit -f sk ${BASENAME}3.ps ${BASENAME}.sk
# Convert to SVG
skconvert ${BASENAME}.sk ${BASENAME}.svg
#################################
I tried " pdf2svg.sh file.pdf " but that wasn't working.
Cheers,
ScKaSx