Browse Source

des squelettes pour récupérer les données de stats.spip.org en json

svn/root
brunobergot@gmail.com 10 years ago
parent
commit
572ba35da6
4 changed files with 218 additions and 0 deletions
  1. +3
    -0
      .gitattributes
  2. +136
    -0
      json/stats-tout.html
  3. +77
    -0
      json/stats-v.html
  4. +2
    -0
      stats.json.html

+ 3
- 0
.gitattributes View File

@ -27,10 +27,13 @@ inc/univers.php -text
inc/univers_analyser.php -text
javascript/treemap.js -text
javascript/version.tree.js -text
json/stats-tout.html -text
json/stats-v.html -text
/plugin.xml -text
/saturn.png -text
/stats-tout.html -text
/stats-v.html -text
/stats.html -text
/stats.json.html -text
/stats.png -text
/univers_pipelines.php -text

+ 136
- 0
json/stats-tout.html View File

@ -0,0 +1,136 @@
#SET{total,0}
{<B_sitesspip>
"total_sites": "#GRAND_TOTAL",
"versions": [
<BOUCLE_sitesspip(WEBSITES){statut=publie}{pagination 1}>
<BOUCLE_v22(WEBSITES){statut=publie}{spip LIKE '2.2%'} />{
"version" : "2.2",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#_sitesspip:GRAND_TOTAL}|round{1})]"
},#SET{total,#GET{total}|plus{#TOTAL_BOUCLE}}<//B_v22>
<BOUCLE_v21(WEBSITES){statut=publie}{spip LIKE '2.1%'} />{
"version" : "2.1",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#_sitesspip:GRAND_TOTAL}|round{1})]"
},#SET{total,#GET{total}|plus{#TOTAL_BOUCLE}}<//B_v21>
<BOUCLE_v20(WEBSITES){statut=publie}{spip LIKE '2.0%'} />{
"version" : "2.0",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#_sitesspip:GRAND_TOTAL}|round{1})]"
},#SET{total,#GET{total}|plus{#TOTAL_BOUCLE}}<//B_v20>
<BOUCLE_v193(WEBSITES){statut=publie}{spip LIKE '1.9.3%'} />{
"version" : "1.9.3",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#_sitesspip:GRAND_TOTAL}|round{1})]"
},#SET{total,#GET{total}|plus{#TOTAL_BOUCLE}}<//B_v193>
<BOUCLE_v192(WEBSITES){statut=publie}{spip LIKE '1.9.2%'}{doublons} />{
"version" : "1.9.2",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#_sitesspip:GRAND_TOTAL}|round{1})]"
},#SET{total,#GET{total}|plus{#TOTAL_BOUCLE}}<//B_v192>
<BOUCLE_v191(WEBSITES){statut=publie}{spip LIKE '1.9.1%'}{doublons} />{
"version" : "1.9.2",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#_sitesspip:GRAND_TOTAL}|round{1})]"
},#SET{total,#GET{total}|plus{#TOTAL_BOUCLE}}<//B_v191>
<BOUCLE_v19(WEBSITES){statut=publie}{spip LIKE '1.9%'}{doublons} />{
"version" : "1.9",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#_sitesspip:GRAND_TOTAL}|round{1})]"
},#SET{total,#GET{total}|plus{#TOTAL_BOUCLE}}<//B_v19>
<BOUCLE_v183(WEBSITES){statut=publie}{spip LIKE '1.8.3%'} />{
"version" : "1.8.3",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#_sitesspip:GRAND_TOTAL}|round{1})]"
},#SET{total,#GET{total}|plus{#TOTAL_BOUCLE}}<//B_v183>
<BOUCLE_v182(WEBSITES){statut=publie}{spip LIKE '1.8.2%'} />{
"version" : "1.8.2",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#_sitesspip:GRAND_TOTAL}|round{1})]"
},#SET{total,#GET{total}|plus{#TOTAL_BOUCLE}}<//B_v182>
<BOUCLE_v181(WEBSITES){statut=publie}{spip LIKE '1.8.1%'} />{
"version" : "1.8.1",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#_sitesspip:GRAND_TOTAL}|round{1})]"
},#SET{total,#GET{total}|plus{#TOTAL_BOUCLE}}<//B_v181>
<BOUCLE_v180(WEBSITES){statut=publie}{spip LIKE '1.8.0%'} />{
"version" : "1.8.0",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#_sitesspip:GRAND_TOTAL}|round{1})]"
},#SET{total,#GET{total}|plus{#TOTAL_BOUCLE}}<//B_v180>
<BOUCLE_vold(WEBSITES){statut=publie}{spip LIKE '<1.8%'} />{
"version" : "<1.8.0",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#_sitesspip:GRAND_TOTAL}|round{1})]"
},<//B_vold>
<BOUCLE_vinc(WEBSITES){statut=publie}{spip='?'} />{
"version" : "?",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#_sitesspip:GRAND_TOTAL}|round{1})]"
}<//B_vinc>
</BOUCLE_sitesspip>
],</B_sitesspip><B_hasplug>
"nombre_plugins": [
<BOUCLE_hasplug(WEBSITES){fusion plugins}{compte plugins}{!par compte_plugins}{plugins>=1}{statut=publie}{","}>{
"plugins" : "#PLUGINS",
"sites" : "#COMPTE{plugins}",
"pourcentage": "[(#COMPTE{plugins}|mult{100}|div{#GET{total}}|round{1})%]"
}</BOUCLE_hasplug>
],</B_hasplug><B_plugins>
"plugins": [
<BOUCLE_plugins(websites_plugins){fusion plugin}{!par compte_plugin}{compte plugin}{","}>{
"nom" : "#CHAMP_SQL{plugin}",
"sites" : "#COMPTE{plugin}",
"pourcentage": "[(#COMPTE{plugin}|mult{100}|div{#GET{total}}|round{1})%]"
}</BOUCLE_plugins>
],</B_plugins><B_pays>
"pays": [
<BOUCLE_pays(websites){fusion pays}{!par compte_pays}{compte pays}{statut=publie}{","}>{
"nom" : "#PAYS",
"sites" : "#COMPTE{pays}",
"pourcentage": "[(#COMPTE{pays}|mult{100}|div{#GET{total}}|round{1})%]"
}</BOUCLE_pays>
],</B_pays>
"php": [
<BOUCLE_v40(WEBSITES){statut=publie}{php LIKE '4.0%'} />{
"version" : "4.0",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#GET{total}}|round{1})%]"
},<//B_v40>
<BOUCLE_v41(WEBSITES){statut=publie}{php LIKE '4.1%'} />{
"version" : "4.1",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#GET{total}}|round{1})%]"
},<//B_v41>
<BOUCLE_v42(WEBSITES){statut=publie}{php LIKE '4.2%'} />{
"version" : "4.2",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#GET{total}}|round{1})%]"
},<//B_v42>
<BOUCLE_v43(WEBSITES){statut=publie}{php LIKE '4.3%'} />{
"version" : "4.3",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#GET{total}}|round{1})%]"
},<//B_v43>
<BOUCLE_v50(WEBSITES){statut=publie}{php LIKE '5.0%'} />{
"version" : "5.0",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#GET{total}}|round{1})%]"
},<//B_v50>
<BOUCLE_v51(WEBSITES){statut=publie}{php LIKE '5.1%'} />{
"version" : "5.1",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#GET{total}}|round{1})%]"
},<//B_v51>
<BOUCLE_v52(WEBSITES){statut=publie}{php LIKE '5.2%'} />{
"version" : "5.2",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#GET{total}}|round{1})%]"
},<//B_v52>
<BOUCLE_v53(WEBSITES){statut=publie}{php LIKE '5.3%'} />{
"version" : "5.3",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#GET{total}}|round{1})%]"
}<//B_v53>
]
}

