from domfilter import ApplyDOMFilters, DOMFilters
from fetch import CachingFetcher
from htmlfilter import ApplyHTMLFilters, HTMLFilters
+from images import ImageStore
from spec import Spec
from texify import PandocTexifier
yield Spec(
args.url,
fetcher,
+ ImageStore(args.out + '_images', fetcher),
lambda x: ApplyHTMLFilters(args.htmlfilters, x),
lambda x: ApplyDOMFilters(args.domfilters, x),
PandocTexifier(args.pandoc or 'pandoc'),
from testing.fakeserver import FakeGlowficServer
from domfilter import ApplyDOMFilters
from fetch import DirectFetcher, FakeFetcher, Fetcher
+from images import ImageStore
from spec import Spec
from texify import DirectTexifier, PandocTexifier, VerifyingTexifier
spec = Spec(
self.url(),
self.fetcher(),
+ ImageStore('is', self.fetcher()),
lambda x: x,
lambda x: ApplyDOMFilters('NoEdit,NoFooter', x),
PandocTexifier('pandoc'),
spec = Spec(
self.url(),
self.fetcher(),
+ ImageStore('is', self.fetcher()),
lambda x: x,
lambda x: ApplyDOMFilters('NoEdit,NoFooter', x),
texifier,
spec = Spec(
self.url(),
self.fetcher(),
+ ImageStore('is', self.fetcher()),
lambda x: x,
lambda x: ApplyDOMFilters('NoEdit,NoFooter', x),
PandocTexifier('pandoc'),
from fetch import Fetcher
from texify import Texifier
+from images import ImageStore
# pylint: disable=too-many-instance-attributes
class Spec:
url: str
fetcher: Fetcher
+ images: ImageStore
htmlfilter: Callable[[bytes], bytes]
domfilter: Callable[[Tag], None]
texifier: Texifier