X-Git-Url: http://git.scottworley.com/paperdoorknob/blobdiff_plain/f75c16294c01dc2bdbe867e4477c2073c10680a8..87fb552dd37301bc0834afc09aa99cadd6310b98:/args.py diff --git a/args.py b/args.py index 8f77a88..384e448 100644 --- a/args.py +++ b/args.py @@ -17,6 +17,7 @@ from domfilter import ApplyDOMFilters, DOMFilters from fetch import CachingFetcher from glowfic import BesideIconLayout, BelowIconLayout, Layout from htmlfilter import ApplyHTMLFilters, HTMLFilters +from texfilter import ApplyTexFilters, TexFilters from images import DiskImageStore from spec import Spec from texify import PandocTexifier @@ -59,6 +60,10 @@ See https://faculty.bard.edu/bloch/geometry.pdf for details '(eg: "%(default)s" produces %(default)s.tex, %(default)s.pdf, etc.)', default='book') parser.add_argument('--pandoc', help='Location of the pandoc executable') + parser.add_argument( + '--texfilters', + help='Which TeX filters to use (default: %(default)s)', + default=','.join(f[0] for f in TexFilters)) parser.add_argument( '--timeout', help='How long to wait for HTTP requests, in seconds', @@ -88,6 +93,7 @@ def spec_from_commandline_args() -> Iterator[Spec]: DiskImageStore(args.out + '_images', fetcher), lambda x: ApplyHTMLFilters(args.htmlfilters, x), lambda x: ApplyDOMFilters(args.domfilters, x), + lambda x: ApplyTexFilters(args.texfilters, x), layout, args.geometry, texout)