Commit e79029a0 authored by gijs's avatar gijs

MPOST tools

parent 267bb99c
from sys import stdin, stdout
allowed = ['PA', 'PR', 'PD', 'PU', 'SP']
filtered = ['SC700,1700,-700,1500']
for chunk in stdin.read().split(';'):
if chunk[0:2] in allowed:
filtered.append(chunk)
stdout.write(';'.join(filtered))
#! /bin/bash
if [ "$#" -gt 0 ]; then
eps=${1}
base=$(basename ${eps} .1)
dirty="${base}.dirty.hpgl"
clean="${base}.hpgl"
pstoedit -f plot-hpgl "${eps}" "${dirty}"
# Clean HPGL
cat "${dirty}" | python clean.py > "${clean}"
#rm "${dirty}"
else
echo "Usage: eps2hpgl.sh [epsfile]"
echo "Converts eps file to hpgl description"
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment