]> git.scottworley.com Git - paperdoorknob/blobdiff - args.py
Progress indicator
[paperdoorknob] / args.py
diff --git a/args.py b/args.py
index 8f77a887547b403d311ee0939a5a423b168aa88a..384e4487b76bfb918f7316dee8604276f92e1cc5 100644 (file)
--- 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)