From 4eae4efc77d16b8ae71e238a4a2e5229823187e5 Mon Sep 17 00:00:00 2001 From: cmdln Date: Sun, 26 Sep 2010 17:08:45 -0400 Subject: [PATCH] Giving up on BS. --- export_notes.py | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100755 export_notes.py diff --git a/export_notes.py b/export_notes.py deleted file mode 100755 index 1e053f6..0000000 --- a/export_notes.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/python -import gzip -from BeautifulSoup import BeautifulStoneSoup -import sys - - - -def __main(oo_file): - g = open(oo_file) - o = open('output.xml', 'w') - try: - soup = BeautifulStoneSoup(g) - count = 0 - for item in soup.outline.root: - if item.parent != soup.outline.root: - continue - count = count + 1 - print count - finally: - g.close() - o.close() - - -if __name__ == "__main__": - __main(sys.argv[1])