Maybe you should git add parse.py?<div><br></div><div>Gonzalo<br><br><div class="gmail_quote">On Wed, May 23, 2012 at 1:05 PM, Manuel Kaufmann <span dir="ltr"><<a href="mailto:humitos@gmail.com" target="_blank">humitos@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Added HTML files to the bundle so this content can be opened with Browse<br>
Activity. The old dita/ditamap files are not removed because they are parsed to<br>
generate the new HTML files.<br>
<br>
Besides, the HTML generation uses these dita files to not be too aggressive<br>
with the code in this cycle. We will improve this code in the future and we<br>
will remove completely the dita generation.<br>
<br>
Signed-off-by: Manuel Kaufmann <<a href="mailto:humitos@gmail.com">humitos@gmail.com</a>><br>
---<br>
xol.py | 7 ++++++-<br>
1 file changed, 6 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/xol.py b/xol.py<br>
index b5aa1df..6b2a34f 100644<br>
--- a/xol.py<br>
+++ b/xol.py<br>
@@ -19,6 +19,7 @@ import gtk<br>
import zipfile<br>
import uuid<br>
import logging<br>
+import parse<br>
from glob import glob<br>
from gettext import gettext as _<br>
<br>
@@ -152,6 +153,8 @@ def _dita_management(zip, uid, title):<br>
'href="ditastylesheet.xsl"?>')<br>
zipstr(zip, os.path.join(uid, 'slicecontent', '%s.dita' % auid),<br>
content.prettify())<br>
+ zipstr(zip, os.path.join(uid, 'slicecontent', '%s.html' % auid),<br>
+ parse.parse_dita(content.prettify()))<br>
<br>
map.append('<topicref href="%s.dita" navtitle="%s">' % (auid, atitle))<br>
map.append('</topicref>')<br>
@@ -159,12 +162,14 @@ def _dita_management(zip, uid, title):<br>
map.append('</map>')<br>
zipstr(zip, os.path.join(uid, 'slicecontent', 'librarymap.ditamap'),<br>
"\n".join(map))<br>
+ zipstr(zip, os.path.join(uid, 'slicecontent', 'librarymap.html'),<br>
+ parse.parse_ditamap("\n".join(map)))<br>
<br>
def _index_redirect(zip, uid):<br>
"""<br>
Creates the redirecting index.html<br>
"""<br>
- redirect_loc = 'slicecontent/librarymap.ditamap'<br>
+ redirect_loc = 'slicecontent/librarymap.html'<br>
<br>
html = ['<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">',\<br>
'<html>',\<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.10<br>
<br>
_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
</font></span></blockquote></div><br></div>