betty.ancestry.file_reference module

Data types to reference files on disk.

class betty.ancestry.file_reference.FileReference[source]

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)[source]
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[source]

The human-readable entity type label, plural.

referee

The entity that references the file.