]>
Commit | Line | Data |
---|---|---|
23f31879 SW |
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 | ||
8 | from dataclasses import dataclass | |
9 | ||
929db576 | 10 | from typing import Callable, IO |
23f31879 | 11 | |
8be20b9d SW |
12 | from bs4.element import Tag |
13 | ||
23f31879 | 14 | from fetch import Fetcher |
d2a41ff4 | 15 | from glowfic import Layout |
cfd0b634 | 16 | from images import ImageStore |
bbfe8e52 | 17 | from texify import Texifier |
23f31879 SW |
18 | |
19 | ||
432bb83b | 20 | # pylint: disable=too-many-instance-attributes |
23f31879 SW |
21 | @dataclass(frozen=True) |
22 | class Spec: | |
23 | url: str | |
24 | fetcher: Fetcher | |
cfd0b634 | 25 | images: ImageStore |
929db576 | 26 | htmlfilter: Callable[[bytes], bytes] |
8be20b9d | 27 | domfilter: Callable[[Tag], None] |
bbfe8e52 | 28 | texifier: Texifier |
131deef1 | 29 | texfilter: Callable[[bytes], bytes] |
9afdb32a | 30 | icon_size: float |
d2a41ff4 | 31 | layout: Layout |
e10b5b6f | 32 | geometry: str | None |
23f31879 | 33 | texout: IO[bytes] |
c594c8bf | 34 | log: Callable[[str], None] |