[tex-live] TeXLive (Windows) bash script -> exe
josef.kleber at gmx.de
Tue May 20 11:53:35 CEST 2014
Am 20.05.2014 01:51, schrieb Norbert Preining:
> On Mon, 19 May 2014, Josef Kleber wrote:
>> i wrote a bash script osmimage
> Besides all the other answers, ... here my comments:
> * it would have been nice to actually attach the script, as it is
> not very long. I do it now. (attachment "osmimage")
There was a link, i didn't want to be too intrusive! ;-)
> * reading through it I guess it takes me with practically no
> knowledge of lua at most 1h to rewrite it in lua, if you ask
> one lua expert here niccely, they will come up with code in 10min.
> Actually, it took me *exactely* 1h ... of course, it does not
> do error handling on Windows, which is a pain ..
> attachment "osmimage.lua"
Thank you for your effort.
> * it also need alt_getopt.lua which is in TeX Live. I am not sure
> how this can be automatically found, lua experts, please
Okay, that's definitely not me! ;-)
One problem is still left for Windows users, as there's no wget
available. Yesterday i googled this code:
-- loads the HTTP module and any libraries it requires
local http = require("socket.http")
-- load the ltn12 module
local ltn12 = require("ltn12")
local file = ltn12.sink.file(io.open('stackoverflow', 'w'))
url = 'http://stackoverflow.com',
sink = file,
This works for the website, but strangely not for an image. Something
gets downloaded but it seems to be corrupt.
Does anybody know how to download an image with pure Lua code. In the
end that would be enough for my purpose. I can construct the URL on the
LaTeX side, then download.lua URL, which downloads the image to the
working directory would suffice. But it's nice to have the full script!
More information about the tex-live