用户登录
用户注册

分享至

eps to svg

  • 作者: 黑子39342533
  • 来源: 51数据库
  • 2020-09-29
linux下libreoffice对eps支持不好,再分享一下这个不错的脚本。
运行此脚本后,会将原EPS删除并重命名备份在 $HOME/local/bak 目录下。

#!/bin/bash

dir_bak=${HOME}/local/bak
dir_eps=${HOME}/local/bak/eps

if [ ! -d ${dir_bak} ]; then
mkdir -p ${dir_bak}
fi

if [ ! -d "${dir_eps}" ]; then
mkdir -p ${dir_eps}
fi

check=$(ls|grep eps)
if [ ! -z "${check}" ]; then
for fullfile in *.eps; do
filename="${fullfile%.*}"
extension="${fullfile##*.}"
# if [ ! -f ${filename}.svg ]; then
echo "${fullfile} --> ${filename}.svg"
ps2pdf -dEPSCrop ${fullfile} tmp.pdf
pdf2svg tmp.pdf ${filename}.svg
rm tmp.pdf
mv ${fullfile} ${dir_eps}
mv ${dir_eps}/${fullfile} ${dir_eps}/$(date +%y%m%d%H%M%S)_${fullfile}
# fi
done
fi



  试试inkscape软件或者ai软件
软件
前端设计
程序设计
Java相关