Open tohecz opened 6 years ago
I've logged a core issue: I'll likely start small ...
Security issues should be examined with great care, see repstopdf
versus epstopdf
.
@eg9 Support here is all dependent on shell escape: the security issues are handled at the engine level, really.
Hi Enrico! Sure that's correct, but on the other hand, that's possibly an issue on the L3 site. On my site, the person running pdflatex file.tex
has a full control of what he asks for, so he should make sure to be safe...
I've added a first-pass set of functions here: the gs
one is more-or-less impossible as it's not on the path on Windows as-standard. Thus far I've covered the basic file/shell ops. I think calling a TeX tool shouldn't need any abstract logic: just
\sys_shell_now:n { <engine> ~ <filename> }
should be OK I think.
(Same comment could be logged under https://github.com/latex3/latex3/issues/468, but the detail is given here anyway.)
Currently, file manipulation is done by running
cp
,rm
and friends by names. This is platform dependent. The LaTeX3 team promised they'll look into this and eventually provide l3sys wrappers for these.The list of commands that would be useful:
cp folder/file.ext anotherfolder/anotherfile.ext
mv folder/file.ext anotherfolder/anotherfile.ext
mkdir -p folder
(make sure the folder exists)rm -f folder/*.ext
(make sure thatfolder
does not contain any*.ext
files)mkdir -p folder && rm -f folder/*.ext
(this is what we actually need: the previous two entries combined, i.e. make sure thatfolder
exists and does not contain any*.ext
files)rm file.ext
gs SOME OPTIONS HERE < /dev/null
(a standard call to GhostScript e.g. to convert a PDF to grayscale)pwd
(get the current working directory; note that we need result of this operation, not just having this called); this would allow to dropcurrfile.sty
dependency.While we are here, there are other possibly useful things:
ls
andls -R
wget