From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/31712 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: command-line pandoc on iOS Date: Mon, 7 Nov 2022 11:22:23 -0800 Message-ID: <9F9D7B72-C9B2-477C-A48A-2B6EDAC95E3D@gmail.com> References: <5346511C-4B5D-42E9-B287-DB005CB4D005@gmail.com> <8FB22757-A6A4-432C-80F3-E770F0567E89@gmail.com> <626e5a36-6440-4be0-a5f6-9910f551ffc0n@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27020"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBDW7ZIEHTIIBB4VVUWNQMGQEODTT74Y-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Nov 07 20:22:31 2022 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-pj1-f59.google.com ([209.85.216.59]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1os7hX-0006px-8f for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 07 Nov 2022 20:22:31 +0100 Original-Received: by mail-pj1-f59.google.com with SMTP id c10-20020a17090aa60a00b00212e91df6acsf5001711pjq.5 for ; Mon, 07 Nov 2022 11:22:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1667848949; cv=pass; d=google.com; s=arc-20160816; b=mTG8kjzxgaO/lzP5MLeQRcex7Yb+wElu1JFaZuFEZIhflXCeL+MIjv1Hl/IQ6xvv0v eoTwbGnTUU/dQXnYGvsu2GRXy6Sp0Js+2tOT0a9cQK4BztZZ1NbwHmkHX1vpb5AHXYnD 8jKiywcMyFtadkG7qxrNq3jq8DrDxn75+iHg8T+xKeUjmyrp1DWfrMCd3tVi3tZvy4xY MueONnXdIkdtU2HPNuzeLz5jL98iS5sq+lodQhBK8LEJLkhQuUrGyocf0wAxy77GZh3Y YaiI5xc6Mol+TZ1dzJKqloo+MPf3jw3gbUxFu7aa9e19JoY9eShLdVrOcfsv6F1twpK0 RwYg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:message-id:in-reply-to:to :references:date:subject:mime-version:content-transfer-encoding:from :sender:dkim-signature:dkim-signature; bh=hBA0cHxezC0IpcibAjYOfy0y/8tFMQSpB/NVE/WavP8=; b=WXhOVFur6Z8ggUAjIPVWTukNVvjKlCwrP/slK/JXVHiO9F2hMmz86ufEO5s1lS6Ogc sqt1a9dPxqQZCZM8E48Db5HSC6KPENjn3oMs8mChWGLpvYgdXb0rC6xUGbg8GxP8W604 V9poaAsbF1xVOe9bJn8eES73sxRojMdjbbYe69k8tasYo1nQslamGQSdonDC8D4p088D yuqv9QErpNPGD7LjJMmFV6c7wkS62o3R7fMjngOH7eC2kkOnb8B+FOx/rL/qSOQoIbXF o3HHFUFPcbCRENkOud9OMtgN8eJ7fNUY86ieFlaUftuTTfe4Y374Z6wQm6TowQR1RPMs wzxQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=o7adeQYf; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::42e as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=hBA0cHxezC0IpcibAjYOfy0y/8tFMQSpB/NVE/WavP8=; b=nj6LiEYAV278unpIO4XZVYTA2ry0TgTmAPnJngT4JsvzxHd1nWICHqRI+8sSC468El we86ZSwPSrojqWeoiffM4b1Q72YzAhJSF2Vz93HFzZs9CNfWHHe3zHD5ii16Uo1ObFxb 0DjspWw+fW6IyrCkuP5M80DlCHayuwysTpMCdnRU4CH5vWJsx8tDec3MTJHwkzDzqHV5 Maa04hpLbaVd9d/BMB/8PhjOvpGEyYzTQiyAtMk4GHSEHLYG6iRLDOJl0p7a20kaBXM8 2Fo2CQ1HlUzqDNSoVzJyTywRK9PqlprXFOkN2n37DYOSyapFdUumZd2WeVBKArzpw DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=hBA0cHxezC0IpcibAjYOfy0y/8tFMQSpB/NVE/WavP8=; b=Lyf8iMKNoPSZojuU4fj7F5sBPf8z6BMccZJOAJ78P8SKx6/I37jpN1aYU8Mgrkms/w POYnqhzp/l1GH98Zqql5RAuQk48/TJpLzrBIK13dbqrE6J/9myTfJyZc5QeMMb0M7R/f hBDbJF00FBbaUrPc7O0l9u4GRW2MfZ1l4kkeKQL1tqQqUYp54BgXqBEZvdFhIcqOO13b 6HelG3AhVliKFaYnM+KZ0Q+7NdOKsiHZywQrBf8PVGGNxdbxCibQxfncFjMTpCElyGpU 6535z6lRVsBW15RCQVU1EfNZ+FWfcX4W9qQqGmyk0hdfbWgOtbCKr82V/ai4raM7iNBH e X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:message-id :in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=hBA0cHxezC0IpcibAjYOfy0y/8tFMQSpB/NVE/WavP8=; b=Bn/PB7zBOdgzDmhyZuIiPMeZTzUaeMzVVv+iFq4qR9vKvxu5MKu/NJsSRlrC7HvDyc W/S4+lQ94Mm8OLGhQ2WeRFajivb2ZXSlQqf3HQWNb4EYvSn9RQAWGuFwfTJREh17Bmqf wGNh4XWMbZXXm/2n3eM5z48T0m/hbDBWoqVtU8Ox8FwJnmE4KHboqiaEHUK2tgKFqYGQ Os3Y4hBvF7jj6m1z+dxTvzH1eRRkeE8aAydChJ9RVqy+c8MkdedPeDE5Oel5MAl+kzQj 7LV/NgYP63vfl1NztlJX Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: ACrzQf299XZg8xA6eSPbqTh2ylNfSmI23Pu4bTEUcQWGTXazkOx1dcLf 8iAGvd6pBvjCgtrB8d5il8M= X-Google-Smtp-Source: AMsMyM6gDYy7Eem6WbkRk1kYnH5NoGcqcF87w0U2ln6vvYN1jUPdg3Dh/2tLa9cs6qhav52V3NLRng== X-Received: by 2002:aa7:9828:0:b0:56d:6af1:1a72 with SMTP id q8-20020aa79828000000b0056d6af11a72mr35818651pfl.85.1667848949723; Mon, 07 Nov 2022 11:22:29 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a17:902:788f:b0:178:35a3:84d9 with SMTP id q15-20020a170902788f00b0017835a384d9ls8894390pll.10.-pod-prod-gmail; Mon, 07 Nov 2022 11:22:26 -0800 (PST) X-Received: by 2002:a17:902:d484:b0:188:56f3:d374 with SMTP id c4-20020a170902d48400b0018856f3d374mr24517259plg.121.1667848946049; Mon, 07 Nov 2022 11:22:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667848946; cv=none; d=google.com; s=arc-20160816; b=aGPVdqqr8dtZNicOcPu/wyE9NJM4Hp8Kvf//8/aCxi/jymM+bXwQP8eFReuhOFH0rr +zmOc+/jtzmrCLQ5dvXg4h3++TVBO7Uro09xLPT14h+kWXU738+X9DCfx/OHG87ug6gs bmsiurhI5ZmzWCHP4TF00C8KQ2mLYpFzwBOF6qOKDnFl9lGNlLdhkYMbBDDdN2PyFBry c7jAHZVgTd2waEFdefmB4i1prbb03Ct/v3v4auKg4TM7fzCHK9VBAgpcQFBdH9N7KhBw cQ6GB96SORecCzACr//MVMjyQq3NEUxA0gYiaibRkYWx0UFJyOg1d2gJiwSJ1AdlZ1J9 JQMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:in-reply-to:to:references:date:subject:mime-version :content-transfer-encoding:from:dkim-signature; bh=CCyC8Je5UgRz5wvpJeap6CkYQOynfb0oL5OycvXOTiw=; b=xk3/Ouu8HqdoXGmCZf0o1JtGid8YmqcQAk2pq/yVNRPbu5UbJ9weajZhxUQxgfKjp2 rot5YsG/kxotGqJPFfkVHOU3ivI5WcIlsCqhnZbn+4FP86e7CPIAjEJYwFFj1jDwbYjH zjYuENk8PnHnot79Ip+P2UeHLrEb7Vx0saz+wEQ/ZIvG1qu5zI79/HYJ5imsCmkI0DUi 94vJiEBLVC0P3DNgn4Rtfcfg58bC/FEA6x9SY/J6iPsdWgpOVvnEognChfyY2DtpwL+W RXsdOjXzKQQcnxTXLm5EjasLTAwZs62IJg2FJxlvxEZu44CfVpaq9Nyt13/2NwNf9Zey 5jTg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=o7adeQYf; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::42e as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Original-Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com. [2607:f8b0:4864:20::42e]) by gmr-mx.google.com with ESMTPS id t3-20020a17090abc4300b002025f077b2csi768066pjv.1.2022.11.07.11.22.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Nov 2022 11:22:26 -0800 (PST) Received-SPF: pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::42e as permitted sender) client-ip=2607:f8b0:4864:20::42e; Original-Received: by mail-pf1-x42e.google.com with SMTP id b29so11525178pfp.13 for ; Mon, 07 Nov 2022 11:22:26 -0800 (PST) X-Received: by 2002:a05:6a00:1792:b0:56c:c9aa:95ce with SMTP id s18-20020a056a00179200b0056cc9aa95cemr51910135pfg.69.1667848945338; Mon, 07 Nov 2022 11:22:25 -0800 (PST) Original-Received: from smtpclient.apple ([2601:644:400:7c40:59b1:1c99:b0cc:5ae4]) by smtp.gmail.com with ESMTPSA id i18-20020a170902e49200b00186b758c9fasm5339686ple.33.2022.11.07.11.22.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 07 Nov 2022 11:22:24 -0800 (PST) In-Reply-To: X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Original-Sender: fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=o7adeQYf; spf=pass (google.com: domain of fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org designates 2607:f8b0:4864:20::42e as permitted sender) smtp.mailfrom=fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.io gmane.text.pandoc:31712 Archived-At: Oh never mind, I see you're looking for an asterius build. > On Nov 7, 2022, at 11:20 AM, John MacFarlane wro= te: >=20 > This is the one you want: https://hub.docker.com/r/pandoc/core > It is always up to date with the latest release. >=20 >> On Nov 7, 2022, at 8:56 AM, jcr wrote: >>=20 >> I've looked at this a couple of times since I last wrote. It turns out t= he latest Docker image is 2 years old, and apparently contains pandoc 2.9.2= .1. >>=20 >> So it looks like I have to do the full pandoc build with ahc-cabal. I in= stalled the prerequisites, and started following the instructions to build = Asterius, but immediately hit a snag when it asked me to run a script that = isn't provided in the repo. It turns out the project now uses bazel, whatev= er that is, but the person who discovered this ran it and found that he cou= ldn't execute the resulting binaries (see Asterius issue 894). So I don't f= eel encouraged to follow his example. >>=20 >> I've had the idea of writing a stub in Python that would parse pandoc co= mmand line arguments and then use pandoc-server to do the actual processing= . I'd just ignore options like -L that can't be implemented this way. It wo= uldn't be a great solution, but it would be adequate for some cases. >>=20 >> If I do that, Lua filter support in pandoc-server would be very useful (= most of my filters are indeed safe), but I see from the referenced issue th= at it's not coming soon. >>=20 >> On Monday, October 17, 2022 at 4:47:08 PM UTC+2 fiddlosopher wrote: >> If we could implement=20 >> https://github.com/jgm/pandoc/issues/8273 "safe mode for Lua filters"=20 >> then we could add Lua support to pandoc-server. (Of course, this assumes= that=20 >> you wouldn't need to use any unsafe functions in your Lua filters.)=20 >>=20 >>=20 >>> On Oct 17, 2022, at 2:15 AM, ffi.a...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:=20 >>>=20 >>> I was playing around with pandoc-server before I decided I needed the c= ommand-line program. It would work for some cases, but without Lua scriptin= g, it wouldn't be adequate for the document builds. In theory, I could use = pandoc-server to convert to a JSON AST, run a filter locally, and then send= it back to the server for the next stage of conversion, but that seems slo= w and conplex.=20 >>>=20 >>> I probably won't work quickly on building pandoc with Asterius.=20 >>>=20 >>>> On Oct 16, 2022, at 7:58 PM, John MacFarlane wro= te:=20 >>>>=20 >>>> =EF=BB=BFThis would be cool, so let us know if you have any success wi= th asterius. I haven't tried it myself. If you run into Haskell-specific pr= oblems, let us know and perhaps we can help.=20 >>>>=20 >>>> Note: for your iPad purposes, another alternative would be to run pand= oc as a server somewhere. This is now very easy with `pandoc-server`. It is= fairly full-featured, with the caveat that it runs in "safe mode," so you = have to explicitly send all resources needed for compilation to the server = (it won't be able to look for them on your local file system).=20 >>>>=20 >>>>> On Oct 16, 2022, at 8:20 AM, jcr wrote:=20 >>>>>=20 >>>>> I would like to be able to run pandoc-based document builds on an iPa= d. This seems to be possible with the [a-Shell app](https://holzschu.github= .io/a-Shell_iOS/). It provides a Unix-like shell with LaTeX (additional 1.3= GB download), Python, Lua, and many command line utilities. C and C++ progr= ams can be compiled to WebAssembly on the device and run there. It is also = possible to cross-compile for a-Shell, using a [customized WASI-SDK](https:= //github.com/holzschu/wasi-sdk).=20 >>>>>=20 >>>>> [Asterius](https://github.com/tweag/asterius) compiles Haskell to Web= Assembly, and there are a couple of demos that use it to run pandoc in a we= bpage, but the WebAssembly files they use offer a simple JavaScript interfa= ce to the Haskell pandoc function: (input, from format, to format) -> outpu= t. I need the full command line interface to run document builds. It looks = possible, but since I've never used Haskell, its build tools, or WASI-SDK, = I'm not sure how to go about this. There's a pre-built Docker container for= Asterius with about 2000 packages from Stockage (I think I can guess what = that is), but I don't know if I can use that, or if I have to rebuild every= thing from scratch using the customized WASI-SDK. After that, I guess I wou= ld download the pandoc source and follow the instructions for building it w= ith cabal, using `ahc-cabal` in place of `cabal`. But if anything goes wron= g with the cabal build, I'll be lost.=20 >>>>>=20 >>>>> Has anyone already done this?=20 >>>>>=20 >>>>>=20 >>>>> --=20 >>>>> You received this message because you are subscribed to the Google Gr= oups "pandoc-discuss" group.=20 >>>>> To unsubscribe from this group and stop receiving emails from it, sen= d an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org=20 >>>>> To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/bfa54f4a-eedc-4e8e-8671-1aa9f6c63e1dn%40googlegroups.c= om.=20 >>>>=20 >>>> --=20 >>>> You received this message because you are subscribed to a topic in the= Google Groups "pandoc-discuss" group.=20 >>>> To unsubscribe from this topic, visit https://groups.google.com/d/topi= c/pandoc-discuss/ivgH7zNPlNs/unsubscribe.=20 >>>> To unsubscribe from this group and all its topics, send an email to pa= ndoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org=20 >>>> To view this discussion on the web visit https://groups.google.com/d/m= sgid/pandoc-discuss/5346511C-4B5D-42E9-B287-DB005CB4D005%40gmail.com.=20 >>>=20 >>> --=20 >>> You received this message because you are subscribed to the Google Grou= ps "pandoc-discuss" group.=20 >>> To unsubscribe from this group and stop receiving emails from it, send = an email to pandoc-discus...-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org=20 >>> To view this discussion on the web visit https://groups.google.com/d/ms= gid/pandoc-discuss/ADB72C63-745E-4D50-9045-E60813FA08EB%40gmail.com.=20 >>=20 >>=20 >> --=20 >> You received this message because you are subscribed to the Google Group= s "pandoc-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send a= n email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit https://groups.google.com/d/msg= id/pandoc-discuss/626e5a36-6440-4be0-a5f6-9910f551ffc0n%40googlegroups.com. >=20 --=20 You received this message because you are subscribed to the Google Groups "= pandoc-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/= pandoc-discuss/9F9D7B72-C9B2-477C-A48A-2B6EDAC95E3D%40gmail.com.