mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-26 06:14:38 +01:00
Use PageRange package to interprete the \excludecolumns command in the input file (allow printer range syntax)
This commit is contained in:
parent
87e3329070
commit
28181e6925
@ -2,6 +2,7 @@ from TexSoup import TexSoup,TexCmd
|
|||||||
from . import formats
|
from . import formats
|
||||||
from .data import dataFileBase,DataType, method, state, exSet
|
from .data import dataFileBase,DataType, method, state, exSet
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
from pagerange import PageRange
|
||||||
|
|
||||||
class dfbOptions(object):
|
class dfbOptions(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -96,7 +97,7 @@ class dfbOptions(object):
|
|||||||
for node in dfbexcludeColumnsNodes:
|
for node in dfbexcludeColumnsNodes:
|
||||||
excludeColumns=node.expr
|
excludeColumns=node.expr
|
||||||
if type(excludeColumns) is TexCmd:
|
if type(excludeColumns) is TexCmd:
|
||||||
commas_string=excludeColumns.args[0].value
|
range_string=excludeColumns.args[0].value
|
||||||
ints=[int(x.strip()) for x in commas_string.split(",")]
|
PageRangeParser=PageRange(range_string)
|
||||||
dfb_Opt.excludeColumns.update(ints)
|
dfb_Opt.excludeColumns.update(PageRangeParser.pages)
|
||||||
return dfb_Opt
|
return dfb_Opt
|
@ -3,3 +3,4 @@ numpy>=1.18.3,<1.20
|
|||||||
GitPython>=3.1.14
|
GitPython>=3.1.14
|
||||||
PyYAML>=5.3.1
|
PyYAML>=5.3.1
|
||||||
TexSoup==0.2.1
|
TexSoup==0.2.1
|
||||||
|
PageRange>=0.4
|
Loading…
Reference in New Issue
Block a user