From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christopher Witte Subject: Re: Using Pandoc for export to EPub and Mediawiki Re: Bug: Status of the org-mediawiki.el [7.8.11] Date: Mon, 7 Jan 2013 09:15:15 +0100 Message-ID: References: <50804130.4000001@gmail.com> <871ugo3rzg.fsf@bzg.ath.cx> <87wqvqfs62.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b2e769ad6cb7504d2ae6de1 Return-path: Received: from eggs.gnu.org ([208.118.235.92]:42901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ts7ra-00072T-VV for emacs-orgmode@gnu.org; Mon, 07 Jan 2013 03:15:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ts7rZ-0007vP-Kk for emacs-orgmode@gnu.org; Mon, 07 Jan 2013 03:15:18 -0500 Received: from mail-pa0-f49.google.com ([209.85.220.49]:64727) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ts7rZ-0007vD-E3 for emacs-orgmode@gnu.org; Mon, 07 Jan 2013 03:15:17 -0500 Received: by mail-pa0-f49.google.com with SMTP id bi1so10498873pad.22 for ; Mon, 07 Jan 2013 00:15:15 -0800 (PST) In-Reply-To: <87wqvqfs62.fsf@bzg.ath.cx> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: "Bernhard F.W. Gschaider" , Org Mode --047d7b2e769ad6cb7504d2ae6de1 Content-Type: text/plain; charset=ISO-8859-1 For a quick work around, Pandoc can read in HTML, so perhaps you can export org to HTML and then process it with Pandoc. You can even use the following script so you can pipe it from the command line. #!/usr/bin/emacs --script ;read stdin into a temp buffer ;go into org-mode ;output the buffer as a string and pipe to stdout (with-temp-buffer (progn (condition-case nil (let (line) (while (setq line (read-from-minibuffer "")) (insert line) (insert "\n"))) (error nil)) (org-mode) (princ (org-export-as-html nil nil nil 'string)) )) Chris. On 6 January 2013 12:48, Bastien wrote: > Hi Bernhard, > > "Bernhard F.W. Gschaider" writes: > > > If nobody is actively working on these export filters (Mediawiki) then > > maybe "outsourcing" this conversion to pandoc and "only" integrating the > > call into the "export menu" would be an interesting way to go > > Yes. If you can motivate someone either from this list or from Pandoc > community to write an Org mode reader, that'd be nice. Even when we > finally have a mediawiki exporter. > > Best, > > -- > Bastien > > --047d7b2e769ad6cb7504d2ae6de1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
For a quick work around, Pandoc can read in HTML, so = perhaps you can export org to HTML and then process it with Pandoc.
You = can even use the following script so you can pipe it from the command line.=

#!/usr/bin/emacs --script
;read stdin into a temp buffer
;go into= org-mode
;output the buffer as a string and pipe to stdout
(with-tem= p-buffer
=A0 (progn
=A0=A0=A0 (condition-case nil
=A0=A0=A0 (let (= line)
=A0=A0=A0 =A0 (while (setq line (read-from-minibuffer ""= ))
=A0=A0=A0 =A0=A0=A0 (insert line)
=A0=A0=A0 =A0=A0=A0 (insert "\n&q= uot;)))
=A0=A0=A0=A0=A0 (error nil))
=A0=A0=A0 (org-mode)
=A0=A0= =A0 (princ (org-export-as-html nil nil nil 'string))
=A0=A0=A0 ))

Chris.


On 6 January 2013 12:48, Bastien <bzg@alte= rn.org> wrote:
Hi Bernhard,

"Bernhard F.W. Gschaider" <bgschaid@gmail.com> writes:

> If nobody is actively working on these export filters (Mediawiki) then=
> maybe "outsourcing" this conversion to pandoc and "only= " integrating the
> call into the "export menu" would be an interesting way to g= o

Yes. =A0If you can motivate someone either from this list or from Pan= doc
community to write an Org mode reader, that'd be nice. =A0Even when we<= br> finally have a mediawiki exporter.

Best,

--
=A0Bastien


--047d7b2e769ad6cb7504d2ae6de1--