From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Davis Subject: Importing from Oddmuse? Date: Fri, 25 Oct 2013 10:54:34 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d04428230b4d5e004e991eda2 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZimb-0008Q8-I5 for emacs-orgmode@gnu.org; Fri, 25 Oct 2013 10:54:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VZima-00075f-6M for emacs-orgmode@gnu.org; Fri, 25 Oct 2013 10:54:37 -0400 Received: from mail-wg0-x22c.google.com ([2a00:1450:400c:c00::22c]:43219) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VZimZ-00075Z-Ul for emacs-orgmode@gnu.org; Fri, 25 Oct 2013 10:54:36 -0400 Received: by mail-wg0-f44.google.com with SMTP id n12so3961740wgh.35 for ; Fri, 25 Oct 2013 07:54:34 -0700 (PDT) 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: emacs-orgmode@gnu.org --f46d04428230b4d5e004e991eda2 Content-Type: text/plain; charset=ISO-8859-1 I'm comparatively new to Org mode (actually, I've used it for years, but only a small subset of its functionality). I've used Oddmuse for years to maintain my own personal Wiki, but now I'm looking to move to Org mode. I know there are lots of tools for exporting or publishing from Org mode to Oddmuse, but how about the other direction? Any tools or tips for importing a large number of Oddmuse pages into Org mode? Ideally, I'd like to keep them as separate files, with links converted to file links, etc. Ideas? Thanks! -pd -- ---- The Tech Curmudgeon http://www.techcurmudgeon.com --f46d04428230b4d5e004e991eda2 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I'm comparatively new to Org mode (actually, I've = used it for years, but only a small subset of its functionality). I've = used Oddmuse for years to maintain my own personal Wiki, but now I'm lo= oking to move to Org mode.

I know there are lots of tools for exporting or publishing f= rom Org mode to Oddmuse, but how about the other direction? Any tools or ti= ps for importing a large number of Oddmuse pages into Org mode? Ideally, I&= #39;d like to keep them as separate files, with links converted to file lin= ks, etc.

Ideas?

Thanks!

<= /div>
-pd


--
----
The Tec= h Curmudgeon

--f46d04428230b4d5e004e991eda2-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Davis Subject: Re: Importing from Oddmuse? Date: Mon, 28 Oct 2013 11:01:30 -0400 Message-ID: <526E7C4A.7050804@pfdstudio.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------040606060106040103050908" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaoK5-0007zq-Sh for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 11:01:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VaoK0-00032h-Bf for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 11:01:41 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:36755) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaoK0-00032Y-7N for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 11:01:36 -0400 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------040606060106040103050908 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Just to answer my own question, I shamelessly took Alex Schroeder's raw.pl script and hacked it up a bit to do some conversion from Oddmuse markup to org-mode. The attached Perl script should run through all the pages in an Oddmuse Wiki and generate .org versions of them in a separate directory. This is still very much a work in progress, but I think the general framework is useful. On thing I have to fix is the hyperlinks. Right now, if the Wiki page is "one two.pg", this script will generate a file named "one_two.org," but any links will refer to "[[file:one two.org][one two]]" I concentrated on the small subset of Oddmuse markup that I'm using, but I think it's easily extensible. Let me know if this is at all useful to anyone else. -pd On 10/25/13 10:54 AM, Peter Davis wrote: > I'm comparatively new to Org mode (actually, I've used it for years, > but only a small subset of its functionality). I've used Oddmuse for > years to maintain my own personal Wiki, but now I'm looking to move to > Org mode. > > I know there are lots of tools for exporting or publishing from Org > mode to Oddmuse, but how about the other direction? Any tools or tips > for importing a large number of Oddmuse pages into Org mode? Ideally, > I'd like to keep them as separate files, with links converted to file > links, etc. > -- Peter Davis The Tech Curmudgeon www.techcurmudgeon.com --------------040606060106040103050908 Content-Type: text/x-perl-script; name="om2org.pl" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="om2org.pl" #! /usr/bin/perl -w # Copyright (C) 2005, 2007 Alex Schroeder # # Portions copyright (c) 2013, Peter Davis # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . sub ParseData { my $data = shift; my %result; while ($data =~ /(\S+?): (.*?)(?=\n[^ \t]|\Z)/sg) { my ($key, $value) = ($1, $2); $value =~ s/\n\t/\n/g; $result{$key} = $value; } return %result; } sub FixMarkUp { my $data = shift; my $orgout = "#+STARTUP: showeverything logdone\n#+options: num:nil\n\n"; my $csvMode = 0; foreach (split /\n/, $data) { if (length($_)) { s/\r//g; # csv tables if ($_ =~ //) { $csvMode = 1; s//#+ATTR_HTML: :border 2 :rules all :frame border/g; } elsif ($_ =~ /^\s*$/) { $csvMode = 0; } elsif ($csvMode) { s/^/|/g; s/,/|/g; s/$/|/g; } # hyperlinks s/\[\[([^]]*)\]\]/[[file:$1.org][$1]]/g; # strike through s/<\/?s>/+/g; # verse s/:::/#+BEGIN_VERSE/g; # bold and italic s/'''/*/g; s/''/\//g; # bullet lists s/^\*\*\*\*/ */g; s/^\*\*\*/ */g; s/^\*\*/ */g; s/^\*/ */g; # headers s/^\=\=\=\=/****/g; s/^\=\=\=/***/g; s/^\=\=/**/g; s/^\=/*/g; # s/ \=?$//g; s/ \=\=\=\=$//g; s/ \=\=\=$//g; s/ \=\=$//g; s/ \=$//g; s/^# / 1. /g; } else { $csvMode = 0; } $orgout = $orgout . $_ . "\n"; } return $orgout; } sub main { my ($regexp, $PageDir, $OrgDir) = @_; # include dotfiles! local $/ = undef; # Read complete files foreach my $file (glob("$PageDir/*/*.pg $PageDir/*/.*.pg")) { next unless $file =~ m|/.*/(.+)\.pg$|; my $page = $1; next if $regexp && $page !~ m|$regexp|o; $page = $page . ".org"; mkdir($OrgDir) or die "Cannot create $OrgDir directory: $!" unless -d $OrgDir; open(F, $file) or die "Cannot read $page file: $!"; my $data = ; close(F); my $ts = (stat("$OrgDir/$page"))[9]; my %result1 = ParseData($data); my $result2 = FixMarkUp($result1{text}); if ($ts && $ts == $result1{ts}) { print "skipping $page because it is up to date\n" if $verbose; } else { print "writing $page because $ts != $result{ts}\n" if $verbose; open(F,"> $OrgDir/$page") or die "Cannot write $page org file: $!"; # print F $result1{text}; print F $result2; close(F); utime $result1{ts}, $result1{ts}, "$OrgDir/$page"; # touch file } } } use Getopt::Long; my $regexp = undef; my $page = 'page'; my $dir = 'org'; GetOptions ("regexp=s" => \$regexp, "page=s" => \$page, "dir=s" => \$dir, "help" => \$help); if ($help) { print qq{ Usage: $0 [--regexp REGEXP] [--page DIR] [--dir DIR] Writes the org wiki text into plain text files. --regexp selects a subsets of pages whose names match the regular expression. Note that spaces have been translated to underscores. --page designates the page directory. By default this is 'page' in the current directory. If you run this script in your data directory, the default should be fine. --dir designates an output directory. By default this is 'org' in the current directory. Example: $0 --regexp '\\.el\$' --dir elisp } } else { main ($regexp, $page, $dir); } --------------040606060106040103050908-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: Importing from Oddmuse? Date: Mon, 28 Oct 2013 19:12:07 +0100 Message-ID: <87y55dqn7s.fsf@Rainer.invalid> References: <526E7C4A.7050804@pfdstudio.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VarIf-0007fZ-5l for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 14:12:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VarIZ-0003tO-Vk for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 14:12:25 -0400 Received: from plane.gmane.org ([80.91.229.3]:49454) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VarIZ-0003tI-P9 for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 14:12:19 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VarIY-000705-4P for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 19:12:18 +0100 Received: from pd9eb265a.dip0.t-ipconnect.de ([217.235.38.90]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 28 Oct 2013 19:12:18 +0100 Received: from Stromeko by pd9eb265a.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 28 Oct 2013 19:12:18 +0100 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: emacs-orgmode@gnu.org Peter Davis writes: > # hyperlinks > s/\[\[([^]]*)\]\]/[[file:$1.org][$1]]/g; Try this to fix the links maybe: # hyperlinks s/\[\[([^]]*)\]\]/ my $l = $1; $l =~ s: :_:g; "[[file:$l.org][$l]]"/gex; Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf rackAttack V1.04R1: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Davis Subject: Re: Importing from Oddmuse? Date: Mon, 28 Oct 2013 14:27:44 -0400 Message-ID: <526EACA0.3070709@pfdstudio.com> References: <526E7C4A.7050804@pfdstudio.com> <87y55dqn7s.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------030807000902030704030200" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VarXc-0002Ze-TX for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 14:27:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VarXY-0008P2-71 for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 14:27:52 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:44918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VarXX-0008Os-VJ for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 14:27:48 -0400 In-Reply-To: <87y55dqn7s.fsf@Rainer.invalid> 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: emacs-orgmode@gnu.org This is a multi-part message in MIME format. --------------030807000902030704030200 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 10/28/13, 2:12 PM, Achim Gratz wrote: > Peter Davis writes: >> # hyperlinks >> s/\[\[([^]]*)\]\]/[[file:$1.org][$1]]/g; > Try this to fix the links maybe: > > # hyperlinks > s/\[\[([^]]*)\]\]/ > my $l = $1; > $l =~ s: :_:g; > "[[file:$l.org][$l]]"/gex; Excellent! I modified it slightly to keep the spaces in the display string: # hyperlinks s/\[\[([^]]*)\]\]/ my $l = $1; my $orig = $1; $l =~ s: :_:g; "[[file:$l.org][$orig]]"/gex; Thanks, Achim! -pd -- ---- Peter Davis The Tech Curmudgeon www.techcurmudgeon.com --------------030807000902030704030200 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
On 10/28/13, 2:12 PM, Achim Gratz wrote:
Peter Davis writes:
	    # hyperlinks
	    s/\[\[([^]]*)\]\]/[[file:$1.org][$1]]/g;
