DiskImageStore(args.out + '_images', fetcher),
lambda x: ApplyHTMLFilters(args.htmlfilters, x),
lambda x: ApplyDOMFilters(args.domfilters, x),
+ texifier,
lambda x: ApplyTexFilters(args.texfilters, x),
args.image_size,
layout,
def testProcess(self) -> None:
buf = io.BytesIO()
+ texifier = PandocTexifier('pandoc')
spec = Spec(
self.url(),
self.fetcher(),
FakeImageStore(),
lambda x: x,
lambda x: None,
+ texifier,
lambda x: x,
20,
- ContentOnlyLayout(PandocTexifier('pandoc')),
+ ContentOnlyLayout(texifier),
'margin=20mm',
buf,
lambda _: None)
FakeImageStore(),
lambda x: x,
lambda x: None,
+ texifier,
lambda x: x,
20,
ContentOnlyLayout(texifier),
paperdoorknob.process(spec)
def testPDF(self) -> None:
+ texifier = PandocTexifier('pandoc')
with open("test.tex", 'wb') as out:
spec = Spec(
self.url(),
FakeImageStore(),
lambda x: x,
lambda x: None,
+ texifier,
lambda x: x,
20,
- BesideIconLayout(PandocTexifier('pandoc')),
+ BesideIconLayout(texifier),
None,
out,
lambda _: None)
from fetch import Fetcher
from glowfic import Layout
from images import ImageStore
+from texify import Texifier
# pylint: disable=too-many-instance-attributes
images: ImageStore
htmlfilter: Callable[[bytes], bytes]
domfilter: Callable[[Tag], None]
+ texifier: Texifier
texfilter: Callable[[bytes], bytes]
icon_size: float
layout: Layout