From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/32497 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: ThomasH Newsgroups: gmane.text.pandoc Subject: Report Location in Lua Filter Date: Thu, 27 Apr 2023 02:22:09 -0700 (PDT) Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_758_403103407.1682587329730" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29489"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCOJJAXZ7EPBBQ75VCRAMGQEZFG6ZBY-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Thu Apr 27 11:22:15 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oa1-f61.google.com ([209.85.160.61]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1prxpP-0007Vg-G0 for gtp-pandoc-discuss@m.gmane-mx.org; Thu, 27 Apr 2023 11:22:15 +0200 Original-Received: by mail-oa1-f61.google.com with SMTP id 586e51a60fabf-18f16a11821sf3614721fac.0 for ; Thu, 27 Apr 2023 02:22:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20221208; t=1682587334; x=1685179334; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=GpbtMAiH253M45+PtoKg0mRmFrxJacnZRYT8D78cbfI=; b=F1+cyI2EZOlTZ+NRLmoiSSxg/OPr/thiw1ylzeHCGU8fPo3Oqt6KtISms27zs3826Z q3R242gRJ4sWdwkJEkQQWRm2wnPjp0j9prSszDi+RSe6CvsvxhTUSkvU47dtGUftklcW QpQsUtsmoO29PkVwCY3wSx80K9JLXp5kHxCPm38kOndP9aLQLBQsbL0lDT/dMaETcwt7 GHmWme5TrrgbwbN4h0ZBI1owmdYe+/wNxV8RDgcaTrTaZhH6cJV4E1OqWmUPkNy/h59C daD/TmvrpZdkCGLoTU5XT2+Qctw+Gs7Rgn7WA6d5PupRQpchlZwkgiEfFB7yZTtTo9MR e80A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682587334; x=1685179334; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=GpbtMAiH253M45+PtoKg0mRmFrxJacnZRYT8D78cbfI=; b=qJvgYuI1pT9uel+C3u4O+LfnfVnnkqoVVrWSCJoQEjeIAHd5OFi1dJ9z4SqfVbkXoP CqWQTTqsDF1Hzz6OO6AWHRtrlo1i0lAxv3ot4rhBLqiGUM7IQnIP271fntKpauqbGeho As9QYrQW/T8094gYpZ3Vl7lemzmGueXVch+ZS7CffpjyFsGDEYAyX15BfU6XsH+9XRtN ntV8AHQMIvVlQi4eupGmf5wgy5KjwF06pRbNU5gExTESTY0fqO6hLf2L/AgxdCBdB/zz qLk+U0/vBhLYRTeLTBfovMjxSnOoSY55dqYPgIcQp5mVCyn9yEC/sxEJonTKiAEKqy+V p74Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682587334; x=1685179334; 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-sender:mime-version:subject:message-id:to:from:date :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=GpbtMAiH253M45+PtoKg0mRmFrxJacnZRYT8D78cbfI=; b=Bc9UIorUL8psqplmyK59NHUIA4yJLGERGIxHPkpdXnuO74NCYeD2+NGLoC26Jvjiee hYilEjohZWzpMZvuk3Z2B3V5+xKk67qtE1a00LXwxVQEIz/rumHIAboZIAlAqhoVuEqy RxWjhlFOgaVyv71rFXd3cmz5TJZwwX2OWqI3LDgTLqsSnB+IMgRaa4NhnC62aPuHWrji 6Pw7zw5UpdLGchbmLbJ5bsGpHhQgH79xyemj19HnVYZzdaDGoGHRZDgThC2Mz7rWN121 imnK/Pt1l2KXNYJtyUaK5JZQ2CNhOD3nOegzAglNTTPdwILQ4SMYRSOLOPYDe77g0Bng Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AC+VfDy4fM0z5zL8+B9uM49wdTCSu6g65MeXz/apjgcPQLUNGTdkGDae ennKjWRuiKq4TKjaslI6jWw= X-Google-Smtp-Source: ACHHUZ5y4kdz111t09OzMoumfP18TUoU20N5Wa51eOQYUXlkM9/2b/Wqc/nBU2Lcrci7682XK8sdIQ== X-Received: by 2002:aca:f1c5:0:b0:38e:eccf:3d2c with SMTP id p188-20020acaf1c5000000b0038eeccf3d2cmr332968oih.1.1682587334282; Thu, 27 Apr 2023 02:22:14 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:aca:efc2:0:b0:38e:26f1:73b9 with SMTP id n185-20020acaefc2000000b0038e26f173b9ls238910oih.9.-pod-prod-gmail; Thu, 27 Apr 2023 02:22:11 -0700 (PDT) X-Received: by 2002:aca:3b04:0:b0:390:7dc9:ddcb with SMTP id i4-20020aca3b04000000b003907dc9ddcbmr211195oia.5.1682587330242; Thu, 27 Apr 2023 02:22:10 -0700 (PDT) X-Original-Sender: therch-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org 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:32497 Archived-At: ------=_Part_758_403103407.1682587329730 Content-Type: multipart/alternative; boundary="----=_Part_759_621243632.1682587329730" ------=_Part_759_621243632.1682587329730 Content-Type: text/plain; charset="UTF-8" Hi all, first off, thanks for Pandoc, it's a beautiful tool. I've been using it on and off over many years, mostly for ad-hoc tasks, and am now in the middle of a larger transformation project. I have several use cases where I want to report a location in a file rather than transform it, e.g. ordered lists with a single list item which doesn't make a lot of sense. It's easy enough to spot such constructs in a Lua filter, but for the files I'm working on it is not so obvious how to transform such constructs. So we made a decision to fix these situations by hand. In an input file base of roughly 3,500 files it would just be helpful to generate a report that produces all the locations where such constructs appear. So I'm looking for ways to deploy Pandoc's AST as a vehicle to report these occasions. Ideally, I would e.g. attatch "LogMessage" objects to the AST at these places, and on output these log messages would be filled, eg. with file path and line number of the current output file. Would something in this vein be possible? I'm sorry if the answer is too obvious, it's just now that I really take a look at all the documentation and examples. Thanks, T. -- 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 email 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/f2713b34-0040-4c07-8d8b-dd3bd0de1755n%40googlegroups.com. ------=_Part_759_621243632.1682587329730 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi all,

first off, thanks for Pandoc, it's = a beautiful tool. I've been using it on and off over many years, mostly for= ad-hoc tasks, and am now in the middle of a larger transformation project.=

I have several use cases where I want to report= a location in a file rather than transform it, e.g. ordered lists with a s= ingle list item which doesn't make a lot of sense. It's easy enough to spot= such constructs in a Lua filter, but for the files I'm working on it is no= t so obvious how to transform such constructs. So we made a decision to fix= these situations by hand.

In an input file base= of roughly 3,500 files it would just be helpful to generate a report that = produces all the locations where such constructs appear. So I'm looking for= ways to deploy Pandoc's AST as a vehicle to report these occasions. Ideall= y, I would e.g. attatch "LogMessage" objects to the AST at these places, an= d on output these log messages would be filled, eg. with file path and line= number of the current output file. Would something in this vein be possibl= e?

I'm sorry if the answer is too obvious,= it's just now that I really take a look at all the documentation and examp= les.

Thanks, T.

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d= /msgid/pandoc-discuss/f2713b34-0040-4c07-8d8b-dd3bd0de1755n%40googlegroups.= com.
------=_Part_759_621243632.1682587329730-- ------=_Part_758_403103407.1682587329730--