|
|
|
@ -12,7 +12,7 @@ def str2bool(v):
|
|
|
|
|
raise argparse.ArgumentTypeError('Boolean value expected.')
|
|
|
|
|
|
|
|
|
|
def main(directory, options):
|
|
|
|
|
DokuWikiToHugo(options.root, front_matter=options.front_matter).doku_to_hugo(directory)
|
|
|
|
|
DokuWikiToHugo(options.root, frontmatter_tags=options.frontmatter_tags).doku_to_hugo(directory)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
@ -20,7 +20,7 @@ if __name__ == "__main__":
|
|
|
|
|
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)
|
|
|
|
|
parser.add_argument("--front_matter", default=True, type=str2bool,
|
|
|
|
|
help="whether to generate front matter in the converted markdown.")
|
|
|
|
|
parser.add_argument("--frontmatter_tags", default=True, type=str2bool,
|
|
|
|
|
help="whether to generate tags in front matter in the converted markdown.")
|
|
|
|
|
opts = parser.parse_args()
|
|
|
|
|
main(opts.dir, opts)
|
|
|
|
|