Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nounous-archives
wifimap
Commits
44139361
Commit
44139361
authored
Nov 28, 2017
by
Gabriel Detraz
Browse files
Si TEST dans le commentaire, affichage map spécial
parent
1ad18c2e
Changes
3
Hide whitespace changes
Inline
Side-by-side
parse_xml.py
View file @
44139361
...
...
@@ -48,7 +48,7 @@ STATUS_URL = 'http://wifi-status.adm.crans.org/wifi-status.xml'
# Informations publiques (n'importe quel visiteur de la page peut les voir)
public_tags
=
[
'borne'
,
'hostname'
,
'uptime'
,
'lon'
,
'lat'
,
'location'
,
\
'floor'
,
'network'
,
'ssid'
,
'bssid'
,
'channel'
,
'currdate'
,
\
'monitor'
,
'pontwifi'
,
'monitor'
,
'pontwifi'
,
'test'
]
# Informations accessibles qu'aux users logués
...
...
@@ -157,7 +157,7 @@ def global_status(public=True, logged=True):
elif
public
:
allowed
=
public_tags
public_process
(
borne
,
allowed
)
return
doc
class
Raw_filter
:
...
...
@@ -242,6 +242,12 @@ class Raw_filter:
node
.
parentNode
.
appendChild
(
self
.
create_embeded_text
(
'pontwifi'
,
\
'pontwifi'
))
def
test
(
self
,
text
,
node
):
if
self
.
borne
.
get
(
'info'
,
[
None
])[
0
]:
if
'TEST'
in
self
.
borne
.
get
(
'info'
,
[
None
])[
0
].
value
:
node
.
parentNode
.
appendChild
(
self
.
create_embeded_text
(
'test'
,
\
'test'
))
def
neighborhood
(
self
,
text
,
node
):
"""Fonction moche qui parse un flux venant de iwlist pour en resortir
la liste des cellules
...
...
scripts/offline.xml
View file @
44139361
...
...
@@ -3,6 +3,7 @@
<uptime>
0
</uptime>
<editable/>
<raw
fun=
"test"
></raw>
<raw
fun=
"currdate"
></raw>
<raw
fun=
"position"
></raw>
<raw
fun=
"comments"
></raw>
...
...
scripts/status.sh
View file @
44139361
...
...
@@ -130,6 +130,7 @@ cat <<EOF
<raw fun="prise"></raw>
<raw fun="comments"></raw>
<raw fun="pontwifi"></raw>
<raw fun="test"></raw>
<editable />
$EXTRA_XML
EOF
...
...
@@ -188,6 +189,7 @@ cat <<EOF
<raw fun="prise"></raw>
<raw fun="comments"></raw>
<raw fun="pontwifi"></raw>
<raw fun="test"></raw>
<editable />
$EXTRA_XML
EOF
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment