]> git.scottworley.com Git - paperdoorknob/blame_incremental - spec.py
Allow many Spec fields
[paperdoorknob] / spec.py
... / ...
CommitLineData
1# paperdoorknob: Print glowfic
2#
3# This program is free software: you can redistribute it and/or modify it
4# under the terms of the GNU General Public License as published by the
5# Free Software Foundation, version 3.
6
7
8from dataclasses import dataclass
9
10from typing import Callable, IO
11
12from bs4.element import Tag
13
14from fetch import Fetcher
15from texify import Texifier
16
17
18# pylint: disable=too-many-instance-attributes
19@dataclass(frozen=True)
20class Spec:
21 url: str
22 fetcher: Fetcher
23 htmlfilter: Callable[[bytes], bytes]
24 domfilter: Callable[[Tag], None]
25 texifier: Texifier
26 geometry: str | None
27 texout: IO[bytes]