2. • C++ How to Program 4th
• Python for Data Analysis (1st, 2nd)
• Linux System Programming 2nd
• High Performance Python
• (TLDP)
• PyCon US ( !)
: 2019.01.10 iam@younggun.kim / @scari_net 2
7. •
• PDF -> Text
• Enol PDF Converter for Word (Mac AppStore) !
• PDF to Word (Mac AppStore) !
• pdftotext - Xpdf Software Suite "
• pdfseperate "
: 2019.01.10 iam@younggun.kim / @scari_net 7
8. import os
from pdfminer.pdfparser import PDFParser
from pdfminer.pdfdocument import PDFDocument
o_tags = ['ERROR?', '< >', '< >', '< >', '< >']
e_tags = ['ERROR?', '</ >', '</ >', '</ >', '</ >']
def run(filename, maxlevel):
fp = open(filename, 'rb')
parser = PDFParser(fp)
doc = PDFDocument(parser)
outlines = doc.get_outlines()
f = None
for (level, title, dest, a, se) in outlines:
title_words = title.replace('n', '').split()
title = ' '.join(title_words)
if level == 1:
if f: f.close()
f = open(title + '.txt', 'w')
print('{}n{}n{}n'.format(o_tags[level], title, e_tags[level]))
f.write('{}n{}n{}nn'.format(o_tags[level], title, e_tags[level]))
: 2019.01.10 iam@younggun.kim / @scari_net 8