Re: [NTG-context] Running a couple of context statements in a linux bash shell heredocument?

2021-04-01 Thread Henri Menke
On Thu, 2021-04-01 at 16:23 +0200, Alexander Rosenstock wrote:
> Hi all,
>  
> is it possible running a couple of context statements as a
> heredocument integrated in a - for example linux bash - shellscript?
> Do you have any experience or idea or alternative solution?
>  

This will work, but only if file_that_does_not_exist (possibly with
additional file extensions) does not exist:

$ cat <<'EOF' | context file_that_does_not_exist
\starttext
Hello world!
\stoptext
EOF


Cheers, Henri

> If needed, I will deliver a - not yet runnable - minimal example
> here, of course ...
>  
> Thanks a lot in advance for any support!
>  
> Alexander
> _
> __
> If your question is of interest to others as well, please add an
> entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / 
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> _
> __

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Running a couple of context statements in a linux bash shell heredocument?

2021-04-01 Thread a . rosenstock
Thank you, Henri and Aditya! With the "-pipe" I get it to work, too. And the last line of my shellscript - "mv cont-new.pdf my-file.pdf", "my-file" given as a position parameter, I've got my output name ...

 

Cheers, Alexander

 
 

Gesendet: Donnerstag, 01. April 2021 um 18:22 Uhr
Von: "Aditya Mahajan" 
An: "mailing list for ConTeXt users" 
Betreff: Re: [NTG-context] Running a couple of context statements in a linux bash shell heredocument?

On Thu, 1 Apr 2021, Henri Menke wrote:

> On Thu, 2021-04-01 at 16:23 +0200, Alexander Rosenstock wrote:
> > Hi all,
> >
> > is it possible running a couple of context statements as a
> > heredocument integrated in a - for example linux bash - shellscript?
> > Do you have any experience or idea or alternative solution?
> >
>
> This will work, but only if file_that_does_not_exist (possibly with
> additional file extensions) does not exist:
>
> $ cat <<'EOF' | context file_that_does_not_exist
> \starttext
> Hello world!
> \stoptext
> EOF

I couldn't get that to work but this works ...

$cat <<'EOF' | context --pipe
\starttext
Hello world!
\stoptext
EOF

Generates a file called cont-new.pdf. I could not change it using --result or --jobname.

Aditya

___
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___



___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Running a couple of context statements in a linux bash shell heredocument?

2021-04-01 Thread Aditya Mahajan
On Thu, 1 Apr 2021, Henri Menke wrote:

> On Thu, 2021-04-01 at 16:23 +0200, Alexander Rosenstock wrote:
> > Hi all,
> >  
> > is it possible running a couple of context statements as a
> > heredocument integrated in a - for example linux bash - shellscript?
> > Do you have any experience or idea or alternative solution?
> >  
> 
> This will work, but only if file_that_does_not_exist (possibly with
> additional file extensions) does not exist:
> 
> $ cat <<'EOF' | context file_that_does_not_exist
> \starttext
> Hello world!
> \stoptext
> EOF
 
I couldn't get that to work but this works ...

$cat <<'EOF' | context --pipe 
\starttext
Hello world!
\stoptext
EOF

Generates a file called cont-new.pdf. I could not change it using --result or 
--jobname.

Aditya

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___