Compare commits
2 Commits
0f01ef80ec
...
516e08a707
Author | SHA1 | Date |
---|---|---|
Lukáš Kucharczyk | 516e08a707 | |
Lukáš Kucharczyk | ff645425f9 |
|
@ -139,3 +139,4 @@ dmypy.json
|
|||
cython_debug/
|
||||
|
||||
testfiles
|
||||
*.csv
|
||||
|
|
|
@ -25,7 +25,9 @@ fields = {
|
|||
}
|
||||
|
||||
|
||||
def convert(directory="testfiles", outputfile="test.csv"):
|
||||
def convert(directory="f", outputfile="test.csv"):
|
||||
if not os.path.isdir(directory):
|
||||
exit(f"The directory {directory} does not exist!")
|
||||
with open(outputfile, "w", newline="") as csvfile:
|
||||
writer = csv.DictWriter(csvfile, fieldnames=fields.values())
|
||||
writer.writeheader()
|
|
@ -15,9 +15,9 @@ classifiers =
|
|||
Operating System :: OS Independent
|
||||
|
||||
[options]
|
||||
packages = frontmatter-to-csv
|
||||
packages = frontmatter_to_csv
|
||||
python_requires = >=3.6
|
||||
|
||||
[options.entry_points]
|
||||
console_scripts =
|
||||
frontmatter-to-csv = frontmatter-to-csv
|
||||
frontmatter-to-csv = frontmatter_to_csv.convert:convert
|
Loading…
Reference in New Issue