Skip to content
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

nbconvert: Ability to specify name of output file #3799

Closed
jdfreder opened this issue Jul 26, 2013 · 10 comments · Fixed by #3822
Closed

nbconvert: Ability to specify name of output file #3799

jdfreder opened this issue Jul 26, 2013 · 10 comments · Fixed by #3822
Milestone

Comments

@jdfreder
Copy link
Member

Brought up in a conversation between @Carreau and I. Maybe add a traitlet to the FilesWriter and add a convenience flag to the nbconvertapp.py.

@jdfreder
Copy link
Member Author

Open for conversation

@minrk
Copy link
Member

minrk commented Jul 26, 2013

Makes sense - should be easy, right?

@minrk
Copy link
Member

minrk commented Jul 26, 2013

Does it make sense for it to be a configurable on FilesWriter? Or not, because one writer can be used to write out many notebooks.

@dpsanders
Copy link
Contributor

+1

@jdfreder
Copy link
Member Author

Well, I think the FilesWriter is supposed to be stateless... But I was not thinking about supporting the renaming individual outputs, I was more thinking of the ability to prefix/suffix each file written (not the extracted files).

Something like:

output_name = Unicode(u'{name}.{extension}', config=True)

Which would be useful if someone wanted to export reveal and html which doesn't work now since the output names would cause the later to overwrite the earlier.

@jdfreder
Copy link
Member Author

@Carreau ?

@minrk
Copy link
Member

minrk commented Jul 26, 2013

But the question is where to you specify that, such that it is configurable per-notebook in a multi-export run. Perhaps in NbConvertApp, and only allow it when len(notebooks) == 1?

@jdfreder
Copy link
Member Author

I personally was not thinking about putting it in nbconvertapp.py, I was just thinking about replacing this line with a str.format(...)

@jdfreder
Copy link
Member Author

And not even caring if the user doesn't include the {name} key (or whatever it will be called)...

@minrk
Copy link
Member

minrk commented Jul 26, 2013

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants