Merge pull request #3 from ssmiller25/pathadjustment

Minor Fixes
This commit is contained in:
Wouter Groeneveld 2020-03-02 11:40:26 +01:00 committed by GitHub
commit 782ae4e6c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 3 deletions

3
.gitignore vendored
View File

@ -152,3 +152,6 @@ ENV/
.ropeproject
# End of https://www.gitignore.io/api/pycharm,python
# Ignore output directory generated from program
output/

View File

@ -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?

View File

@ -1,2 +1,2 @@
# this initializes the submodule __init__
from src.markdown import *
from markdown import *

View File

@ -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:

16
src/main.py Normal file
View File

@ -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)