From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/76668 Path: news.gmane.org!not-for-mail From: Andy Thomas Newsgroups: gmane.comp.tex.context Subject: mtx-epub.lua Date: Mon, 4 Jun 2012 23:58:48 +0200 Message-ID: <06D803C1-1CFB-4C3E-8A80-98D0F6EEAD37@web.de> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1338847093 18502 80.91.229.3 (4 Jun 2012 21:58:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 4 Jun 2012 21:58:13 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Mon Jun 04 23:58:11 2012 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SbfHk-0003DK-0B for gctc-ntg-context-518@m.gmane.org; Mon, 04 Jun 2012 23:58:00 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 60407101DD; Mon, 4 Jun 2012 23:57:59 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id OvjKkGXMuzRk; Mon, 4 Jun 2012 23:57:58 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id DCDF0101DF; Mon, 4 Jun 2012 23:57:57 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1B5C0101DF for ; Mon, 4 Jun 2012 23:57:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with LMTP id eSaKyurcAYwM for ; Mon, 4 Jun 2012 23:57:54 +0200 (CEST) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id B3391101DD for ; Mon, 4 Jun 2012 23:57:54 +0200 (CEST) Original-Received: from mout.web.de (mout.web.de [212.227.17.11]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id q54Lvrtx030035 for ; Mon, 4 Jun 2012 23:57:53 +0200 Original-Received: from lanhost84.gateway.org.10.in-addr.arpa ([87.139.114.12]) by smtp.web.de (mrweb001) with ESMTPA (Nemesis) id 0MHYHE-1SYLts2nHw-003apP for ; Mon, 04 Jun 2012 23:57:53 +0200 X-Mailer: Apple Mail (2.1257) X-Provags-ID: V02:K0:YDBYfWgYb/t/ggVwyENfVV+wNTuc5WYuSowrRGC0y+Z dBzh6viGQt/s/NIlc3qFYEAUsS3V2g7PWRkSKnVyWLHnnGJWbU DIU4r3m/YJzNWRgADxQeGca+WjNn2uycpatRMkkHx/1RQW7TwP 6K50KXoK1sfmTDx/Qmv+SZgpx+nAFxBmJdBouZFQ2N3LD+kCBn 2N89gh5btZEMA3sT9XQDA== X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=212.227.17.11; country=DE; region=02; city=Munich; latitude=48.1500; longitude=11.5833; http://maps.google.com/maps?q=48.1500,11.5833&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0RHilVRCz - 53bc410b6855 - 20120604 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.13 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:76668 Archived-At: Hello all, while working on my ebook, I found the following issues in mtx-epub.lua. Once a successful run is done, there is no need to try the other zippers. It also gives error messages, although everything is already done. Fix is attached. Then, I got confused about the error messages appearing 3 times and found an issue in texlua of TL2011 (beta-0.70.1-2011062107) as well as the newest standalone (beta-0.70.2-2012052309). Consider the following example: print(os.execute("abcxyz")) This gives in Lua 5.2: sh: abcxyz: command not found nil exit 127 But in texlua it does: sh: abcxyz: command not found 32512 This breaks the if conditional which becomes true, although there is no abcxyz command. If there are if statements such as this one in other places, they would not work as intended either. Andy 274,279c274,281 < if os.execute(format(zipper.uncompressed,epubfile,"mimetype")) then < os.execute(format(zipper.compressed,epubfile,"META-INF")) < os.execute(format(zipper.compressed,epubfile,"OPS")) < done = zipper.name < else < list[#list+1] = zipper.name --- > if not done then > if os.execute(format(zipper.uncompressed,epubfile,"mimetype")) then > os.execute(format(zipper.compressed,epubfile,"META-INF")) > os.execute(format(zipper.compressed,epubfile,"OPS")) > done = zipper.name > else > list[#list+1] = zipper.name > end ___________________________________________________________________________________ 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________