ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Output result to specified file path
@ 2021-03-30  5:05 Thangalin
  2021-03-30  7:13 ` Henning Hraban Ramm
  2021-03-30  7:16 ` denis.maier
  0 siblings, 2 replies; 5+ messages in thread
From: Thangalin @ 2021-03-30  5:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 356 bytes --]

How do you set the target output path and file name? Consider:

% SOF
\starttext
  Hello
\stoptext
% EOF

Save as $HOME/test.tex and then:

mkdir /tmp/subdir
context --result=/tmp/subdir/test.pdf $HOME/test.tex

Expected: PDF file is created in /tmp/subdir directory.

Actual: PDF file is created in $HOME directory.

Version: 2021.03.27 19:09

Thank you!

[-- Attachment #1.2: Type: text/html, Size: 633 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Output result to specified file path
  2021-03-30  5:05 Output result to specified file path Thangalin
@ 2021-03-30  7:13 ` Henning Hraban Ramm
  2021-03-30  8:02   ` Hans Hagen
  2021-03-30  7:16 ` denis.maier
  1 sibling, 1 reply; 5+ messages in thread
From: Henning Hraban Ramm @ 2021-03-30  7:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users



> Am 30.03.2021 um 07:05 schrieb Thangalin <thangalin@gmail.com>:
> 
> How do you set the target output path and file name? Consider:
> context --result=/tmp/subdir/test.pdf $HOME/test.tex
> 
> Expected: PDF file is created in /tmp/subdir directory.
> 
> Actual: PDF file is created in $HOME directory.

That’s known behavior. ConTeXt will never write to other directories than the current.

Sorry. Doesn’t fit my needs, too.

Hraban

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Output result to specified file path
  2021-03-30  5:05 Output result to specified file path Thangalin
  2021-03-30  7:13 ` Henning Hraban Ramm
@ 2021-03-30  7:16 ` denis.maier
  1 sibling, 0 replies; 5+ messages in thread
From: denis.maier @ 2021-03-30  7:16 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1: Type: text/plain, Size: 1092 bytes --]

IIRC, there’s currently no support for this.
--result= can be used to rename the output file, but it can not be used to create the file in a specific directory, nor to move it there.
Such a feature would be quite useful though, I think.
Maybe two options?

--result=foo.pdf => rename output to foo.pdf
--output-dir=/somedir => create output file in /somedir (but keep the regular file name)

--result=/somedir/foo.pdf => create foo.pdf at a specific location.

Denis

Von: ntg-context <ntg-context-bounces@ntg.nl> Im Auftrag von Thangalin
Gesendet: Dienstag, 30. März 2021 07:06
An: mailing list for ConTeXt users <ntg-context@ntg.nl>
Betreff: [NTG-context] Output result to specified file path

How do you set the target output path and file name? Consider:

% SOF
\starttext
  Hello
\stoptext
% EOF

Save as $HOME/test.tex and then:

mkdir /tmp/subdir
context --result=/tmp/subdir/test.pdf $HOME/test.tex

Expected: PDF file is created in /tmp/subdir directory.

Actual: PDF file is created in $HOME directory.

Version: 2021.03.27 19:09

Thank you!

[-- Attachment #1.2: Type: text/html, Size: 4898 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Output result to specified file path
  2021-03-30  7:13 ` Henning Hraban Ramm
@ 2021-03-30  8:02   ` Hans Hagen
  2021-03-30 15:40     ` Thangalin
  0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2021-03-30  8:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Henning Hraban Ramm

On 3/30/2021 9:13 AM, Henning Hraban Ramm wrote:
> 
> 
>> Am 30.03.2021 um 07:05 schrieb Thangalin <thangalin@gmail.com>:
>>
>> How do you set the target output path and file name? Consider:
>> context --result=/tmp/subdir/test.pdf $HOME/test.tex
>>
>> Expected: PDF file is created in /tmp/subdir directory.
>>
>> Actual: PDF file is created in $HOME directory.
> 
> That’s known behavior. ConTeXt will never write to other directories than the current.
> 
> Sorry. Doesn’t fit my needs, too.
just do the reverse: go to the wanted path and run from there (and use 
--path for picking up stuff)

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Output result to specified file path
  2021-03-30  8:02   ` Hans Hagen
@ 2021-03-30 15:40     ` Thangalin
  0 siblings, 0 replies; 5+ messages in thread
From: Thangalin @ 2021-03-30 15:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 348 bytes --]

From https://wiki.contextgarden.net/Run_scripts

context --jit prd_${PRD} --result=_pdf/$RESULT --mode=$MOD

Does this mean the example is incorrect? Or did it once work and the
behaviour has since changed? Or is it that relative directories are fine
but absolute paths won't work?

Let me know and I'll update the wiki with the correct behaviour.

[-- Attachment #1.2: Type: text/html, Size: 528 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-30 15:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-30  5:05 Output result to specified file path Thangalin
2021-03-30  7:13 ` Henning Hraban Ramm
2021-03-30  8:02   ` Hans Hagen
2021-03-30 15:40     ` Thangalin
2021-03-30  7:16 ` denis.maier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).