Commit 81d887c8 authored by Amos Latteier's avatar Amos Latteier

STX topics now sniff their title from the first line of the file.

parent 2d91997e
...@@ -317,7 +317,8 @@ class ProductContext: ...@@ -317,7 +317,8 @@ class ProductContext:
ht=HelpTopic.TextTopic(file, '', os.path.join(path,file)) ht=HelpTopic.TextTopic(file, '', os.path.join(path,file))
self.registerHelpTopic(file, ht) self.registerHelpTopic(file, ht)
elif ext in ('.stx', '.txt'): elif ext in ('.stx', '.txt'):
ht=HelpTopic.STXTopic(file, '', os.path.join(path, file)) title=string.split(open(os.path.join(path,file),'rb').readline(), ':')[0]
ht=HelpTopic.STXTopic(file, title, os.path.join(path, file))
self.registerHelpTopic(file, ht) self.registerHelpTopic(file, ht)
elif ext in ('.jpg', '.gif', '.png'): elif ext in ('.jpg', '.gif', '.png'):
ht=HelpTopic.ImageTopic(file, '', os.path.join(path, file)) ht=HelpTopic.ImageTopic(file, '', os.path.join(path, file))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment