remove pdf_pagecount()
This commit is contained in:
parent
07b3479029
commit
e006a95673
7
addindex
7
addindex
@ -41,11 +41,8 @@ def strip_irrelevant(content):
|
|||||||
result = re.sub(' +', ' ', result)
|
result = re.sub(' +', ' ', result)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
def pdf_pagecount(path):
|
|
||||||
cmd = "pdfinfo " + path + " | grep Pages | awk '{print $2}'"
|
|
||||||
stdout,stderr = subprocess.Popen(cmd,shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
|
|
||||||
result = int(stdout)
|
|
||||||
return result
|
|
||||||
def process_pdf(path):
|
def process_pdf(path):
|
||||||
result = list()
|
result = list()
|
||||||
args=["pdftotext", path, "-"]
|
args=["pdftotext", path, "-"]
|
||||||
|
Loading…
Reference in New Issue
Block a user