From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: Converting AsciiDoc to org-mode, preserving index entries Date: Mon, 19 Feb 2018 16:25:21 -0800 Message-ID: References: <101025EC-FDB2-4467-9AED-D77437D2EC16@zzamboni.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1140b8289ab231056599d8ad" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1envkL-00087D-NI for emacs-orgmode@gnu.org; Mon, 19 Feb 2018 19:25:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1envkJ-0003WJ-Vy for emacs-orgmode@gnu.org; Mon, 19 Feb 2018 19:25:25 -0500 Received: from mail-wr0-x236.google.com ([2a00:1450:400c:c0c::236]:46242) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1envkJ-0003Vh-LS for emacs-orgmode@gnu.org; Mon, 19 Feb 2018 19:25:23 -0500 Received: by mail-wr0-x236.google.com with SMTP id 34so11338592wre.13 for ; Mon, 19 Feb 2018 16:25:23 -0800 (PST) In-Reply-To: <101025EC-FDB2-4467-9AED-D77437D2EC16@zzamboni.org> 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: Diego Zamboni Cc: Org-mode --001a1140b8289ab231056599d8ad Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 the 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 @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 be= en > 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 tried > this and maybe come up with some other way of doing the conversion. > > Thanks! > > =E2=80=94Diego > > --001a1140b8289ab231056599d8ad Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
If it is a one-time conversion, it might be worthwhile jus= t replacing the index terms with something temporary, getting to the org-fi= le, and then putting them back in the right way. For example, you could rep= lace each term with a uuid, and keep a list that maps the uuid to the term.= Then the uuid would pass through the pandoc untouched, and afterwards, go = back through and replace the uuid with the #+INDEX entries.

<= div>I don't know if that is worth the effort, but it might get you a fa= ster org-doc than bug reporting :)
John

------------= -----------------------
Professor John Kitchin=C2=A0
Doherty Hall A20= 7F
Department of Chemical Engineering
Carnegie Mellon University
P= ittsburgh, PA 15213
412-268-7803
@johnkitchin
<= a href=3D"http://kitchingroup.cheme.cmu.edu" target=3D"_blank">http://kitch= ingroup.cheme.cmu.edu


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

<= /font>

--001a1140b8289ab231056599d8ad--