Différences
Ci-dessous, les différences entre deux révisions de la page.
| Prochaine révision | Révision précédente | ||
| info:dw2md [2019/10/14 14:06] – créée radeff | info: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!</ | ||
| + | |||
| + | https:// | ||
| + | ===== Old stuff ===== | ||
| + | //pour les curieux uniquement// | ||
| copie locale de | copie locale de | ||
| https:// | https:// | ||
| Ligne 5: | Ligne 10: | ||
| Steps for this are: | Steps for this are: | ||
| - | | + | Use dokuwiki2git to export a git repository of the pages |
| - | | + | Copy pages to new directory and change permissions of those pages |
| - | | + | 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 |
| for file in *.txt.md; do git mv " | for file in *.txt.md; do git mv " | ||
| - | | + | replace nonbreaking spaces in vim |
| : | : | ||
| - | | + | where entering < |
| find . -type f -exec sed -i ' | find . -type f -exec sed -i ' | ||
| - | | + | Replace other stuff with sed: |
| find . -type f -exec sed -i 's/ " | find . -type f -exec sed -i 's/ " | ||
| Ligne 32: | Ligne 37: | ||
| find . -type f -exec sed -i ' | find . -type f -exec sed -i ' | ||
| - | | + | Change all links to the markdown convention of: |
| [linktext]({subdir/ | [linktext]({subdir/ | ||
| - | | + | or, for relative links to pages in other subdirectories: |
| [linktext](/ | [linktext](/ | ||
| - | | + | Convert tables - a pain... |