[wiki-lenny/local/parser/Portail.py] modification de syntaxe pour les portails
darcs-hash:20081207190826-bd074-54c538346226023b9795162ac1c1ecf32058cfd9.gz
This commit is contained in:
parent
4fb657e4ff
commit
d29a380e65
3 changed files with 11 additions and 11 deletions
|
@ -24,9 +24,9 @@ MoinMoin - Portail parser
|
||||||
CALLING SEQUENCE:
|
CALLING SEQUENCE:
|
||||||
{{{
|
{{{
|
||||||
#!Portail
|
#!Portail
|
||||||
image1.png | title1 | description 1
|
image1.png @@ title1 @@ description 1
|
||||||
image2.png | title2 | description 2
|
image2.png @@ title2 @@ description 2
|
||||||
image3.png | title3 | description 3
|
image3.png @@ title3 @@ description 3
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
Copyright 2008 Antoine Durand-Gasselin <adg@crans.org>
|
Copyright 2008 Antoine Durand-Gasselin <adg@crans.org>
|
||||||
|
@ -56,7 +56,7 @@ class Parser:
|
||||||
entries = []
|
entries = []
|
||||||
for line in quotes:
|
for line in quotes:
|
||||||
line=line.strip()
|
line=line.strip()
|
||||||
items=line.split('|',2)
|
items=line.split('@@',2)
|
||||||
if len(items)<3:
|
if len(items)<3:
|
||||||
# Voir ce qu'on fait
|
# Voir ce qu'on fait
|
||||||
## self.request.write('<!-- error, wrong number of parameters -->')
|
## self.request.write('<!-- error, wrong number of parameters -->')
|
||||||
|
@ -79,9 +79,6 @@ class Parser:
|
||||||
body = bod_buf.getvalue()
|
body = bod_buf.getvalue()
|
||||||
self.request.redirect()
|
self.request.redirect()
|
||||||
|
|
||||||
del tit_buf
|
|
||||||
del bod_buf
|
|
||||||
|
|
||||||
# Qu'on rajoute à la liste des entrées
|
# Qu'on rajoute à la liste des entrées
|
||||||
entries += [ (( pic, title, body )) ]
|
entries += [ (( pic, title, body )) ]
|
||||||
|
|
||||||
|
|
|
@ -261,6 +261,9 @@ class FormatterBase:
|
||||||
def crans_box(self, title, content, color=None):
|
def crans_box(self, title, content, color=None):
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
|
def crans_portal(self, entries):
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
# Paragraphs, Lines, Rules ###########################################
|
# Paragraphs, Lines, Rules ###########################################
|
||||||
|
|
||||||
def linebreak(self, preformatted=1):
|
def linebreak(self, preformatted=1):
|
||||||
|
|
|
@ -25,9 +25,9 @@ MoinMoin - Portail parser
|
||||||
CALLING SEQUENCE:
|
CALLING SEQUENCE:
|
||||||
{{{
|
{{{
|
||||||
#!Portail
|
#!Portail
|
||||||
image1.png | title1 | description 1
|
image1.png @@ title1 @@ description 1
|
||||||
image2.png | title2 | description 2
|
image2.png @@ title2 @@ description 2
|
||||||
image3.png | title3 | description 3
|
image3.png @@ title3 @@ description 3
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
CREDIT
|
CREDIT
|
||||||
|
@ -118,7 +118,7 @@ class Parser:
|
||||||
# on traite les ligne une à une
|
# on traite les ligne une à une
|
||||||
for line in quotes:
|
for line in quotes:
|
||||||
line=line.strip()
|
line=line.strip()
|
||||||
items=line.split('|',2)
|
items=line.split('@@',2)
|
||||||
if items.__len__()<3:
|
if items.__len__()<3:
|
||||||
self.request.write('<!-- error, wrong number of parameters -->')
|
self.request.write('<!-- error, wrong number of parameters -->')
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue