-
Couldn't load subscription status.
- Fork 1.9k
New Plugin: Titlecase #6133
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
base: master
Are you sure you want to change the base?
New Plugin: Titlecase #6133
Conversation
… for pre or post import
|
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
| super().__init__() | ||
|
|
||
| # Register template function | ||
| self.template_funcs["titlecase"] = self.titlecase # type: ignore |
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.
Could not get mypy to play nice with this type here - any suggestions appreciated.
This plugin aims to address the shortcomings of the %title function, as brought up in issues #152, #3298 and an initial look to improvement with #3411. It supplies a new string format command,
%titlecasewhich doesn't interfere with any prior expected behavior of the%titleformat command.It also adds the ability to apply titlecase logic to metadata fields that a user selects, which is useful if you, like me, are looking for stylistic consistency and the minor stylistic differences between Musizbrainz, Discogs, Deezer etc, with title case are slightly infuriating.
This will add an optional dependency of titlecase, which allows the titlecase core logic to be externally maintained.
If there's not enough draw to have this as a core plugin, I can also spin this into an independent one, but it seemed like a recurring theme that the %title string format didn't really behave as expected, and I wanted my metadata to match too.
docs/to describe it.)docs/changelog.rstto the bottom of one of the lists near the top of the document.)