ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* tempdir support in texexec.rb
@ 2006-07-17 14:23 Matthias Wächter
  2006-07-17 19:35 ` Hans Hagen
  2006-07-18 10:40 ` Mojca Miklavec
  0 siblings, 2 replies; 9+ messages in thread
From: Matthias Wächter @ 2006-07-17 14:23 UTC (permalink / raw)


Hi,

Naively, I thought that the --tempdir option would allow the 'temporary' files created/updated at a run of texexec be written to whatever is given as --tempdir=/dir/, but it doesn't work, the files remain in the current directory. Additionally, --output seems to disallow the output be put into another directory (it's always put into `pwd`).

Is there a (better?) way to specify where these files should go?

What I'd expect is a directory layout like the following:

files/
      onesource.tex
      env.tex
      othersource.tex
      project.tex
      out/
          project.pdf
      tmp/
          project.tmp
          project.log
          project.tui
          project.tuo
          mpgraph.mp
          project-mpgraph.mp

as a result of

$ cd files/
$ texexec --pdf --tempdir=tmp --output=out/project.pdf project

Is /me the only one who desires such a split?

- Matthias

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

* Re: tempdir support in texexec.rb
  2006-07-17 14:23 tempdir support in texexec.rb Matthias Wächter
@ 2006-07-17 19:35 ` Hans Hagen
  2006-07-18  7:38   ` Matthias Wächter
  2006-07-18 10:40 ` Mojca Miklavec
  1 sibling, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2006-07-17 19:35 UTC (permalink / raw)


Matthias Wächter wrote:
> Hi,
>
> Naively, I thought that the --tempdir option would allow the 'temporary' files created/updated at a run of texexec be written to whatever is given as --tempdir=/dir/, but it doesn't work, the files remain in the current directory. Additionally, --output seems to disallow the output be put into another directory (it's always put into `pwd`).
>
> Is there a (better?) way to specify where these files should go?
>   
currently not, an option like that is doable but would involve both an 
patch to context itself (runtime locating files) and texexec 
(inbetween/postprocessing) [pretty fuzzy btw]

if it's because of the temp files. you can run with --purge and get them 
removed
> What I'd expect is a directory layout like the following:
>
> files/
>       onesource.tex
>       env.tex
>       othersource.tex
>       project.tex
>       out/
>           project.pdf
>       tmp/
>           project.tmp
>           project.log
>           project.tui
>           project.tuo
>           mpgraph.mp
>           project-mpgraph.mp
>
> as a result of
>
> $ cd files/
> $ texexec --pdf --tempdir=tmp --output=out/project.pdf project
>   
--output concerns the backend while --result

texexec test --result=what/oeps

should work ok given that what exists (i'll add a check for existence)
> Is /me the only one who desires such a split?
>   
I think so 

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: tempdir support in texexec.rb
  2006-07-17 19:35 ` Hans Hagen
@ 2006-07-18  7:38   ` Matthias Wächter
  2006-07-18  8:29     ` Hans Hagen
  0 siblings, 1 reply; 9+ messages in thread
From: Matthias Wächter @ 2006-07-18  7:38 UTC (permalink / raw)


On 17.07.2006 21:35, Hans Hagen wrote:
> Matthias Wächter wrote:
>> Naively, I thought that the --tempdir option would allow the 'temporary' files created/updated at a run of texexec be written to whatever is given as --tempdir=/dir/, but it doesn't work, the files remain in the current directory. Additionally, --output seems to disallow the output be put into another directory (it's always put into `pwd`).
>> Is there a (better?) way to specify where these files should go?
> currently not, an option like that is doable but would involve both an 
> patch to context itself (runtime locating files) and texexec 
> (inbetween/postprocessing) [pretty fuzzy btw]

I see.

> if it's because of the temp files. you can run with --purge and get them 
> removed

Well, then Context could not benefit from "incremental" builds with just one run instead of 4 to 5 runs. But I get the idea.