Try this to fix the links maybe:

 	    # hyperlinks
 	    s/\[\[([^]]*)\]\]/
            my $l = $1;
            $l =~ s: :_:g;
            "[[file:$l.org][$l]]"/gex;

Excellent! I modified it slightly to keep the spaces in the display string:

         # hyperlinks
         s/\[\[([^]]*)\]\]/
         my $l = $1;
         my $orig = $1;
         $l =~ s: :_:g;
         "[[file:$l.org][$orig]]"/gex;

Thanks, Achim!

-pd

-- 
----
Peter Davis
The Tech Curmudgeon
www.techcurmudgeon.com
--------------030807000902030704030200-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: Importing from Oddmuse? Date: Mon, 28 Oct 2013 20:18:01 +0100 Message-ID: <87txg1qk5y.fsf@Rainer.invalid> References: <526E7C4A.7050804@pfdstudio.com> <87y55dqn7s.fsf@Rainer.invalid> <526EACA0.3070709@pfdstudio.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VasKQ-0003n7-99 for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 15:18:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VasKL-00072V-28 for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 15:18:18 -0400 Received: from plane.gmane.org ([80.91.229.3]:55264) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VasKK-00072R-RG for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 15:18:12 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VasKJ-00019v-7m for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 20:18:11 +0100 Received: from pd9eb265a.dip0.t-ipconnect.de ([217.235.38.90]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 28 Oct 2013 20:18:11 +0100 Received: from Stromeko by pd9eb265a.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 28 Oct 2013 20:18:11 +0100 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: emacs-orgmode@gnu.org Peter Davis writes: > Excellent! I modified it slightly to keep the spaces in the display > string: This is better, I'd think: # hyperlinks s/\[\[([^]]*)\]\]/ my $l = $1; $l =~ s: :_:g; "[[file:$l.org][$1]]"/gex; Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Wavetables for the Waldorf Blofeld: http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Davis Subject: Re: Importing from Oddmuse? Date: Mon, 28 Oct 2013 15:35:24 -0400 Message-ID: <526EBC7C.5020403@pfdstudio.com> References: <526E7C4A.7050804@pfdstudio.com> <87y55dqn7s.fsf@Rainer.invalid> <526EACA0.3070709@pfdstudio.com> <87txg1qk5y.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vasb7-000834-BN for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 15:35:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vasb2-0003eC-F8 for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 15:35:33 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:40742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vasb2-0003e6-Bz for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 15:35:28 -0400 In-Reply-To: <87txg1qk5y.fsf@Rainer.invalid> 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: emacs-orgmode@gnu.org On 10/28/13, 3:18 PM, Achim Gratz wrote: > Peter Davis writes: >> Excellent! I modified it slightly to keep the spaces in the display >> string: > This is better, I'd think: > > # hyperlinks > s/\[\[([^]]*)\]\]/ > my $l = $1; > $l =~ s: :_:g; > "[[file:$l.org][$1]]"/gex; That was the first thing I tried, and Perl complained about an undefined variable. I may have made a typo though. Thanks! Cheers, -pd -- Peter Davis The Tech Curmudgeon www.techcurmudgeon.com From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: Importing from Oddmuse? Date: Mon, 28 Oct 2013 21:26:55 +0100 Message-ID: <87li1dqgz4.fsf@Rainer.invalid> References: <526E7C4A.7050804@pfdstudio.com> <87y55dqn7s.fsf@Rainer.invalid> <526EACA0.3070709@pfdstudio.com> <87txg1qk5y.fsf@Rainer.invalid> <526EBC7C.5020403@pfdstudio.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VatP8-0003Li-Uv for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 16:27:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VatP3-00010M-JK for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 16:27:14 -0400 Received: from plane.gmane.org ([80.91.229.3]:56956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VatP3-00010F-Cb for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 16:27:09 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VatP1-0003fP-Dg for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 21:27:07 +0100 Received: from pd9eb1b1f.dip0.t-ipconnect.de ([217.235.27.31]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 28 Oct 2013 21:27:07 +0100 Received: from Stromeko by pd9eb1b1f.dip0.t-ipconnect.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 28 Oct 2013 21:27:07 +0100 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: emacs-orgmode@gnu.org Peter Davis writes: > That was the first thing I tried, and Perl complained about an > undefined variable. I may have made a typo though. Nope, my error. $1 gets clobbered by the second replacement. So you'd want what you wrote or somewhat shorter: # hyperlinks s/\[\[([^]]*)\]\]/ my ($l, $o) = ($1, $1); $l =~ s: :_:g; "[[file:$l.org][$o]]"/gex; Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ Factory and User Sound Singles for Waldorf rackAttack: http://Synth.Stromeko.net/Downloads.html#WaldorfSounds From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Davis Subject: Re: Importing from Oddmuse? Date: Mon, 28 Oct 2013 16:33:02 -0400 Message-ID: References: <526E7C4A.7050804@pfdstudio.com> <87y55dqn7s.fsf@Rainer.invalid> <526EACA0.3070709@pfdstudio.com> <87txg1qk5y.fsf@Rainer.invalid> <526EBC7C.5020403@pfdstudio.com> <87li1dqgz4.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7ba97f3ab380a004e9d301f3 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VatUn-0005am-Ud for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 16:33:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VatUm-0002XS-FX for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 16:33:05 -0400 Received: from mail-we0-x22e.google.com ([2a00:1450:400c:c03::22e]:51081) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VatUm-0002XA-82 for emacs-orgmode@gnu.org; Mon, 28 Oct 2013 16:33:04 -0400 Received: by mail-we0-f174.google.com with SMTP id u56so7198591wes.5 for ; Mon, 28 Oct 2013 13:33:02 -0700 (PDT) In-Reply-To: <87li1dqgz4.fsf@Rainer.invalid> 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: Achim Gratz Cc: emacs-orgmode@gnu.org --047d7ba97f3ab380a004e9d301f3 Content-Type: text/plain; charset=ISO-8859-1 On Mon, Oct 28, 2013 at 4:26 PM, Achim Gratz wrote: > Peter Davis writes: > > That was the first thing I tried, and Perl complained about an > > undefined variable. I may have made a typo though. > > Nope, my error. $1 gets clobbered by the second replacement. So you'd > want what you wrote or somewhat shorter: > > # hyperlinks > s/\[\[([^]]*)\]\]/ > my ($l, $o) = ($1, $1); > $l =~ s: :_:g; > "[[file:$l.org][$o]]"/gex; > > Yes, that works beautifully, and is nice and concise. Thank you! -pd -- ---- The Tech Curmudgeon http://www.techcurmudgeon.com --047d7ba97f3ab380a004e9d301f3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

= On Mon, Oct 28, 2013 at 4:26 PM, Achim Gratz <Stromeko@nexgo.de> wrote:
Peter Davis writes:
> That was the first thing I tried, and Perl complained about an
> undefined variable. I may have made a typo though.

Nope, my error. =A0$1 gets clobbered by the second replacement. =A0So= you'd
want what you wrote or somewhat shorter:

# hyperlinks
s/\[\[([^]]*)\]\]/
=A0 my ($l, $o) =3D ($1, $1);
=A0 $l =3D~ s: :_:g;
=A0 "[[file:$l.org][$o]]"/gex;





