From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Egli Subject: Re: HOWTO export document to wiki text? Date: Mon, 19 Jan 2009 17:23:45 +0100 Message-ID: References: <200901172203.31914.uwe@koloro.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LOwuv-00068z-CK for emacs-orgmode@gnu.org; Mon, 19 Jan 2009 11:24:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LOwuq-00067C-LV for emacs-orgmode@gnu.org; Mon, 19 Jan 2009 11:24:01 -0500 Received: from [199.232.76.173] (port=53441 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LOwuq-000678-Dt for emacs-orgmode@gnu.org; Mon, 19 Jan 2009 11:23:56 -0500 Received: from main.gmane.org ([80.91.229.2]:36822 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LOwuq-0003sb-1n for emacs-orgmode@gnu.org; Mon, 19 Jan 2009 11:23:56 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LOwuo-0007zZ-N8 for emacs-orgmode@gnu.org; Mon, 19 Jan 2009 16:23:54 +0000 Received: from d05.sbszh.ch ([217.192.14.190]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Jan 2009 16:23:54 +0000 Received: from christian.egli by d05.sbszh.ch with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 19 Jan 2009 16:23:54 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Uwe Koloska writes: > there is this very nice export to text feature and the superb HTML export. But > is it possible to convert org to some rich text notation used in wikis? I > would like to include some of my documents into a wiki (dokuwiki and > TWiki/Foswiki). Below is another quick hack solution: a simple sed script which does a very basic translation between org-mode and mediawiki. --=-=-= Content-Type: text/x-sh Content-Disposition: inline; filename=org2mediawiki.sh Content-Description: org2mediawiki #!/bin/sed -f # headlines s/^\* \+\(.*\)$/== \1 ==/ s/^\*\* \+\(.*\)$/=== \1 ===/ s/^\*\*\* \+\(.*\)$/==== \1 ====/ s/^\*\*\*\* \+\(.*\)$/===== \1 =====/ s/^\*\*\*\*\* \+\(.*\)$/====== \1 ======/ # links s/\[\[\(.*\)\]\[\(.*\)\]\]/[\1 \2]/ # description lists s/^- \+\([^:]\+\)::\(.*\)$/; \1:\2/ s/^ \+// # lists s/^- \+\(.*\)$/* \1/ s/^ \{2\}- \+\(.*\)$/** \1/ s/^ \{4\}- \+\(.*\)$/*** \1/ s/^[1-9]\+\. \+\(.*\)$/# \1/ s/^ \{2\}[1-9]\+\. \+\(.*\)$/## \1/ s/^ \{4\}[1-9]\+\. \+\(.*\)$/### \1/ # source code s/^: \+\(.*\)$/ \1/ # emphasis, bold s/\*\([^*]\+\)\*/'''\1'''/ s/ \/\([^/]\+\)\/ / ''\1'' / # quotes s/^#+BEGIN_QUOTE$/
/ s/^#+END_QUOTE$/<\/blockquote>/ # comments s/^#+.*$// # tables s/^|[-+]\+|$// s/^|\([^|]*\)|$/|-\n|\1/ s/^|\([^|]*\)|\([^|]*\)|$/|-\n|\1||\2/ s/^|\([^|]*\)|\([^|]*\)|\([^|]*\)|$/|-\n|\1||\2||\3/ s/^|\([^|]*\)|\([^|]*\)|\([^|]*\)|\([^|]*\)|$/|-\n|\1||\2||\3||\4/ --=-=-= Hope that helps Christian --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--