Le 23 mai 07 à 13:36, Mael Hilléreau a écrit :
Le 23 mai 07 à 11:53, Jean-Marc Lasgouttes a écrit :What about adding the format .graffle in your preferences anddocumenting the command to create a pdf from graffle (assuming this ispossible, of course). The you just insert the graffle file into LyX and forget about the rest.Ooops, I thought that converters were only used to produce output (and not in LyX window)... Indeed, this is the right way of doing things. However, the shell is still useful when the editor doesn't have a command line mode, which seems to be the case of OmniGraffle.
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 -> EPSConverter: 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 pngTo 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?
Mael. -- Mael Hilléreau http://mael.hillereau.free.fr
og-export.scpt
Description: Binary data
