[Libreoffice-commits] .: to-wiki/wikiconv2.py

2012-11-30 Thread Libreoffice Gerrit user
 to-wiki/wikiconv2.py |9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 2fe3e715144881d57cce1d8aac7e0ca9c72c9bc8
Author: Andras Timar 
Date:   Fri Nov 30 22:56:10 2012 +0100

tweaks in order to parse LibreLogo help (not perfect)

Change-Id: I4e75d485ad5f663b9ed68f3504a43280ba56b965

diff --git a/to-wiki/wikiconv2.py b/to-wiki/wikiconv2.py
index 3e0e159..5b68912 100755
--- a/to-wiki/wikiconv2.py
+++ b/to-wiki/wikiconv2.py
@@ -36,6 +36,7 @@ replace_paragraph_role = \
   'head1': '= ', # used only in one file, probably in error?
   'head2': '== ', # used only in one file, probably in error?
   'listitem': '',
+  'logocode': '',
   'note': '{{Note|',
   'null': '', # special paragraph for Variable, CaseInline, etc.
   'paragraph': '',
@@ -65,6 +66,7 @@ replace_paragraph_role = \
 'head1': ' =\n\n', # used only in one file, probably in error?
 'head2': ' ==\n\n', # used only in one file, probably in error?
 'listitem': '',
+'logocode': '\n\n',
 'note': '}}\n\n',
 'null': '', # special paragraph for Variable, CaseInline, etc.
 'paragraph': '\n\n',
@@ -94,6 +96,7 @@ replace_paragraph_role = \
   'head1': False,
   'head2': False,
   'listitem': False,
+  'logocode': False,
   'note': True,
   'null': False,
   'paragraph': False,
@@ -571,6 +574,8 @@ class ListItem(ElementBase):
 self.embed_href(parser, fname, id)
 elif name == 'paragraph':
 parser.parse_localized_paragraph(ListItemParagraph(attrs, self), 
attrs, self)
+elif name == 'list':
+self.parse_child(List(attrs, self))
 else:
 self.unhandled_element(parser, name)
 
@@ -1051,7 +1056,7 @@ class Paragraph(ElementBase):
 
 # the text itself
 children = ElementBase.get_all(self)
-if self.role != 'emph' and self.role != 'bascode':
+if self.role != 'emph' and self.role != 'bascode' and self.role != 
'logocode':
 children = children.strip()
 
 if len(children) == 0:
@@ -1143,6 +1148,8 @@ class TableContentParagraph(Paragraph):
 self.role = 'tablecontentcode'
 elif self.role == 'bascode':
 self.role = 'tablecontentcode'
+elif self.role == 'logocode':
+self.role = 'tablecontentcode'
 else:
 self.role = 'tablecontent'
 if self.role == 'tablehead':
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] .: to-wiki/wikiconv2.py

2012-11-24 Thread Libreoffice Gerrit user
 to-wiki/wikiconv2.py |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 31b8a30979690acf6372ef4be7f30f3c4a455325
Author: Andras Timar 
Date:   Sat Nov 24 18:44:33 2012 +0100

fdo#55660 Mediawiki will not parse  after this

Change-Id: I1ee2b7d617841d1664df560c5960f79c39f8129e

diff --git a/to-wiki/wikiconv2.py b/to-wiki/wikiconv2.py
index 762484d..3e0e159 100755
--- a/to-wiki/wikiconv2.py
+++ b/to-wiki/wikiconv2.py
@@ -118,7 +118,8 @@ section_id_mapping = \
 replace_text_list = \
 [["$[officename]", "{{ProductName}}"],
  ["%PRODUCTNAME", "{{ProductName}}"],
- ["$PRODUCTNAME", "{{ProductName}}"]
+ ["$PRODUCTNAME", "{{ProductName}}"],
+ ["font size", u"\u200dfont size"]
 ]
 
 def get_link_filename(link, name):
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits