[docs]
class ProjectAuthor(ShorthandPluginBase, ProjectDependentFactory, CopyrightNotice):
"""
Copyright belonging to a project author.
"""
_plugin_id = "project-author"
_plugin_label = _("Project author")
[docs]
def __init__(self, author: Localizable | None):
self._author = author
[docs]
@override
@classmethod
async def new_for_project(cls, project: Project) -> Self:
return cls(project.configuration.author)
@property
@override
def summary(self) -> Localizable:
if self._author:
return _("© Copyright {author}, unless otherwise credited").format(
author=self._author
)
return _("© Copyright the author, unless otherwise credited")
@property
@override
def text(self) -> Localizable:
return self.summary
[docs]
class PublicDomain(ShorthandPluginBase, CopyrightNotice):
"""
A work is in the `public domain <https://en.wikipedia.org/wiki/Public_domain>`.
"""
_plugin_id = "public-domain"
_plugin_label = _("Public domain")
@property
@override
def summary(self) -> Localizable:
return _("Public domain")
@property
@override
def text(self) -> Localizable:
return _(
"Works in the public domain can be used or referenced without permission, because nobody holds any exclusive rights over these works (anymore)."
)