[Ipe-discuss] How to update IPE documents (pdf) from command line?

Gijs van Oort g.vanoort at ewi.utwente.nl
Wed Mar 18 13:57:25 CET 2015


As a partial Mac user (but with no Mac at hand at that moment), I 
answered the question for Martin,
but didn't realize that it would not go to the list. Also, because I 
couldn't test my advices,
I'm not sure whether it would have been a good idea at all to put it on 
the list (and give wrong advice
to everone who considers this list as the Truth (which it usually is)).

Anyway, judging from my private email conversation with Martin,
<path-to-IPE-bundle> should be /Applications/_Software/IPE7/Ipe.app/
(although I had guessed that it would have been /Applications/IPE7/Ipe.app)

For a 'normal' user, using Finder (Mac's equivalent to Windows 
Explorer), Ipe.app
looks like a single application, but in reality it is a folder with many 
subfolders.
These can only be accessed from the command line (as was the wish of the 
topic starter).

The export IPESCRIPTS=..... comand (which should be one line) can be put 
in the file ~/.bash_profile .

In order to make sure that you can execute the binary from any 
directory, you can do one of the following:
1. You can add a symlink to the executable into your own bin directory. 
For that, first go to the ~/bin
     directory and then create the link:
cd ~/bin
   ln -s 
/Applications/_Software/IPE7/Ipe.app/Contents/Resources/local/bin/ipescript
    After this, you should, from any directory, be able to execute 
ipescript by just typing
ipescript
2. Alternatively, you could add the directory
     /Applications/_Software/IPE7/Ipe.app/Contents/Resources/local/bin
    to your search path. For that, include in ~/.bash_profile the 
following line:
   export 
PATH="/Applications/_Software/IPE7/Ipe.app/Contents/Resources/local/bin:$PATH" 

    (see also 
http://hathaway.cc/post/69201163472/how-to-edit-your-path-environment-variables-on-mac) 

    I think that, in that case, you need to execute the executable with
    ./ipescript

Best regards,

Gijs

On 3/18/2015 3:50, Otfried Cheong wrote:
> I was hoping a Mac user would answer this, as I don't know exactly how
> it works.
>
> First of all, you need to have the "ipescript" program on your path.
> It's in the same place as the Ipe binary itself.  You should be able to
> say "ipescript" on the command line and see the following output:
>
> $ ipescript
> Usage: ipescript <script> { <arguments> }
> Ipescript runs a script from your scripts directories with
> the given arguments.
> Do not include the .lua extension in the script name.
>
> The standard scripts add-style.lua and update-styles.lua are in the
> system-wide Ipe scripts directory, which is probably
> <path-to-Ipe-bundle>/Contents/Resources/local/share/ipe/7.1.7/styles/
>
> If ipescript cannot find the script, you would see the following output:
>
> $ ipescript add-style
> [string "require "add-style""]:1: module 'add-style' not found:
>
> That means that the path to the scripts directory is not set up
> correctly.  It should suffice to set the environment variable
> IPESCRIPTS, like this:
>
> export
> IPESCRIPTS=<path-to-Ipe-bundle>/Contents/Resources/local/share/ipe/7.1.7/styles
>
> (I have no idea what the <path-to-Ipe-bundle> is, and in any case the
> program should be fixed to find the directory itself...)
>
> Cheers,
>   Otfried
>
>
> On Mon, Mar 16, 2015, at 18:23, M wrote:
>> Dear Otfried,
>>
>> thanks a lot for your quick and helpful reply!
>> I'm currently using the binary version of IPE 7.1.6 on MacOS X.
>>
>> The scripts seem to be included in the IPE.app application file, but how
>> can
>> I run them from the command line or install them to a place where the
>> command line finds them?
>>
>> Kind regards
>>
>> Martin
>>
>>
>>> Von: Otfried Cheong<otfried at ipe.airpost.net>
>>> Datum: Sun, 15 Mar 2015 18:09:33 +0900
>>> An:<ipe-discuss at lists.science.uu.nl>
>>> Betreff: Re: [Ipe-discuss] How to update IPE documents (pdf) from command
>>> line?
>>>
>>> The Ipe scripts add-style and update-styles do exactly what you need.
>>> See
>>>
>>> http://ipe7.sourceforge.net/manual/manual_49.html
>>>
>>> There should be more documentation about this, I know.  You may also
>>> want to check out the update-master script.
>>>
>>> Cheers,
>>>   Otfried
>>>
>>> On Sun, Mar 15, 2015, at 15:06, M wrote:
>>>> I have a lot of IPE documents as graphics for my thesis.
>>>> I'm using a separate .tex file for general settings and latex commands,
>>>> which I have included in each IPE document by
>>>>
>>>> \input{path-to-my-tex-settings.tex}
>>>>
>>>> in the LaTeX preamble field.
>>>>
>>>> Now I changed some of those settings and I want to update all the pdf
>>>> documents without opening each one in IPE.
>>>>
>>>> I'm sorry, if this is obvious, but how can I do that from the command
>>>> line?
>>>> (so update and save each pdf file again by ipe)
>>>>
>>>> Thanks a lot and kind regards
>>>>
>>>> Martin
>>>>
>>>>
>>>> _______________________________________________
>>>> Ipe-discuss mailing list
>>>> Ipe-discuss at lists.science.uu.nl
>>>> http://lists.science.uu.nl/mailman/listinfo/ipe-discuss
>>> _______________________________________________
>>> Ipe-discuss mailing list
>>> Ipe-discuss at lists.science.uu.nl
>>> http://lists.science.uu.nl/mailman/listinfo/ipe-discuss
> _______________________________________________
> Ipe-discuss mailing list
> Ipe-discuss at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/ipe-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/ipe-discuss/attachments/20150318/566854a8/attachment.html 


More information about the Ipe-discuss mailing list