refactor: Rename annotation content variables

Renamed the two variables describing an annotation's highlighted PDF-text and
its appended note if any exists. Previously called 'text' (for the in-PDF
highlighted content) and 'content' (for the additional supplied content).

Now they are called 'content' for the IN PDF words, highlighted.
and 'note' for the appended note given (or not) in an annotation.
This commit is contained in:
Marty Oehme 2024-01-23 09:54:36 +01:00
parent 9169e1c98a
commit 11d570f9d8
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
2 changed files with 5 additions and 5 deletions

View file

@ -28,9 +28,9 @@ class Annotation:
file: str
colors: tuple[float, float, float] = field(default_factory=lambda: (0.0, 0.0, 0.0))
content: str = ""
note: str = ""
page: int = 0
tag: str = ""
text: str = ""
type: str = "Highlight"
minimum_similarity_color: float = 1.0
@ -43,8 +43,8 @@ class Annotation:
"""
data = {
"file": self.file,
"quote": self.text,
"note": self.content,
"quote": self.content,
"note": self.note,
"page": self.page,
"tag": self.tag,
"type": self.type,

View file

@ -41,8 +41,8 @@ class PdfExtractor:
)
a = Annotation(
file=str(filename),
text=quote or "",
content=note or "",
content=quote or "",
note=note or "",
colors=col,
type=annot.type[1],
page=(page.number or 0) + 1,