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

Allow pattern in output_base #1967

Merged
merged 2 commits into from
Mar 31, 2023

Conversation

JeppeKlitgaard
Copy link
Contributor

@JeppeKlitgaard JeppeKlitgaard commented Mar 28, 2023

This PR adds additional functionality to the output_base configuration option (--output) in order to allow patterning of output filenames when converting multiple notebooks at once.

Fairly exhaustive tests of the changes are also implemented.

I don't believe this requires changes to the documentation outside what is auto-generated from the doc-strings and descriptions defined in the Python files.

I am using this in my configuration to make the rendered markdown files have an additional marker to distinguish them from manually created markdown files:

# This causes the output files to be '{notebook_name}.generated.md' for markdown files
c.NbConvertApp.output_base = "{notebook_name}.generated"

See #1966 for more details.

Fix: #1966

@JeppeKlitgaard
Copy link
Contributor Author

I am not sure I am able to set PR labels

@JeppeKlitgaard
Copy link
Contributor Author

CI failures seem unrelated to PR changes.

@blink1073 blink1073 changed the title feat: allow pattern in output_base Allow pattern in output_base Mar 31, 2023
Copy link
Member

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thank you!

@blink1073
Copy link
Member

The link failure is being addressed in #1968

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

Successfully merging this pull request may close these issues.

Add configurable notebook name pattern
2 participants