Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wiki-convert [2008/04/30 14:41]
cannam created
— (current)
Line 1: Line 1:
-=====Pleasantly ugly script to convert from SourceForge wiki format (WikiSpaces) to Dokuwiki===== 
  
-<code perl> 
-#!/usr/bin/perl 
- 
-while (<>) { 
-  my $h='H_E_A_D_I_N_G'; 
-  s/^====(.*)====$/$h$h$h$1$h$h$h/; 
-  s/^===(.*)===$/$h$h$h$h$1$h$h$h$h/; 
-  s/^==(.*)==$/$h$h$h$h$h$1$h$h$h$h$h/; 
-  s/^=(.*)=$/$h$h$h$h$h$h$1$h$h$h$h$h$h/; 
-  s/$h/=/g; 
-  if (/\[\[code[^\]]*\]\]/) { 
-    if ($incode) { 
-      s/\[\[code\]\]/<\/code>/; 
-      $incode=0; 
-    } else { 
-      s/\[\[code\]\]/<code>/; 
-      s/\[\[code( format=\"([^\"]*)\")?\]\]/<code $2>/; 
-      $incode=1; 
-    } 
-  } 
-  s/^\* /  * /; 
-  s/^\# /  - /; 
-  s/^{{(.*)}}/<code bash> 
-$1 
-<\/code>/; 
-  $prevnormal=$normal; 
-  if (/^[^<]/) { $normal = 1; } else { $normal = 0; } 
-  if ($prevnormal eq $normal) { 
-    print "\n"; 
-  } 
-  print; 
-} 
- 
-</code> 
 
 
wiki-convert.1209566478.txt.gz ยท Last modified: 2022/05/06 16:07 (external edit)
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki