]> git.scottworley.com Git - paperdoorknob/blame - spec.py
Support _ in URLs
[paperdoorknob] / spec.py
CommitLineData
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
8from dataclasses import dataclass
9
929db576 10from typing import Callable, IO
23f31879 11
8be20b9d
SW
12from bs4.element import Tag
13
23f31879 14from fetch import Fetcher
d2a41ff4 15from glowfic import Layout
cfd0b634 16from images import ImageStore
23f31879
SW
17
18
432bb83b 19# pylint: disable=too-many-instance-attributes
23f31879
SW
20@dataclass(frozen=True)
21class Spec:
22 url: str
23 fetcher: Fetcher
cfd0b634 24 images: ImageStore
929db576 25 htmlfilter: Callable[[bytes], bytes]
8be20b9d 26 domfilter: Callable[[Tag], None]
131deef1 27 texfilter: Callable[[bytes], bytes]
d2a41ff4 28 layout: Layout
e10b5b6f 29 geometry: str | None
23f31879 30 texout: IO[bytes]
c594c8bf 31 log: Callable[[str], None]