+ 77
- 0
json/stats-v.html View File

@ -0,0 +1,77 @@
#SET{total,0}
#SET{likev,#ENV{v}|concat{%}}
<BOUCLE_compte(WEBSITES){spip like #GET{likev}}{statut=publie} />#SET{total,#TOTAL_BOUCLE}<//B_compte>
{
"total_sites": "#GET{total}",
"version": "#ENV{v}",<B_sitesspip>
"versions": [
<BOUCLE_sitesspip(WEBSITES){spip like #GET{likev}}{statut=publie}{fusion spip}{compte spip}{!par compte_spip}{","}>{
"version" : "#SPIP",
"sites" : "#COMPTE{spip}",
"pourcentage": "[(#COMPTE{spip}|mult{100}|div{#GET{total}}|round{1})%]"
}</BOUCLE_sitesspip>
],</B_sitesspip><B_hasplug>
"nombre_plugins": [
<BOUCLE_hasplug(WEBSITES){spip like #GET{likev}}{fusion plugins}{compte plugins}{!par compte_plugins}{plugins>=1}{statut=publie}{","}>{
"plugins" : "#PLUGINS",
"sites" : "#COMPTE{plugins}",
"pourcentage": "[(#COMPTE{plugins}|mult{100}|div{#GET{total}}|round{1})%]"
}</BOUCLE_hasplug>
],</B_hasplug><B_plugins>
"plugins": [
<BOUCLE_plugins(websites_plugins websites){websites.spip like #GET{likev}}{fusion plugin}{!par compte_plugin}{compte plugin}{","}>{
"nom" : "#CHAMP_SQL{plugin}",
"sites" : "#COMPTE{plugin}",
"pourcentage": "[(#COMPTE{plugin}|mult{100}|div{#GET{total}}|round{1})%]"
}</BOUCLE_plugins>
],</B_plugins><B_pays>
"pays": [
<BOUCLE_pays(websites){spip like #GET{likev}}{fusion pays}{!par compte_pays}{compte pays}{statut=publie}{","}>{
"nom" : "#PAYS",
"sites" : "#COMPTE{pays}",
"pourcentage": "[(#COMPTE{pays}|mult{100}|div{#GET{total}}|round{1})%]"
}</BOUCLE_pays>
],</B_pays>
"php": [
<BOUCLE_v40(WEBSITES){spip like #GET{likev}}{statut=publie}{php LIKE '4.0%'} />{
"version" : "4.0",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#GET{total}}|round{1})%]"
},<//B_v40>
<BOUCLE_v41(WEBSITES){spip like #GET{likev}}{statut=publie}{php LIKE '4.1%'} />{
"version" : "4.1",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#GET{total}}|round{1})%]"
},<//B_v41>
<BOUCLE_v42(WEBSITES){spip like #GET{likev}}{statut=publie}{php LIKE '4.2%'} />{
"version" : "4.2",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#GET{total}}|round{1})%]"
},<//B_v42>
<BOUCLE_v43(WEBSITES){spip like #GET{likev}}{statut=publie}{php LIKE '4.3%'} />{
"version" : "4.3",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#GET{total}}|round{1})%]"
},<//B_v43>
<BOUCLE_v50(WEBSITES){spip like #GET{likev}}{statut=publie}{php LIKE '5.0%'} />{
"version" : "5.0",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#GET{total}}|round{1})%]"
},<//B_v50>
<BOUCLE_v51(WEBSITES){spip like #GET{likev}}{statut=publie}{php LIKE '5.1%'} />{
"version" : "5.1",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#GET{total}}|round{1})%]"
},<//B_v51>
<BOUCLE_v52(WEBSITES){spip like #GET{likev}}{statut=publie}{php LIKE '5.2%'} />{
"version" : "5.2",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#GET{total}}|round{1})%]"
},<//B_v52>
<BOUCLE_v53(WEBSITES){spip like #GET{likev}}{statut=publie}{php LIKE '5.3%'} />{
"version" : "5.3",
"sites" : "#TOTAL_BOUCLE",
"pourcentage": "[(#TOTAL_BOUCLE|mult{100}|div{#GET{total}}|round{1})%]"
}<//B_v53>
]
}

+ 2
- 0
stats.json.html View File

@ -0,0 +1,2 @@
#HTTP_HEADER{Content-Type: text/plain; charset=#CHARSET}
[(#ENV{v}|?{#INCLURE{fond=json/stats-v,v=#ENV{v}},#INCLURE{fond=json/stats-tout}})]

Loading…
Cancel
Save