public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: "christi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <christian.kolen-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Re: Saving the pandoc AST
Date: Tue, 3 Nov 2020 19:15:35 -0800 (PST)	[thread overview]
Message-ID: <d0fbac54-3906-40fe-9707-2b1065758541n@googlegroups.com> (raw)
In-Reply-To: <57b6a6d4-134c-4167-9f14-9c0a0607186an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 2008 bytes --]

As others said it is doable. But I wouldn't suggest using the pandoc AST 
for preservation. The target formats is more stable than the pandoc API 
itself. Unlike something like TeX which has been declared feature complete 
and hence is a stable format, pandoc's AST is still a moving target.

It depends on your source format, but the best way to preserve it probably 
is itself, plus a reproducible recipe to generate an output (recipe should 
include the steps involved, dependencies including their versions.)

On Friday, September 18, 2020 at 12:16:30 PM UTC-7 Brandon Barker wrote:

> Hello!
>
> I'm wondering if it is currently possible to save the pandoc AST of a 
> document, and have it read in by pandoc at a later time? The use case I 
> have in mind relates to preservation. It may be possible that an ancient 
> file becomes difficult to read down the road, though presumably if the old 
> version of pandoc that originally read it existed, it would be possible, if 
> possibly more trouble. Whether or not this would be extremely useful would 
> also depend on if pandoc is pretty good at reading old versions of the AST.
>
> It looks like the AST includes pandoc-version 
> <https://hackage.haskell.org/package/base-4.12.0.0/docs/Data-Version.html#t:Version>information 
> already, which could be handy in principle, though I don't know if it is 
> currently used as mentioned above in practice.
>
> I didn't see the ability to save or read the AST listed as command-line 
> options (though I may have missed it), but I'm more interested in the 
> Haskell API anyway.
>
> Thanks!
>

-- 
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/d0fbac54-3906-40fe-9707-2b1065758541n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 2887 bytes --]

      parent reply	other threads:[~2020-11-04  3:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-18 19:16 Brandon Barker
     [not found] ` <57b6a6d4-134c-4167-9f14-9c0a0607186an-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2020-09-18 19:41   ` Denis Maier
2020-09-18 20:11   ` Albert Krewinkel
2020-11-04  3:15   ` christi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d0fbac54-3906-40fe-9707-2b1065758541n@googlegroups.com \
    --to=christian.kolen-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).