diff options
author | Jan Holesovsky <kendy@suse.cz> | 2010-11-05 15:51:55 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2010-11-05 15:51:55 +0100 |
commit | 520121f9cfc67e5fe3a24e8fae1a9c78bb22c8b7 (patch) | |
tree | baadb8c1ca2faa6496794831911440bb8f2e4480 /helpcontent2/to-wiki/getalltitles.py | |
parent | 31c7e54ff143053c8cdc791a0e9328841a70d194 (diff) |
Skip pages without a title.
Diffstat (limited to 'helpcontent2/to-wiki/getalltitles.py')
-rwxr-xr-x | helpcontent2/to-wiki/getalltitles.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/helpcontent2/to-wiki/getalltitles.py b/helpcontent2/to-wiki/getalltitles.py index 50ca03dc7d..793465f2fc 100755 --- a/helpcontent2/to-wiki/getalltitles.py +++ b/helpcontent2/to-wiki/getalltitles.py @@ -75,7 +75,7 @@ def end_element(name): if not parsing: return if name == 'title': - parsign = False + parsing = False istitle = False def char_data(data): @@ -95,11 +95,13 @@ def parsexhp(filename): buf = file.read() p.Parse(buf) file.close() - title=get_module(filename)+"/"+title - title = title.replace(" ","_") - title = make_unique(title) - alltitles.append(title) - print filename+";"+title + if len(title): + title=get_module(filename)+"/"+title + title = title.replace(" ","_") + title = make_unique(title) + alltitles.append(title) + print filename+";"+title + title="" if len(sys.argv) < 2: print "getalltitles.py <directory>" |