diff options
Diffstat (limited to 'converter.py')
-rw-r--r-- | converter.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/converter.py b/converter.py index 07944f4..79624f7 100644 --- a/converter.py +++ b/converter.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 from optparse import OptionParser +from re import search, sub """Command line arguments""" usage = "usage: %prog [options] file..." parser = OptionParser(usage=usage) @@ -13,3 +14,14 @@ parser.add_option('-o', '--output-type', dest='output_type', (options, args) = parser.parse_args() +"""Valid argument testing +TODO: Add support for directories +""" +markdown_files = [] +for file in args: + if search(".md", file) is not None: + # Is a markdown file + markdown_files.append(file) + else: + print(file, "is not a markdown file, skipping") + |