Skip to content

Commit

Permalink
update MI to work with latest version of PdfMiner
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejs committed Jan 4, 2010
1 parent 5709845 commit 4c6c304
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/mi/get_legislation.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter, process_pdf
from pdfminer.pdfdevice import PDFDevice
from pdfminer.converter import TextConverter
from pdfminer.cmap import CMapDB, find_cmap_path
from pdfminer.cmapdb import CMapDB
from pdfminer.layout import LAParams

from StringIO import StringIO
Expand Down Expand Up @@ -97,7 +97,7 @@ def fetch_past_legislator(self, year, chamber, url, name):

# UGH! What a useful yet convoluted library.
outtext = StringIO()
rsrc = PDFResourceManager(CMapDB(find_cmap_path()))
rsrc = PDFResourceManager(CMapDB())
device = TextConverter(rsrc, outtext, codec='ascii', laparams=LAParams())
process_pdf(rsrc, device, StringIO(the_pdf), set())
outtext.seek(0)
Expand Down Expand Up @@ -392,4 +392,4 @@ def parse_name(self, name):

return (first_name, middle_name, last_name, suffix)
if __name__ == '__main__':
MichiganScraper().run()
MichiganScraper.run()

0 comments on commit 4c6c304

Please sign in to comment.