Copyright notice plugins¶
Type |
|
---|---|
Repository |
Creating a copyright¶
Create a new class that extends
betty.copyright_notice.CopyrightNotice
and implements the abstract methods, for example:from typing import override from betty.copyright import CopyrightNotice from betty.machine_name import MachineName class MyCopyrightNotice(CopyrightNotice): @override @classmethod def plugin_id(cls) -> MachineName: return "my-module-my-copyright-notice" # Implement remaining abstract methods... ...
Tell Betty about your copyright notice by registering it as an entry point. Given the copyright notice above in a module
my_package.my_module
, add the following to your Python package:[project.entry-points.'betty.copyright_notice'] 'my-module-my-copyright-notice' = 'my_package.my_module.MyCopyrightNotice'
See also¶
Read more about how to use copyright notices and Betty’s built-in copyright notices at Copyright notices.