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
Add default display format option to config file #1050
Conversation
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.
This looks really good! Tests and docs included, even. Thank you!
Just one small change, and we'll be ready to go.
jrnl/jrnl.py
Outdated
# Default display mode | ||
print(journal.pprint()) | ||
# Display according display_format config option | ||
config_selected = kwargs["config"].get("display_format") |
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.
Instead of nesting this conditional in the parent, can you please move it to the top level with the other elif
s?
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.
Hey, thanks, that would be better 👍. Done.
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.
Thank you! 🎖️
a4a7bf4
to
807af77
Compare
* Add display format option to config file. * Add tests. * Fix `black` error. * Change nested if to top level.
* Add display format option to config file. * Add tests. * Fix `black` error. * Change nested if to top level.
* Add display format option to config file. * Add tests. * Fix `black` error. * Change nested if to top level.
* Add display format option to config file. * Add tests. * Fix `black` error. * Change nested if to top level.
display_format
to config.--format md
everytime can be tedious.Change
display_format
onconfig.yml
to any of the implemented formatters.Checklist
for the same issue.
Ready to review @wren