<div dir="ltr">Et si l'on se base sur un générateur avec :<div>Jour ouvrable (ou autre possibilité jour ouvré)</div><div>sauf:</div><div> - jour férié sauf jour de solidarité</div><div>plus exceptionnellement: Dimanche période de solde et marché de noël</div><div><br></div><div>Histoire de faire simple ? ;-)</div></div><div class="gmail_extra"><br><div class="gmail_quote">Le 11 octobre 2014 22:03, Yves Pratter <span dir="ltr"><<a href="mailto:yves.pratter@gmail.com" target="_blank">yves.pratter@gmail.com</a>></span> a écrit :<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br>Le 11 oct. 2014 à 13:32, Frédéric Rodrigo <<a href="mailto:fred.rodrigo@gmail.com" target="_blank">fred.rodrigo@gmail.com</a>> a écrit :<span class=""><br><br><blockquote type="cite">Comme déjà dit je pense que l'on ne peut que accorder qu'un confiance limité en ça.<br></blockquote></span>Brice a précisé que ça ne marche pas pour tous les cas, un certains nombre <span style="font-size:11px">— </span>combien exactement 1%, 10%, 90% ? —seront incomplètes, mais pas erronées ?<div>Sur cette liste il y a d’un côté — des « perfectionnistes » qui veulent des donnée fiables à 100%, maintenables et utiles — et de l’autres, des personnes qui préfèrent des données moins fiables et leur ’amélioration itérative, plutôt qu’une carte blanche.</div><div><br></div><div><div><span class=""><blockquote type="cite">Ça produit un tag osm opening_hours,</blockquote></span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);color:rgb(223,80,0)">"opening_hours"</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">:</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)"> </span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);font-weight:bold">lambda</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)"> </span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">res</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">:</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)"> </span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);color:rgb(223,80,0)">"24/7"</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)"> </span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);font-weight:bold">if</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)"> </span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">res</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">[</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);color:rgb(223,80,0)">"debut"</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">]</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)"> </span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);font-weight:bold">!=</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)"> </span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);color:rgb(223,80,0)">""</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)"> </span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);font-weight:bold">and</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)"> </span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">res</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">[</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);color:rgb(223,80,0)">"debut"</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">]</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)"> </span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);font-weight:bold">==</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)"> </span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">res</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">[</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);color:rgb(223,80,0)">"fin"</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">]</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)"> </span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);font-weight:bold">and</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)"> </span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">res</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">[</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);color:rgb(223,80,0)">"saufjour"</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">]</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)"> </span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);font-weight:bold">==</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)"> </span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);color:rgb(223,80,0)">""</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)"> </span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);font-weight:bold">else</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)"> </span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);color:rgb(153,153,153)">None</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">,</span></div><div><br></div><div>Si je comprends bien le code source, ça produit opening_hours="24/7" uniquement si début=fin est que saufjour est vide.</div><div>Dans les autres cas, l’attribut opening_hours n’est pas exporté ?</div><div><span class=""><br><div><br></div><blockquote type="cite">c'est con son format : <a href="http://wiki.openstreetmap.org/wiki/Key:opening_hours" target="_blank">http://wiki.openstreetmap.org/wiki/Key:opening_hours</a></blockquote></span>Je ne comprends pas ce que tu veux dire ?</div><div>con : simple ?</div><div><br></div><div>Ce format est en fait une grammaire qui permet de gérer tous les cas. Simple dans les cas triviaux, mais complexe dans certains cas.</div><div><br>Voici un traitement simple qui fonctionne dans tous les cas (je ne connais pas python) :</div><div><ol><li>remplacer <font face="Courier New">‘;'</font> par <font face="Courier New">‘,'</font> dans <span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">res</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">[</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);color:rgb(223,80,0)">'saufjour’</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">]</span></li><li><span style="background-color:rgb(255,255,255)">remplacer [‘Lundi’,’Mardi’,’Mercredi’,’Jeudi’,’Vendredi’,’Samedi’,’Dimanche’] par </span><span style="background-color:rgb(255,255,255)">[‘Lundi’,’Mardi’,’Mercredi’,’Jeudi’,’Vendredi’,’Samedi’,’Dimanche’] dans </span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">res</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">[</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);color:rgb(223,80,0)">‘saufjour'</span><span style="background-color:rgb(255,255,255);white-space:pre-wrap;line-height:18px;font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;color:rgb(51,51,51)">]
<span style="color:rgb(0,0,0);font-family:Helvetica;line-height:normal;white-space:normal">note : Je ne sais pas coder les étapes 1 et 2 en python<br><br></span></span></li></ol><ol><li><span style="background-color:rgb(255,255,255)">renvoyer la concaténation du tout :<br>'</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);color:rgb(223,80,0)">opening_hours'</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">: </span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">res</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">[</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);color:rgb(223,80,0)">'debut'</span><span style="background-color:rgb(255,255,255)"><font color="#333333" face="Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="line-height:18px;white-space:pre-wrap">] + </span></font><font color="#df5000" face="Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="line-height:18px;white-space:pre-wrap">‘</span></font><span style="color:rgb(223,80,0);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap">-</span><font color="#df5000" face="Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="line-height:18px;white-space:pre-wrap">‘</span></font> + </span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">res</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">[</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);color:rgb(223,80,0)">‘fin'</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">] </span><span style="background-color:rgb(255,255,255)"> </span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)"><font color="#333333" face="Consolas, Liberation Mono, Menlo, Courier, monospace" style="line-height:normal;white-space:normal"><span style="line-height:18px;white-space:pre-wrap">+ </span></font><font color="#df5000" face="Consolas, Liberation Mono, Menlo, Courier, monospace" style="line-height:normal;white-space:normal"><span style="line-height:18px;white-space:pre-wrap">‘ open ; </span></font><font color="#df5000" face="Consolas, Liberation Mono, Menlo, Courier, monospace" style="line-height:normal;white-space:normal"><span style="line-height:18px;white-space:pre-wrap">‘</span></font><span style="color:rgb(0,0,0);font-family:Helvetica;line-height:normal;white-space:normal"> + </span>res</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">[</span><span style="font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255);color:rgb(223,80,0)">‘saufjour’</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap;background-color:rgb(255,255,255)">] </span><font color="#333333" face="Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="line-height:18px;white-space:pre-wrap"> + </span></font><font color="#df5000" face="Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="line-height:18px;white-space:pre-wrap">‘closed’</span></font></li></ol><div><font color="#df5000" face="Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="line-height:18px;white-space:pre-wrap"><br></span></font></div><div><font color="#0061ff"><ouverture</font> <font color="#e63b7a">debut="08:30" fin="20:00" saufjour="Lundi;Dimanche"</font><font color="#3a88fe">/></font> donnera <b><span style="background-color:rgb(255,255,255);color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap">opening_hours='</span><a href="http://openingh.openstreetmap.de/evaluation_tool/?EXP=Mo-Fr%2010:00-20:00&DATE=1413057240000&lat=48.7769&lon=9.1844&mode=0" target="_blank">08:30-20:00 open; Mo,Su closed</a><font color="#333333" face="Consolas, Liberation Mono, Menlo, Courier, monospace"><span style="line-height:18px;white-space:pre-wrap">’</span></font></b></div><span class=""><div><span style="background-color:rgb(255,255,255);color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;line-height:18px;white-space:pre-wrap"><br></span></div><blockquote type="cite">Je ne suis pas trop pour intégrer des données peu fiable et inmaintenable.<br></blockquote></span>Je laisse e choix de trancher à la personne qui fait l’intégration ;-)</div><div><div><br></div><blockquote type="cite">id='25420005'<span class=""><br>Pour c'est juste un identifiant interne et pas de référence.<br></span></blockquote>Je ne vois pas la différence. Et il est publié dans les données ouvertes donc pas si interne que ça.</div><div>Tu voulais un identifiant bien « officiel » comme un SIRET ?</div><div><br></div><div>Bonne soirée et bon dimanche,</div><div><br></div><div>—</div><span class="HOEnZb"><font color="#888888"><div>Yves</div><div><br><br></div></font></span></div></div><br>_______________________________________________<br>
Talk-fr mailing list<br>
<a href="mailto:Talk-fr@openstreetmap.org">Talk-fr@openstreetmap.org</a><br>
<a href="https://lists.openstreetmap.org/listinfo/talk-fr" target="_blank">https://lists.openstreetmap.org/listinfo/talk-fr</a><br>
<br></blockquote></div><br></div>