10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-11-03 12:43:51 +01:00

Use PageRange package to interprete the \excludecolumns command in the input file (allow printer range syntax)

This commit is contained in:
Mickaël Véril 2022-01-18 15:32:11 +01:00
parent 87e3329070
commit 28181e6925
2 changed files with 5 additions and 3 deletions

View File

@ -2,6 +2,7 @@ from TexSoup import TexSoup,TexCmd
from . import formats
from .data import dataFileBase,DataType, method, state, exSet
from collections import defaultdict
from pagerange import PageRange
class dfbOptions(object):
def __init__(self):
@ -96,7 +97,7 @@ class dfbOptions(object):
for node in dfbexcludeColumnsNodes:
excludeColumns=node.expr
if type(excludeColumns) is TexCmd:
commas_string=excludeColumns.args[0].value
ints=[int(x.strip()) for x in commas_string.split(",")]
dfb_Opt.excludeColumns.update(ints)
range_string=excludeColumns.args[0].value
PageRangeParser=PageRange(range_string)
dfb_Opt.excludeColumns.update(PageRangeParser.pages)
return dfb_Opt

View File

@ -3,3 +3,4 @@ numpy>=1.18.3,<1.20
GitPython>=3.1.14
PyYAML>=5.3.1
TexSoup==0.2.1
PageRange>=0.4