info:dw2md

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
info:dw2md [2019/10/14 14:06] – créée radeffinfo:dw2md [2021/12/03 05:10] (Version actuelle) – radeff
Ligne 1: Ligne 1:
 ====== Migrer dokuwiki -> markdown ====== ====== Migrer dokuwiki -> markdown ======
 +<note tip>Un super script php tout à fait fonctionnel à utiliser sans modération!</note>
 +
 +https://github.com/ludoza/DokuWiki-to-Markdown-Converter
 +===== Old stuff =====
 +//pour les curieux uniquement//
 copie locale de copie locale de
 https://earthscinotebook.readthedocs.io/en/latest/wiki/transition2markdown/ https://earthscinotebook.readthedocs.io/en/latest/wiki/transition2markdown/
Ligne 5: Ligne 10:
 Steps for this are: Steps for this are:
  
-    Use dokuwiki2git to export a git repository of the pages+Use dokuwiki2git to export a git repository of the pages
  
-    Copy pages to new directory and change permissions of those pages+Copy pages to new directory and change permissions of those pages
  
-    Convert dokuwiki to markdown using the pandoc mediawiki converter:+Convert dokuwiki to markdown using the pandoc mediawiki converter:
  
     find . -name \*.txt -type f -exec pandoc -f mediawiki -t markdown -o {}.md {} \;     find . -name \*.txt -type f -exec pandoc -f mediawiki -t markdown -o {}.md {} \;
  
-    do some custom editing of the new markdown pages+do some custom editing of the new markdown pages
  
     for file in *.txt.md; do git mv "$file" "${file//txt./}"; done     for file in *.txt.md; do git mv "$file" "${file//txt./}"; done
  
-    replace nonbreaking spaces in vim+replace nonbreaking spaces in vim
  
     :%s/<NBSP>/ /g     :%s/<NBSP>/ /g
  
-    where entering <NBSP> is accomplished with <CTRL-k>+space+space. OR - remove in all files with sed:+where entering <NBSP> is accomplished with <CTRL-k>+space+space. OR - remove in all files with sed:
  
     find . -type f -exec sed -i 's/\xC2\xA0/ /g' {} +     find . -type f -exec sed -i 's/\xC2\xA0/ /g' {} +
  
-    Replace other stuff with sed:+Replace other stuff with sed:
  
     find . -type f -exec sed -i 's/ "wikilink"//g' {} +     find . -type f -exec sed -i 's/ "wikilink"//g' {} +
Ligne 32: Ligne 37:
     find . -type f -exec sed -i 's/-   -   / **/g' {} +     find . -type f -exec sed -i 's/-   -   / **/g' {} +
  
-    Change all links to the markdown convention of:+Change all links to the markdown convention of:
  
     [linktext]({subdir/}markdownpage.md)     [linktext]({subdir/}markdownpage.md)
  
-    or, for relative links to pages in other subdirectories:+or, for relative links to pages in other subdirectories:
  
     [linktext](/subdir/markdownpage.md)     [linktext](/subdir/markdownpage.md)
  
-    Convert tables - a pain...+Convert tables - a pain...
  
  • info/dw2md.1571054770.txt.gz
  • Dernière modification : 2019/10/14 14:06
  • de radeff