Encodage en UTF-8 : Il reste encore beaucoup de boulot.
This commit is contained in:
parent
fc9ac609fc
commit
5fb0ee8bd5
16 changed files with 138 additions and 138 deletions
|
@ -1,7 +1,7 @@
|
|||
#! /usr/bin/env python
|
||||
# -*- encoding: iso-8859-1 -*-
|
||||
# -*- encoding: utf-8 -*-
|
||||
|
||||
# Génération d'un fichier XML indiquant le status des bornes
|
||||
# Génération d'un fichier XML indiquant le status des bornes
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
@ -16,18 +16,18 @@ def execute(macro, text):
|
|||
#os.putenv("http_proxy", "http://proxy.crans.org:3128")
|
||||
status=xml.dom.minidom.parseString(urllib2.urlopen("https://wifi.crans.org/status.xml").read())
|
||||
except:
|
||||
return f.text(u"Impossible d'accéder aux informations des bornes")
|
||||
return f.text(u"Impossible d'accéder aux informations des bornes")
|
||||
|
||||
# On récupère l'ensemble des bornes
|
||||
# On récupère l'ensemble des bornes
|
||||
bornes = status.childNodes[0]
|
||||
code = f.text(u"Mise à jour le "+bornes.getAttribute("date"))
|
||||
code = f.text(u"Mise à jour le "+bornes.getAttribute("date"))
|
||||
code += f.linebreak(0)
|
||||
|
||||
code += f.table(True, {'tablealign': 'center'})
|
||||
|
||||
code += f.table_row(True, {'rowbgcolor': '#FFFFA0'})
|
||||
for nom_col in (u"Nom", u"Hotspot", u"État", u"Localisation", u"Clients",
|
||||
u"MAC", u"Canal", u"Uptime", u"°E", u"°N"):
|
||||
for nom_col in (u"Nom", u"Hotspot", u"État", u"Localisation", u"Clients",
|
||||
u"MAC", u"Canal", u"Uptime", u"°E", u"°N"):
|
||||
code += f.table_cell(True)
|
||||
code += f.strong(True)
|
||||
code += f.text(nom_col)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue