-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added unique naming for output files #22
Changes from all commits
4e006a9
63e26af
545b9bd
5d46d41
1fae0e4
fefa3ab
db57e56
a054d1b
8c658fe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import click | ||
import csv2docx.csv2docx as c2d | ||
from . import csv2docx | ||
|
||
|
||
@click.command() | ||
|
@@ -14,6 +14,14 @@ | |
@click.option( | ||
'--delimiter', '-d', | ||
default=";", | ||
help='delimiter used in your csv. Default is \';\'') | ||
def main(data, template, delimiter): | ||
c2d.convert(data, template, delimiter) | ||
help='Delimiter used in your csv. Default is \';\'') | ||
@click.option( | ||
'--name', '-n', | ||
required=True, | ||
help='Naming scheme for output files.') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps we can expand on the help by adding: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also - is this case sensitive? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At the moment, yes. Let's discuss in #25 |
||
@click.option( | ||
'--path', '-p', | ||
default="output", | ||
help='The location to store the files.') | ||
def main(data, template, name, path, delimiter): | ||
csv2docx.convert(data, template, name, path, delimiter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think making
--name
required is a reasonable approach, though would argue we need to allow flexibility of use. I imagine the scenario of generating un-named tickets, numbered flyers, etc - in which case the name of the files does not need to have a relation to the data. I'll expand on this in a separate issue.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to add, some columns might be incomplete - which might provide a result the user is not expected. We can have a discussion in the issue #25 on what approach might make more sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great point about incomplete cells 👍