papis-extract/papis_extract/exporter.py

29 lines
601 B
Python
Raw Normal View History

from dataclasses import dataclass
from typing import Protocol
2023-08-28 08:28:06 +00:00
import papis.api
import papis.commands.edit
2023-08-28 08:28:06 +00:00
import papis.config
import papis.document
import papis.git
import papis.logging
import papis.notes
2023-08-28 08:28:06 +00:00
from papis_extract.annotation import Annotation
from papis_extract.formatter import Formatter
2023-08-28 08:28:06 +00:00
logger = papis.logging.get_logger(__name__)
@dataclass
class Exporter(Protocol):
formatter: Formatter
edit: bool = False
git: bool = False
force: bool = False
2023-08-28 08:28:06 +00:00
def run(
self, annot_docs: list[tuple[papis.document.Document, list[Annotation]]]
) -> None:
...