/[socialtext-import]/phpwiki/phpwiki-dump.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /phpwiki/phpwiki-dump.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1 by dpavlin, Sun Nov 19 14:57:40 2006 UTC revision 2 by dpavlin, Mon Nov 20 18:43:09 2006 UTC
# Line 36  while (my($page,$content,$last_change,$a Line 36  while (my($page,$content,$last_change,$a
36          $content =~ s/^!!!!!\s*(.*?)$/^^^^^ $1/mg;          $content =~ s/^!!!!!\s*(.*?)$/^^^^^ $1/mg;
37    
38          $content =~ s/!([A-Z]\w+)/$1/mg;          $content =~ s/!([A-Z]\w+)/$1/mg;
39            
40            # markup
41          $content =~ s!''(.*?)''!/$1/!mg;          $content =~ s!''(.*?)''!/$1/!mg;
42          $content =~ s!__(.*?)__!*$1*!mg;          $content =~ s!__(.*?)__!*$1*!mg;
43    
44            # links to url
45          $content =~ s!\[\s*(.+?)\s*[\s\|]\s*((http://|mailto:)\S+)\s*\]!"$1"<$2>!mg;          $content =~ s!\[\s*(.+?)\s*[\s\|]\s*((http://|mailto:)\S+)\s*\]!"$1"<$2>!mg;
46          $content =~ s!\[\s*(http://\S+)\s*[\s\|]\s*(.+?)\s*\]!"$2"<$1>!mg;          $content =~ s!\[\s*(http://\S+)\s*[\s\|]\s*(.+?)\s*\]!"$2"<$1>!mg;
47    
48            # page links with names
49            $content =~ s!\[\s*([\w\s]+)\s*\|\s*(\w+)\s*\]!"$1"[$2]!mg;
50    
51          my $seen;          my $seen;
52          my $out;          my $out;
53          foreach (split(/[\n\r]/, $content)) {          foreach (split(/[\n\r]/, $content)) {

Legend:
Removed from v.1  
changed lines
  Added in v.2

  ViewVC Help
Powered by ViewVC 1.1.26