--
----
The Tech Curmudgeon

--047d7ba97f3ab380a004e9d301f3-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Davis Subject: Re: Importing from Oddmuse? Date: Wed, 30 Oct 2013 18:44:53 -0400 Message-ID: <20131030224453.GA1419@pfdstudio-air.iscinternal.com> References: <87k3gu5uvz.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbeVi-0000pt-Ba for emacs-orgmode@gnu.org; Wed, 30 Oct 2013 18:45:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VbeVc-0000B5-8m for emacs-orgmode@gnu.org; Wed, 30 Oct 2013 18:45:10 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:58106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbeVc-00005O-1F for emacs-orgmode@gnu.org; Wed, 30 Oct 2013 18:45:04 -0400 Content-Disposition: inline In-Reply-To: <87k3gu5uvz.fsf@gmail.com> 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: Jambunathan K Cc: emacs-orgmode@gnu.org On Thu, Oct 31, 2013 at 02:38:48AM +0530, Jambunathan K wrote: > Peter Davis writes: > > > I've used Oddmuse for years to maintain my own personal Wiki, but now > > I'm looking to move to Org mode. > > I am in the process of adding Org-mode markup support to the Oddmuse That would be great. I'd love to use the same markup everywhere. Thanks, -pd > One can also look at the churnings happening here: > > http://repo.or.cz/w/orgmuse.git From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Borkowski Subject: Re: Importing from Oddmuse? Date: Thu, 31 Oct 2013 07:18:29 +0100 Message-ID: <20131031071829.6e2dccd2@aga-netbook> References: <87k3gu5uvz.fsf@gmail.com> <20131030224453.GA1419@pfdstudio-air.iscinternal.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36324) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vblb4-0002hn-Cu for emacs-orgmode@gnu.org; Thu, 31 Oct 2013 02:19:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VblaU-00047j-Uz for emacs-orgmode@gnu.org; Thu, 31 Oct 2013 02:19:10 -0400 Received: from msg.wmi.amu.edu.pl ([2001:808:114:2::50]:35236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VblaU-00047I-Nj for emacs-orgmode@gnu.org; Thu, 31 Oct 2013 02:18:34 -0400 Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id BB3805AA4E for ; Thu, 31 Oct 2013 07:18:31 +0100 (CET) Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4PePqdYIPNUc for ; Thu, 31 Oct 2013 07:18:31 +0100 (CET) Received: from aga-netbook (99-52.echostar.pl [213.156.99.52]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id 898B95AA4A for ; Thu, 31 Oct 2013 07:18:31 +0100 (CET) In-Reply-To: <20131030224453.GA1419@pfdstudio-air.iscinternal.com> 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: emacs-orgmode@gnu.org Dnia 2013-10-30, o godz. 18:44:53 Peter Davis napisa=C5=82(a): > On Thu, Oct 31, 2013 at 02:38:48AM +0530, Jambunathan K wrote: > > Peter Davis writes: > >=20 > > > I've used Oddmuse for years to maintain my own personal Wiki, but > > > now I'm looking to move to Org mode. > >=20 > > I am in the process of adding Org-mode markup support to the Oddmuse >=20 > That would be great. I'd love to use the same markup everywhere. +1 >=20 > Thanks, > -pd >=20 >=20 > > One can also look at the churnings happening here: > >=20 > > http://repo.or.cz/w/orgmuse.git >=20 --=20 Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: Importing from Oddmuse? Date: Thu, 31 Oct 2013 02:38:48 +0530 Message-ID: <87k3gu5uvz.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbczC-0006jH-Fb for emacs-orgmode@gnu.org; Wed, 30 Oct 2013 17:07:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vbcz4-00025F-Hp for emacs-orgmode@gnu.org; Wed, 30 Oct 2013 17:07:30 -0400 Received: from mail-pa0-x22c.google.com ([2607:f8b0:400e:c03::22c]:32813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbcz4-000255-Ab for emacs-orgmode@gnu.org; Wed, 30 Oct 2013 17:07:22 -0400 Received: by mail-pa0-f44.google.com with SMTP id fb1so1526013pad.31 for ; Wed, 30 Oct 2013 14:07:18 -0700 (PDT) In-Reply-To: (Peter Davis's message of "Fri, 25 Oct 2013 10:54:34 -0400") 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: Peter Davis Cc: emacs-orgmode@gnu.org Peter Davis writes: > I've used Oddmuse for years to maintain my own personal Wiki, but now > I'm looking to move to Org mode. I am in the process of adding Org-mode markup support to the Oddmuse wiki engine. (By support I mean, only the text markup not agenda or babel related stuff) I have some changes in my local work-area that is promising. Interested people can watch out for activity in this space - http://oddmuse.org/wiki/Org_Markup_Extension One can also look at the churnings happening here: http://repo.or.cz/w/orgmuse.git