Overview
| Comment: | [build][fr] build_data: compilation des locutions de diverses natures |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk | fr | build |
| Files: | files | file ages | folders |
| SHA3-256: |
6db8a61658ca24c01ff65bfee1255f24 |
| User & Date: | olr on 2017-10-29 05:57:45 |
| Other Links: | manifest | tags |
Context
|
2017-10-29
| ||
| 10:33 | [fr] faux positif: ne rien céder check-in: 30d5358e58 user: olr tags: trunk, fr | |
| 05:57 | [build][fr] build_data: compilation des locutions de diverses natures check-in: 6db8a61658 user: olr tags: trunk, fr, build | |
|
2017-10-28
| ||
| 19:58 | [build][fr] build_data: code cleaning check-in: ba1b8fe0e2 user: olr tags: trunk, fr, build | |
Changes
Modified gc_lang/fr/build_data.py from [7b07e55412] to [ddf3c68ae3].
| ︙ | |||
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 | + + + + + |
def makeLocutions (sp, bJS=False):
"compile list of locutions in JSON"
print("> Locutions ", end="")
print("(Python et JavaScript)" if bJS else "(Python seulement)")
dLocutions = {}
sVal = ":H"
for sLine in readFile(sp+"/data/locutions.txt"):
if sLine.startswith("[") and sLine.endswith("]"):
sLabel, sVal = sLine[1:-1].split("|", 1)
continue
lElem = sLine.split()
dCur = dLocutions
for sWord in lElem:
if sWord not in dCur:
dCur[sWord] = {}
dCur = dCur[sWord]
dCur[":"] = sVal
sCode = "# generated data (do not edit)\n\n" + \
"dLocutions = " + str(dLocutions) + "\n"
open(sp+"/modules/locutions_data.py", "w", encoding="utf-8", newline="\n").write(sCode)
if bJS:
open(sp+"/modules-js/locutions_data.json", "w", encoding="utf-8", newline="\n").write(json.dumps(dLocutions, ensure_ascii=False))
|
| ︙ |
Modified gc_lang/fr/data/locutions.txt from [190d018874] to [761f21ce86].
|
Modified gc_lang/fr/modules-js/locutions_data.json from [12115cc355] to [5d6a3c26cf].
| 1 | - + |
|
Modified gc_lang/fr/modules/locutions_data.py from [4e9754ba4b] to [b1e5fcfeec].
1 2 | 1 2 3 | - + | # generated data (do not edit) |