betty.ancestry.file_reference module - Betty documentation

Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# betty.ancestry.file_reference module

Data types to reference files on disk.

class betty.ancestry.file_reference.FileReference

  Bases: `ShorthandPluginBase`, `Entity`

  A reference between `betty.ancestry.has_file_references.HasFileReferences` and betty.ancestry.file.File.

  This reference holds additional information specific to the relationship between the two entities.

  __init__(referee: HasFileReferences & Entity | ToOneResolver[HasFileReferences & Entity], file: File | ToOneResolver[File], *, focus: FocusArea | None = None)
  file

    The referenced file.

  property focus: FocusArea | None

    The area within the 2-dimensional representation of the file to focus on.

    This can be used to locate where faces are in a photo, or a specific article in a newspaper scan, for example.

  classmethod plugin_label_plural() → Localizable

    The human-readable entity type label, plural.

  referee

    The entity that references the file.