From mboxrd@z Thu Jan 1 00:00:00 1970 From: Diego Zamboni Subject: Re: Converting AsciiDoc to org-mode, preserving index entries Date: Tue, 20 Feb 2018 11:07:21 +0100 Message-ID: References: <101025EC-FDB2-4467-9AED-D77437D2EC16@zzamboni.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c1c0d90fcb58d0565a1f9bb" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54435) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eo4pa-00043W-4Z for emacs-orgmode@gnu.org; Tue, 20 Feb 2018 05:07:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eo4pW-0005f4-Tu for emacs-orgmode@gnu.org; Tue, 20 Feb 2018 05:07:26 -0500 Received: from mail-ot0-x22b.google.com ([2607:f8b0:4003:c0f::22b]:44888) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eo4pW-0005eT-LA for emacs-orgmode@gnu.org; Tue, 20 Feb 2018 05:07:22 -0500 Received: by mail-ot0-x22b.google.com with SMTP id 79so10910585oth.11 for ; Tue, 20 Feb 2018 02:07:22 -0800 (PST) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: John Kitchin Cc: Org-mode --94eb2c1c0d90fcb58d0565a1f9bb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi John, Thanks - it would be indeed a one-time conversion. I may end up going this route, but I thought there should be a proper way of doing it :) Best, --Diego On Tue, Feb 20, 2018 at 1:25 AM, John Kitchin wrote: > If it is a one-time conversion, it might be worthwhile just replacing the > index terms with something temporary, getting to the org-file, and then > putting them back in the right way. For example, you could replace each > term with a uuid, and keep a list that maps the uuid to the term. Then th= e > uuid would pass through the pandoc untouched, and afterwards, go back > through and replace the uuid with the #+INDEX entries. > > I don't know if that is worth the effort, but it might get you a faster > org-doc than bug reporting :) > > John > > ----------------------------------- > Professor John Kitchin > Doherty Hall A207F > Department of Chemical Engineering > Carnegie Mellon University > Pittsburgh, PA 15213 > 412-268-7803 <(412)%20268-7803> > @johnkitchin > http://kitchingroup.cheme.cmu.edu > > > On Mon, Feb 19, 2018 at 11:54 AM, Diego Zamboni > wrote: > >> Hi, >> >> I have a large document (a book) written in AsciiDoc, and I=E2=80=99ve b= een >> thinking of converting it to org-mode, which I find eminently more >> readable. The method I=E2=80=99ve come up with is: >> >> 1. AsciiDoc -> Docbook using asciidoc or asciidoctor >> 2. Docbook -> org using pandoc >> >> The conversion seems to work well, except for one thing: I have index >> terms in my AsciiDoc files using the =E2=80=98((( =E2=80=A6 )))=E2=80=99= syntax ( >> http://asciidoctor.org/docs/user-manual/#index-terms). Step 1 converts >> them correctly into tags, but pandoc inserts them as part of >> the main text instead of producing=E2=80=98#+INDEX entries. >> >> Before I go report the bug to Pandoc, I was wondering if anyone has trie= d >> this and maybe come up with some other way of doing the conversion. >> >> Thanks! >> >> =E2=80=94Diego >> >> > --94eb2c1c0d90fcb58d0565a1f9bb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi John,

Thanks - it would be indeed a = one-time conversion. I may end up going this route, but I thought there sho= uld be a proper way of doing it :)

Best,
--Diego

On Tue, Feb 20, 2018 at 1:25 AM, John Kitchin <jkitchin@andrew.cm= u.edu> wrote:
If it is a one-time conversion, it might be worthwhile just replacing t= he index terms with something temporary, getting to the org-file, and then = putting them back in the right way. For example, you could replace each ter= m with a uuid, and keep a list that maps the uuid to the term. Then the uui= d would pass through the pandoc untouched, and afterwards, go back through = and replace the uuid with the #+INDEX entries.

I don'= ;t know if that is worth the effort, but it might get you a faster org-doc = than bug reporting :)

John

---= --------------------------------
Professor John Kitchin=C2=A0
Do= herty Hall A207F
Department of Chemical Engineering
Carnegie Mellon U= niversity
Pittsburgh, PA 15213
412-268-7803

On Mon, Feb 19, 2018 at 11:54 AM, Diego Zamb= oni <diego@zzamboni.org> wrote:
Hi,=

I have a large document (a book) written in AsciiDoc, a= nd I=E2=80=99ve been thinking of converting it to org-mode, which I find em= inently more readable. The method I=E2=80=99ve come up with is:
<= br>
1. AsciiDoc -> Docbook using asciidoc or asciidoctor
=
2. Docbook -> org using pandoc

The convers= ion seems to work well, except for one thing: I have index terms in my Asci= iDoc files using the =E2=80=98((( =E2=80=A6 )))=E2=80=99 syntax (ht= tp://asciidoctor.org/docs/user-manual/#index-terms). Step 1 conver= ts them correctly into <indexterm> tags, but pandoc inserts them as p= art of the main text instead of producing=E2=80=98#+INDEX entries.

Before I go report the bug to Pandoc, I was wondering if a= nyone has tried this and maybe come up with some other way of doing the con= version.

Thanks!

=E2=80=94Diego=



--94eb2c1c0d90fcb58d0565a1f9bb--