[ pdftex-Feature Requests-421 ] \pdf shell escape addition
Feature Requests item #421, was opened at 2005-08-27 00:02 You can respond by visiting: http://sarovar.org/tracker/?func=detail&atid=496&aid=421&group_id=106 Category: None Group: None Status: Open Resolution: Accepted Priority: 5 Submitted By: ivo welch (iaw4) Assigned to: Taco Hoekwater (taco) Summary: \pdf shell escape addition Initial Comment: I would humbly request that in addition add to \write18 ('--shell-escape'), you add a new command, say \input18 (or \pdftexshellinput18), which like \write18 executes a system() command on its argument, but which then pushes the stdout output from this shell command into the stdin stream that TeX is processing. (no, writing to a file and then inputting it does not do the job.) I cannot contribute to the code base of TeX, which seems like black magic to me. But I can offer $300 for this facility. If someone was planning to spend the time to do this anyway, this may push him/her over the margin. However, it is important to me that this enters the standard feature set of pdftex, so that it will persist through future versions, so this would be part of the bargain here. regards, /ivo welch ---------------------------------------------------------------------- Comment By: Nobody (None) Date: 2006-06-12 22:19 Message: Logged In: NO
one of the reasons why intermediate files don't work is that it interferes with flushing of files [and the moment that files are seen]
i.e. even \immediate\closeout doesn't make the file immediately visible and fully readable? isn't this a bug, if it is so? nevertheless, the Taco's implementation of this feature is nice; btw, how will this work in case of non-immediate \openin and \openout? (in case they will end up executed during the \shipout?) ---------------------------------------------------------------------- Comment By: Hans Hagen (hagen) Date: 2006-06-12 14:38 Message: Logged In: YES user_id=927 it may interest you that taco, fabrice an i have been playing with piping the last couple of weeks; we're still struggling with decent ways to get around operating system related problems; in order for such a feature (actually more generic that you suggest) to work, it must be cross platform; btw, one of the reasons why intermediate files don't work is that it interferes with flushing of files [and the moment that files are seen] Hans ---------------------------------------------------------------------- Comment By: Taco Hoekwater (taco) Date: 2006-06-11 19:06 Message: Logged In: YES user_id=1608 Hi Ivo, Sorry, I had completely forgotten about this. Attached is a (preliminary?) patch for openclose.c (in the texk/web2c/lib directory) that gives this functionality. It is a really simple thing: if the first character of a filename for \openin or \openout is a pipe symbol (|), the filename is assumed to be a request for a pipe to a command line that is given in the rest of the filename. Of course, you need "shell_escape = t" in your texmf.cnf for this to work. And whether or not this makes it to the distribution(s) is not up to me, of course. Have fun, Taco ------------------- Two small examples: \openin1= "|ls -l" \loop \unless \ifeof1 \read1 to \cs \message{\meaning\cs} \repeat \openout1= "|sort >alphabet.tex" \write1{b} \write1{a} \write1{c} \closeout1 \bye ---------------------------------------------------------------------- Comment By: Nobody (None) Date: 2006-06-11 08:28 Message: Logged In: NO could you please clarify why "no, writing to a file and then inputting it does not do the job"? ---------------------------------------------------------------------- Comment By: ivo welch (iaw4) Date: 2006-06-11 02:35 Message: Logged In: YES user_id=2771 any chance this will happen, taco? regards, /ivo ---------------------------------------------------------------------- Comment By: Taco Hoekwater (taco) Date: 2005-08-27 12:31 Message: Logged In: YES user_id=1608 I have an idea on how to do this, so I've assigned it to myself ---------------------------------------------------------------------- You can respond by visiting: http://sarovar.org/tracker/?func=detail&atid=496&aid=421&group_id=106
participants (1)
-
noreply@sarovar.org