dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

org2wiki.sed (454B)


      1 # headers
      2 s/^\* \(.*\)/= \1 =/
      3 s/^\*\{2\} \(.*\)/== \1 ==/
      4 s/^\*\{3\} \(.*\)/=== \1 ===/
      5 s/^\*\{4\} \(.*\)/==== \1 ====/
      6 s/^\*\{5\} \(.*\)/====== \1 =====/
      7 s/^\*\{6\} \(.*\)/====== \1 =====/
      8 # links
      9 s/\[\[\(http[^]]*\)\]\[\([^]]*\)\]\]/[[\1|\2]]/g
     10 # files/images
     11 s/\[\[\([^]]*\)\]\[\([^]]+\)\]\]/{{local:\1|\2}}/g
     12 s/\[\[\([^]|]*\)\]\]/{{local:\1}}/g
     13 # code
     14 s/#\+BEGIN_SRC \(.*\)/{{{class="code \1"/
     15 s/#\+END_SRC/}}}/
     16 # math
     17 s/^ *\(.*\\[a-zA-Z].*\)/$\1$/