Le 26 mai 07 à 18:07, Mael Hilléreau a écrit :
I finally wrote a small Applescript (see attached file) that
allows to convert Omnigraffle files to PDF, PNG... directly from
the command line. In order to use it, go to LyX preferences, add
an OmniGraffle file format (just type "auto" for the editor), and
then add converters. By now, I successfully added converters from
OmniGraffle to PNG, EPS and PDF. Here are the commands I used:
OmniGraffle -> PDF (ps2pdf)
Converter: osascript replace/with/path/to/og-export.scpt `pwd`/$
$i `pwd`/$$o pdf
OmniGraffle -> EPS
Converter: osascript replace/with/path/to/og-export.scpt `pwd`/$
$i `pwd`/$$o eps
OmniGraffle -> PNG
Converter: osascript replace/with/path/to/og-export.scpt $$i $$o
png
To developers: the `pwd` command is used only with PDF and EPS
because $$i and $$o are not substituted in the same way (absolute
path for PNG and only file name for PDF and EPS). I suspect that
this difference corresponds to vector and non vector graphics
formats. Why such a distinction?
Note that I've just put a new version of "og-convert.scpt" on the
LyX wiki. This new version eliminates a bug occurring when the
'.graffle' file extension wasn't displayed in the Finder.
I put the script as code listing (see http://wiki.lyx.org/Mac/
Mac#toc6). It would be more convenient to give it as a file named "og-
export.scpt". Could anyone give me the upload password?
Thanks in advance,
Mael.
--
Mael Hilléreau
http://mael.hillereau.free.fr