commit
782ae4e6c0
|
@ -152,3 +152,6 @@ ENV/
|
|||
.ropeproject
|
||||
|
||||
# End of https://www.gitignore.io/api/pycharm,python
|
||||
|
||||
# Ignore output directory generated from program
|
||||
output/
|
||||
|
|
|
@ -10,7 +10,7 @@ See https://www.dokuwiki.org/wiki:syntax
|
|||
|
||||
Just use the main python class. It uses `argparse`:
|
||||
|
||||
```python main.py --dir='some_dokuwiki_root_dir'```
|
||||
```python src/main.py --dir='some_dokuwiki_root_dir'```
|
||||
|
||||
Command line options:
|
||||
|
||||
|
@ -129,4 +129,4 @@ That way it's auto-loaded and wired in the main conversion.
|
|||
|
||||
* embedding php - kill it with fire?
|
||||
* macro's - kill it with fire?
|
||||
* what to do with footnotes?
|
||||
* what to do with footnotes?
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
# this initializes the submodule __init__
|
||||
from src.markdown import *
|
||||
from markdown import *
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
import os
|
||||
import shutil
|
||||
|
||||
<<<<<<< HEAD
|
||||
from hugo_file_config import HugoFileConfig
|
||||
from markdown_converter import MarkdownConverter
|
||||
=======
|
||||
from src.hugo_front_matter import HugoFrontMatter
|
||||
from src.markdown_converter import MarkdownConverter
|
||||
>>>>>>> master
|
||||
|
||||
|
||||
class DokuWikiToHugo:
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
import argparse
|
||||
|
||||
from dokuwiki_to_hugo import DokuWikiToHugo
|
||||
|
||||
|
||||
def main(directory, root):
|
||||
DokuWikiToHugo(root).doku_to_hugo(directory)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("-d", "--dir", help="the directory of your DokuWiki pages collection", required=True)
|
||||
parser.add_argument("-r", "--root", help="the root directory name in your hugo content where to link to",
|
||||
required=False)
|
||||
opts = parser.parse_args()
|
||||
main(opts.dir, opts.root)
|
Loading…
Reference in New Issue