>> $ texexec --pdf --tempdir=tmp --output=out/project.pdf project
> --output concerns the backend while --result
> 
> texexec test --result=what/oeps
> 
> should work ok given that what exists (i'll add a check for existence)
>> Is /me the only one who desires such a split?
> I think so 

Then, is there a list of files that are automatically created by Context (not mentioning files that are manually created as part of TeX output functions and such)?

The prime aspect of my question is to have a reasonable list of file names that shouldn't be version controlled with the source code. Our scripts automatically check for unknown files and mark our documents tainted if the local version is not consistent with the repository (say, completely committed and updated). If I could instruct context to put all temporary files into a separate directory, I could simply put "tmp/*" to the ignore list, and that's it.

Maybe for this task, --purge is reasonable enough. I'll give it a try.

Thanks, Hans!

- Matthias
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: tempdir support in texexec.rb
  2006-07-18  7:38   ` Matthias Wächter
@ 2006-07-18  8:29     ` Hans Hagen
  2006-07-18  9:01       ` Matthias Wächter
  0 siblings, 1 reply; 9+ messages in thread
From: Hans Hagen @ 2006-07-18  8:29 UTC (permalink / raw)


Matthias Wächter wrote:
> On 17.07.2006 21:35, Hans Hagen wrote:
>   
>> Matthias Wächter wrote:
>>     
>>> Naively, I thought that the --tempdir option would allow the 'temporary' files created/updated at a run of texexec be written to whatever is given as --tempdir=/dir/, but it doesn't work, the files remain in the current directory. Additionally, --output seems to disallow the output be put into another directory (it's always put into `pwd`).
>>> Is there a (better?) way to specify where these files should go?
>>>       
>> currently not, an option like that is doable but would involve both an 
>> patch to context itself (runtime locating files) and texexec 
>> (inbetween/postprocessing) [pretty fuzzy btw]
>>     
>
> I see.
>
>   
>> if it's because of the temp files. you can run with --purge and get them 
>> removed
>>     
>
> Well, then Context could not benefit from "incremental" builds with just one run instead of 4 to 5 runs. But I get the idea.
>   
eh ... the tuo file is kept
>
> Maybe for this task, --purge is reasonable enough. I'll give it a try.
>   
that's indeed the best way to go; btw, here i only version tex files 

Hans 
 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: tempdir support in texexec.rb
  2006-07-18  8:29     ` Hans Hagen
@ 2006-07-18  9:01       ` Matthias Wächter
  2006-07-18  9:50         ` Hans Hagen
  2006-07-18  9:51         ` Hans Hagen
  0 siblings, 2 replies; 9+ messages in thread
From: Matthias Wächter @ 2006-07-18  9:01 UTC (permalink / raw)


On 18.07.2006 10:29, Hans Hagen wrote:
>>> if it's because of the temp files. you can run with --purge and get them 
>>> removed
>> Well, then Context could not benefit from "incremental" builds with just one run instead of 4 to 5 runs. But I get the idea.
> eh ... the tuo file is kept

Appearantly, only mpgraph.mp is removed by --purge, and --purgeall only gives some CtxTools help messages. Hmm ...

>> Maybe for this task, --purge is reasonable enough. I'll give it a try.
>>   
> that's indeed the best way to go; btw, here i only version tex files 

Depending on the process you have to maintain (you know, I mentioned Context version numbers before ...), you want to version everything except stuff that is there and unversioned by intent. At least you want to get warned of new files you may have forgotten to put under revision control, and as said, you may want to mark the document tainted because of unclean checkouts. The easiest approach would be to have a separate directory for non-output related stuff like .tmp, .log, .tui, .tuo, .mp, then any other unversioned file would be a sign of unallowed modification.

OK, I will simply mark *.tmp, *.log, *.tui and *.tuo as "ignore".

What's the difference between mpgraph.mp and <project>-mpgraph.mp ? The latter is not removed when using --purge. Is this by intent? Then I have to put *-mpgraph.mp to the ignore list, too.

- Matthias

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

* Re: tempdir support in texexec.rb
  2006-07-18  9:01       ` Matthias Wächter
@ 2006-07-18  9:50         ` Hans Hagen
  2006-07-18  9:51         ` Hans Hagen
  1 sibling, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2006-07-18  9:50 UTC (permalink / raw)


Matthias Wächter wrote:
> On 18.07.2006 10:29, Hans Hagen wrote:
>   
>>>> if it's because of the temp files. you can run with --purge and get them 
>>>> removed
>>>>         
>>> Well, then Context could not benefit from "incremental" builds with just one run instead of 4 to 5 runs. But I get the idea.
>>>       
>> eh ... the tuo file is kept
>>     
>
> Appearantly, only mpgraph.mp is removed by --purge, and --purgeall only gives some CtxTools help messages. Hmm ...
>
>   
>>> Maybe for this task, --purge is reasonable enough. I'll give it a try.
>>>   
>>>       
>> that's indeed the best way to go; btw, here i only version tex files 
>>     
>
> Depending on the process you have to maintain (you know, I mentioned Context version numbers before ...), you want to version everything except stuff that is there and unversioned by intent. At least you want to get warned of new files you may have forgotten to put under revision control, and as said, you may want to mark the document tainted because of unclean checkouts. The easiest approach would be to have a separate directory for non-output related stuff like .tmp, .log, .tui, .tuo, .mp, then any other unversioned file would be a sign of unallowed modification.
>
> OK, I will simply mark *.tmp, *.log, *.tui and *.tuo as "ignore".
>   
in ctxtools you can find a more detailed list (*-mpgraph *-mprun, 
*..mpt, *.mpd, etc)
> What's the difference between mpgraph.mp and <project>-mpgraph.mp ? The latter is not removed when using --purge. Is this by intent? Then I have to put *-mpgraph.mp to the ignore list, too.
>   
after we introduced the mpgraph name there suddenly apeared a similar file in the metapost paths; so, in order to prevent loading of that file by mistake, (e.g. when not using the prefixing) i create an empty one in the current path. the -mpgraph.mp plays a role in determining multiple runs when not in runtime graphics mode, but it does not need versioning 

Hans  


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: tempdir support in texexec.rb
  2006-07-18  9:01       ` Matthias Wächter
  2006-07-18  9:50         ` Hans Hagen
@ 2006-07-18  9:51         ` Hans Hagen
  1 sibling, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2006-07-18  9:51 UTC (permalink / raw)


Matthias Wächter wrote:
>
> OK, I will simply mark *.tmp, *.log, *.tui and *.tuo as "ignore".
>   
i've marked (in tortoise) the following ones:

*.tui *.tuo *.tub *.log *.top *.tmp *mpgraph* *mprun*
>   
 

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

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

* Re: tempdir support in texexec.rb
  2006-07-17 14:23 tempdir support in texexec.rb Matthias Wächter
  2006-07-17 19:35 ` Hans Hagen
@ 2006-07-18 10:40 ` Mojca Miklavec
  2006-07-19  9:43   ` Hans Hagen
  1 sibling, 1 reply; 9+ messages in thread
From: Mojca Miklavec @ 2006-07-18 10:40 UTC (permalink / raw)


On 7/17/06, Matthias Wächter wrote:
> Hi,
>
> Naively, I thought that the --tempdir option would allow the 'temporary' files created/updated at a run of texexec be written to whatever is given as --tempdir=/dir/, but it doesn't work, the files remain in the current directory. Additionally, --output seems to disallow the output be put into another directory (it's always put into `pwd`).
>
> Is there a (better?) way to specify where these files should go?
>
> What I'd expect is a directory layout like the following:
>
> files/
>       onesource.tex
>       env.tex
>       othersource.tex
>       project.tex
>       out/
>           project.pdf
>       tmp/
>           project.tmp
>           project.log
>           project.tui
>           project.tuo
>           mpgraph.mp
>           project-mpgraph.mp
>
> as a result of
>
> $ cd files/
> $ texexec --pdf --tempdir=tmp --output=out/project.pdf project
>
> Is /me the only one who desires such a split?

