From d29a380e658df8e295b7e17263a8a985642e3acb Mon Sep 17 00:00:00 2001 From: Antoine Durand-Gasselin Date: Sun, 7 Dec 2008 20:08:26 +0100 Subject: [PATCH] [wiki-lenny/local/parser/Portail.py] modification de syntaxe pour les portails darcs-hash:20081207190826-bd074-54c538346226023b9795162ac1c1ecf32058cfd9.gz --- wiki-lenny/local/parser/Portail.py | 11 ++++------- wiki-lenny/share/formatter.__init__.py | 3 +++ wiki/parser/Portail.py | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/wiki-lenny/local/parser/Portail.py b/wiki-lenny/local/parser/Portail.py index 1832fee7..3ec31583 100644 --- a/wiki-lenny/local/parser/Portail.py +++ b/wiki-lenny/local/parser/Portail.py @@ -24,9 +24,9 @@ MoinMoin - Portail parser CALLING SEQUENCE: {{{ #!Portail - image1.png | title1 | description 1 - image2.png | title2 | description 2 - image3.png | title3 | description 3 + image1.png @@ title1 @@ description 1 + image2.png @@ title2 @@ description 2 + image3.png @@ title3 @@ description 3 }}} Copyright 2008 Antoine Durand-Gasselin @@ -56,7 +56,7 @@ class Parser: entries = [] for line in quotes: line=line.strip() - items=line.split('|',2) + items=line.split('@@',2) if len(items)<3: # Voir ce qu'on fait ## self.request.write('') @@ -79,9 +79,6 @@ class Parser: body = bod_buf.getvalue() self.request.redirect() - del tit_buf - del bod_buf - # Qu'on rajoute à la liste des entrées entries += [ (( pic, title, body )) ] diff --git a/wiki-lenny/share/formatter.__init__.py b/wiki-lenny/share/formatter.__init__.py index e8f85a14..aa06ebe4 100644 --- a/wiki-lenny/share/formatter.__init__.py +++ b/wiki-lenny/share/formatter.__init__.py @@ -261,6 +261,9 @@ class FormatterBase: def crans_box(self, title, content, color=None): raise NotImplementedError + def crans_portal(self, entries): + raise NotImplementedError + # Paragraphs, Lines, Rules ########################################### def linebreak(self, preformatted=1): diff --git a/wiki/parser/Portail.py b/wiki/parser/Portail.py index 2c3b781e..31d69677 100644 --- a/wiki/parser/Portail.py +++ b/wiki/parser/Portail.py @@ -25,9 +25,9 @@ MoinMoin - Portail parser CALLING SEQUENCE: {{{ #!Portail - image1.png | title1 | description 1 - image2.png | title2 | description 2 - image3.png | title3 | description 3 + image1.png @@ title1 @@ description 1 + image2.png @@ title2 @@ description 2 + image3.png @@ title3 @@ description 3 }}} CREDIT @@ -118,7 +118,7 @@ class Parser: # on traite les ligne une à une for line in quotes: line=line.strip() - items=line.split('|',2) + items=line.split('@@',2) if items.__len__()<3: self.request.write('') else: