Added document printing support

This commit is contained in:
Roberto Rosario
2011-05-06 00:46:33 -04:00
parent 0eca667fd4
commit c44a1f947c
14 changed files with 216 additions and 93 deletions

View File

@@ -302,3 +302,12 @@ def return_type(value):
return ','.join(list(value))
else:
return value
# http://stackoverflow.com/questions/4248399/page-range-for-printing-algorithm
def parse_range(astr):
result=set()
for part in astr.split(u','):
x=part.split(u'-')
result.update(range(int(x[0]),int(x[-1])+1))
return sorted(result)