From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from cgl.ntg.nl (Cgl.ntg.nl [5.39.185.202]) by inbox.vuxu.org (Postfix) with ESMTP id 45D8B25335 for ; Fri, 23 Feb 2024 14:38:22 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 852DE48427F for ; Fri, 23 Feb 2024 14:34:36 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=fail (2048-bit key) reason="fail (message has been altered)" header.d=gmx.es Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XF58nJFPtfy0 for ; Fri, 23 Feb 2024 14:34:36 +0100 (CET) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 641F0484286 for ; Fri, 23 Feb 2024 14:33:40 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 7F90F4840E7 for ; Fri, 23 Feb 2024 14:32:53 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K99t4RfvN0bR for ; Fri, 23 Feb 2024 14:32:52 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=212.227.15.15; helo=mout.gmx.net; envelope-from=oinos@gmx.es; receiver= Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cgl.ntg.nl (Postfix) with ESMTPS id D4D4B4840E6 for ; Fri, 23 Feb 2024 14:32:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.es; s=s31663417; t=1708695172; x=1709299972; i=oinos@gmx.es; bh=I7LdgHN10A0xqccIPDoHPOz2SALPpF7tnpXWAxGVZeA=; h=X-UI-Sender-Class:Date:To:From:Subject; b=SeGAIeqMp3pnCcHpZtD3k/Zh4RObgtOZoJayz27VuhJZwLJ+RCw/DuF1+tqZ82Yh bwtdZCLuTaydYc2+vq4Lh+PO/VVDmJlxZfdzAXisZPNY007fYrdVE9jWdkVR4uOvo MDDFo2UkzsfmrrV5glGPwFQSpNcy6kmHMJvP7c4jFFMqUO6fxjdoSWYm1bGV3U3/u eVGV6dLfCcZrWDakKFHF2+9kN4mw230GdjU1+2P9xxNhsygXE6LWp8NW6vY2MTn3C JWa8OgXTPrID9xgydMrYJgaZjdp6J2bIEtmCHebj/r508UeNHyKQgFnee1i1rBc1W zhwrvzfMzYD7RSDVzw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.1.101] ([90.167.182.238]) by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MTABZ-1rUWbs2yR5-00Uepf for ; Fri, 23 Feb 2024 14:32:51 +0100 Message-ID: <269aab33-7bea-dc17-04f5-0b89342a425d@gmx.es> Date: Fri, 23 Feb 2024 14:32:48 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Content-Language: en-US To: ConTeXt users X-Provags-ID: V03:K1:aAg+F0qKT9YOLXgT0EkAl26Int97YN2FkYDTKnyNV4OLCE+1+ze gwA86KzE57QknK4yj72N1DvTq218yoqxrY5Afw15GMSdj5ddO1a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G X-Message-ID-Hash: RCNEKTG5VAAUE22I46AN2RQYJICOZK5G X-MailFrom: oinos@gmx.es X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] output filename with SHA256 List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Pablo Rodriguez via ntg-context Cc: Pablo Rodriguez Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Dear list, I have the following sample file: \starttext whatever \startluacode luatex.wrapup( function() local t = {} local pdf_file_name = tex.jobname..".pdf" local sha_pdf = utilities.sha2.hash256(io.loaddata(pdf_file_name)) local c_r = environment.currentrun t[c_r] = sha_pdf local exists_pdf = ("%s_%s-%s.pdf"):format(c_r-1, tex.jobname, t[c_r-1]) if io.exists(exists_pdf) then os.remove(exists_pdf) end os.rename(pdf_file_name, ("%s_%s-%s.pdf"):format(c_r, tex.jobname, sha_pdf)) end ) \stopluacode \stoptext In short, it adds its SHA256 to the final filename. Since renames the PDF document in each run, I would like to remove the output from the previous run. The table seems not to store the value from a previous run. I see now that I am creating it again with each run. Is there any way to check if compilation needs any other run? Many thanks for your help, Pablo ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________