Import html
This commit is contained in:
parent
cb847ea893
commit
be7b4bbc95
20
import/importjargon.py
Normal file
20
import/importjargon.py
Normal file
@ -0,0 +1,20 @@
|
||||
import os
|
||||
import HTMLParser
|
||||
|
||||
def jargonReadFile(filename):
|
||||
inFile = open(filename)
|
||||
buffer = ""
|
||||
for line in inFile:
|
||||
buffer = buffer + line
|
||||
parser = HTMLParser.HTMLParser()
|
||||
parser.feed(buffer)
|
||||
|
||||
def jargonImport(rootDir):
|
||||
for dirName, subdirList, fileList in os.walk(rootDir):
|
||||
print('Found directory: %s' % dirName)
|
||||
for filename in fileList:
|
||||
print('\t%s' % filename)
|
||||
jargonReadFile(dirName + '/' + filename)
|
||||
|
||||
if __name__ == "__main__":
|
||||
jargonImport('original')
|
Loading…
Reference in New Issue
Block a user