Skip to content

Commit

Permalink
added progress info to tika
Browse files Browse the repository at this point in the history
  • Loading branch information
cehbrecht committed Jul 14, 2015
1 parent 44f905f commit ac64d2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion processes/wps_tika.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ def execute(self):
from tika import parser

metadata = []
for resource in resources:
for counter, resource in enumerate(resources):
parsed = parser.from_file(resource)
metadata.append( parsed["metadata"] )
progress = int( counter * 100.0 / len(resources) )
self.show_status("parsing {0}/{1}".format(counter, len(resources)), progress)

import json
out_filename = self.mktempfile(suffix='.json')
Expand Down

0 comments on commit ac64d2f

Please sign in to comment.