dokuwiki-to-hugo/src/main.py

17 lines
528 B
Python
Raw Permalink Normal View History

2017-01-19 17:27:41 +01:00
import argparse
from dokuwiki_to_hugo import DokuWikiToHugo
2017-01-19 17:27:41 +01:00
2017-01-30 16:09:23 +01:00
def main(directory, root):
DokuWikiToHugo(root).doku_to_hugo(directory)
2017-01-19 17:27:41 +01:00
if __name__ == "__main__":
parser = argparse.ArgumentParser()
2017-01-30 16:09:23 +01:00
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)
2017-01-19 17:27:41 +01:00
opts = parser.parse_args()
main(opts.dir, opts.root)