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

M Elwood151 at web.de
Sun Mar 22 06:33:51 CET 2015


Thanks for your support!

> <path-to-IPE-bundle> should be /Applications/_Software/IPE7/Ipe.app/
 (although I had guessed that it would have been /Applications/IPE7/Ipe.app)

this is because I (manually) copied the IPE.app into my ³_Software²
directory.

I tried your suggestion 2:

created the link to the ipescript in my ~/bin directory
ln -s 
/Applications/_Software/IPE7/Ipe.app/Contents/Resources/local/bin/ipescript

and added the ~/bin directory to my Path by adding the following line to my
bash profile in ~/.profile:
export PATH=~/bin:$PATH

that worked well.

However, I then decided to link to the IPE.app content directly to keep
everything consistent.
So I removed the symlink and instead added to my bash profile ~/.profile the
following lines:

#for IPE 7.1.6     
export 
PATH=/Applications/_Software/IPE7/Ipe.app/Contents/Resources/local/bin:$PATH
export 
IPESCRIPTS=/Applications/_Software/IPE7/Ipe.app/Contents/Resources/local/sha
re/ipe/7.1.6/scripts

So now I have all the current commands
    ipe
    ipe6upgrade
    ipeextract
    iperender
    ipescript
    ipetoipe
    ipeview
and all the current scripts
    add-style.lua
    update-master.lua
    update-styles.lua
of IPE 7.1.6 directly available in Terminal.

But that also means that after an update to e.g. IPE 7.1.7 I¹ll have to
change that bash profile or will run into problems.

@Otfried:
might it make sense to define a menu command in IPE for OS X which does that
automatically (so adding the 2 directories (according to the current path to
IPE.app) to the bash profile of the current user?
I know that other GUI applications in OS X like e. g. the Text Editor
TextWrangler do have such a menu command which installs command line tools (

Kind regards

Martin



Von: Gijs van Oort <g.vanoort at ewi.utwente.nl>
Datum: Wed, 18 Mar 2015 13:57:25 +0100
An: <ipe-discuss at lists.science.uu.nl>
Betreff: Re: [Ipe-discuss] How to update IPE documents (pdf) from command
line?

   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:$PAT
H"  
    (see also 
http://hathaway.cc/post/69201163472/how-to-edit-your-path-environment-variab
les-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/style>
s
> 
> (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>
>>> <mailto:otfried at ipe.airpost.net>
>>> Datum: Sun, 15 Mar 2015 18:09:33 +0900
>>> An: <ipe-discuss at lists.science.uu.nl>
>>> <mailto: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
>  
 
 

_______________________________________________
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/20150322/062ee138/attachment.html 


More information about the Ipe-discuss mailing list