2017-01-19 17:27:41 +01:00
|
|
|
import argparse
|
|
|
|
|
2018-09-03 15:02:54 +02:00
|
|
|
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()
|
2017-01-21 11:37:17 +01:00
|
|
|
main(opts.dir, opts.root)
|