diff --git a/src/dragonglass/__main__.py b/src/dragonglass/__main__.py index 5932752..988fa04 100644 --- a/src/dragonglass/__main__.py +++ b/src/dragonglass/__main__.py @@ -1,4 +1,5 @@ import sys + from dragonglass import main sys.exit(main()) diff --git a/src/dragonglass/dragonglass.py b/src/dragonglass/dragonglass.py index 204ff7e..4e8dd68 100644 --- a/src/dragonglass/dragonglass.py +++ b/src/dragonglass/dragonglass.py @@ -1,11 +1,13 @@ #!/usr/bin/env python3 import argparse -import yaml from pathlib import Path from typing import Any -from .tree import generate_list, SourceNode, SourceIndex + +import yaml + from .mparse import create_markdown_parser +from .tree import SourceIndex, SourceNode, generate_list # The command line parser parser = argparse.ArgumentParser(prog='dragonglass') diff --git a/src/dragonglass/mparse.py b/src/dragonglass/mparse.py index fde4ed0..184588d 100644 --- a/src/dragonglass/mparse.py +++ b/src/dragonglass/mparse.py @@ -1,14 +1,16 @@ #/usr/bin/env python3 import re -import markdown import xml.etree.ElementTree as etree from typing import Any -from urllib.parse import urlparse from urllib.parse import unquote as urlunquote +from urllib.parse import urlparse + +import markdown from markdown.extensions import Extension from markdown.inlinepatterns import InlineProcessor, SimpleTagInlineProcessor from markdown.preprocessors import Preprocessor + from .dragonglass import Context PRIO_BASE = 10000 # priority base for our extensions diff --git a/src/dragonglass/tree.py b/src/dragonglass/tree.py index 5edcf50..a01852e 100644 --- a/src/dragonglass/tree.py +++ b/src/dragonglass/tree.py @@ -3,6 +3,7 @@ from pathlib import Path from typing import Any from urllib.parse import quote as urlquote + import markdown import yaml