I would vote for that feature too. With LaTeX you only get
approximately two or three additional files which is still acceptable,
but esp. when using modules such as R and (yet unfinished) gnuplot,
the whole folder becomes pretty messy and you never know what to
delete and what not. It's almost impossible to extend ctxtools to
delete all the necessary files since even PDF files might serve as
"temporary" files in "static" MP figures or as intermediate results of
gnuplot runs, ...

Mojca

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

* Re: tempdir support in texexec.rb
  2006-07-18 10:40 ` Mojca Miklavec
@ 2006-07-19  9:43   ` Hans Hagen
  0 siblings, 0 replies; 9+ messages in thread
From: Hans Hagen @ 2006-07-19  9:43 UTC (permalink / raw)


Mojca Miklavec wrote:
> I would vote for that feature too. With LaTeX you only get
> approximately two or three additional files which is still acceptable,
>   
keep in mind that the truckload of extra files is related to all kind of 
runtime plug ins, so one gets what he/she asks for -)
> but esp. when using modules such as R and (yet unfinished) gnuplot,
> the whole folder becomes pretty messy and you never know what to
> delete and what not. It's almost impossible to extend ctxtools to
> delete all the necessary files since even PDF files might serve as
> "temporary" files in "static" MP figures or as intermediate results of
> gnuplot runs, ...
>   
i took a look at it but it's not trivial esp since other progs also expect files in the current path 

the best approach is to 'register temp files' and clean them up afterwards; doable but can best be implemented stepwise 

Hans 


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------

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

end of thread, other threads:[~2006-07-19  9:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-17 14:23 tempdir support in texexec.rb Matthias Wächter
2006-07-17 19:35 ` Hans Hagen
2006-07-18  7:38   ` Matthias Wächter
2006-07-18  8:29     ` Hans Hagen
2006-07-18  9:01       ` Matthias Wächter
2006-07-18  9:50         ` Hans Hagen
2006-07-18  9:51         ` Hans Hagen
2006-07-18 10:40 ` Mojca Miklavec
2006-07-19  9:43   ` Hans Hagen

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).