[wiki] on arrete de balancer du HTML

Ces macros sont appel'ees par getpagelinks. Si elles balancent n'importe
quoi lorsqu'on cherche a obtenir leurs liens, CategoriePagePublique
n'apparait pas...

darcs-hash:20090427142002-bd074-46977e63783af21b013023b46ee7e289020f28a7.gz
This commit is contained in:
Antoine Durand-Gasselin 2009-04-27 16:20:02 +02:00
parent d91a411300
commit 6b0022645d
8 changed files with 25 additions and 23 deletions

View file

@ -13,7 +13,7 @@ def image_url_for_channel(channel_name, channel_ip, small=0 ):
return BASE_IMAGE_URL + str(channel_ip) + IMAGE_SUFFIX
else:
return BASE_IMAGE_URL + str(channel_ip) + SMALL_IMAGE_SUFFIX
def get_channel_list():
import urllib
# Getsap file from web sever.
@ -21,9 +21,9 @@ def get_channel_list():
# Read it.
s = f.read()
f.close()
s = s.split("\n")
channel_list = []
for a_line in s:
try:
@ -39,7 +39,7 @@ def get_channel_list():
except:
pass
return channel_list
def execute(macro, args):
opt = {"col":4,"cat":False,"ch":False, "width":"10em"}
@ -50,7 +50,7 @@ def execute(macro, args):
opt[name] = value
except:
pass
IMAGES_PER_LINE = int(opt["col"])
CATHEGORY = opt["cat"]
CHANNEL = opt["ch"]
@ -67,7 +67,7 @@ def execute(macro, args):
if a_channel["name"].find(CHANNEL)<0:
continue
if i == 0:
text+= macro.formatter.table_row(1)
text+= macro.formatter.table_row(1)
text+= macro.formatter.table_cell(1, {'style':'text-align:center;'})
text+= macro.formatter.strong( 1 )
text+= macro.formatter.text( a_channel["name"] )
@ -89,5 +89,3 @@ def execute(macro, args):
i += 1
text+= macro.formatter.table(0)
return text