Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
Betty documentation
Logo
Betty documentation
  • Installation
  • Usage
    • Ancestry
      • Citation
      • Dates
      • Enclosure
      • Event
      • Event Type
      • File
      • File reference
      • Gender
      • Link
      • Media Type
      • Name
      • Note
      • Person
      • Person Name
      • Place
      • Place Type
      • Presence
      • Presence Role
      • Privacy
      • Source
      • Static translations
    • Asset Management
    • The command line
    • Application configuration
    • Copyright notices
    • Environment variables
    • Extensions
      • The Cotton Candy extension
      • The Deriver extension
      • The Gramps extension
      • The HTTP API Documentation extension
      • The Maps extension
      • The Privatizer extension
      • The Raspberry Mint extension
      • The Trees extension
      • The Wikipedia extension
    • GEDCOM
    • Licenses
    • Projects
      • Project configuration
    • Templating
      • Filters
      • Globals
      • Tests
    • Translations
  • Development
    • Developing Betty itself
      • Helpful commands
      • Installing a development environment
      • Localization
      • Testing Betty’s source code
    • Event dispatching
    • Plugins
      • CLI command plugins
      • Copyright notice plugins
      • Entity type plugins
      • Event type plugins
      • Extension plugins
      • Gender plugins
      • License plugins
      • Place type plugins
      • Presence role plugins
      • Renderer plugins
      • Serialization format plugins
    • Testing your source code
  • API Documentation
  • Glossary
  • About
    • Contributing to Betty
      • Code of Conduct
    • Copyright & license
    • Sponsors
    • Versions
Back to top
View this page

Copyright notice plugins¶

Type

betty.copyright_notice.CopyrightNotice

Repository

betty.project.Project.copyright_notice_repository

Creating a copyright¶

  1. 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...
      ...
    
  2. 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.

Next
Entity type plugins
Previous
CLI command plugins
Copyright © Bart Feenstra and contributors
Made with Sphinx and @pradyunsg's Furo
On this page
  • Copyright notice plugins
    • Creating a copyright
    • See also