Overview
| Comment: | [build][fr] call conj module in build_data directly from the source instead of Grammalecte package | 
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive | 
| Timelines: | family | ancestors | descendants | both | trunk | fr | build | 
| Files: | files | file ages | folders | 
| SHA3-256: | ae2cdf1d92b1856cdcf755fee66e5691 | 
| User & Date: | olr on 2017-12-26 14:27:27 | 
| Other Links: | manifest | tags | 
Context
| 2017-12-26 | ||
| 14:43 | [graphspell] add forgotten file check-in: f3d1b23584 user: olr tags: trunk, graphspell | |
| 14:27 | [build][fr] call conj module in build_data directly from the source instead of Grammalecte package check-in: ae2cdf1d92 user: olr tags: trunk, fr, build | |
| 13:54 | [fr] pt: mettre à terre check-in: 8b6bd9b12c user: olr tags: trunk, fr | |
Changes
Modified gc_lang/fr/build_data.py from [9a16091a61] to [a0d5d064eb].
| ︙ | ︙ | |||
| 9 10 11 12 13 14 15 | import os import itertools import graphspell.ibdawg as ibdawg from graphspell.echo import echo from graphspell.str_transform import defineSuffixCode import graphspell.tokenizer as tkz | < | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 
import os
import itertools
import graphspell.ibdawg as ibdawg
from graphspell.echo import echo
from graphspell.str_transform import defineSuffixCode
import graphspell.tokenizer as tkz
class cd:
    """Context manager for changing the current working directory"""
    def __init__ (self, newPath):
        self.newPath = os.path.expanduser(newPath)
 | 
| ︙ | ︙ | |||
| 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | 
        open(sp+"/modules-js/mfsp_data.json", "w", encoding="utf-8", newline="\n").write(sCode)
def makePhonetTable (sp, bJS=False):
    print("> Correspondances phonétiques ", end="")
    print("(Python et JavaScript)"  if bJS  else "(Python seulement)")
    
    try:
        oDict = ibdawg.IBDAWG("French.bdic")
    except:
        traceback.print_exc()
        return
    # set of homophonic words
 | > > | 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | 
        open(sp+"/modules-js/mfsp_data.json", "w", encoding="utf-8", newline="\n").write(sCode)
def makePhonetTable (sp, bJS=False):
    print("> Correspondances phonétiques ", end="")
    print("(Python et JavaScript)"  if bJS  else "(Python seulement)")
    
    import gc_lang.fr.modules.conj as conj
    try:
        oDict = ibdawg.IBDAWG("French.bdic")
    except:
        traceback.print_exc()
        return
    # set of homophonic words
 | 
| ︙ | ︙ | 
Modified make.py from [850d6c4ce8] to [bf74b39e46].
| ︙ | ︙ | |||
| 218 219 220 221 222 223 224 | 
    spLangPack = "grammalecte/"+sLang
    helpers.createCleanFolder(spLangPack)
    for sf in os.listdir("gc_core/py/lang_core"):
        if not os.path.isdir("gc_core/py/lang_core/"+sf):
            helpers.copyAndFileTemplate("gc_core/py/lang_core/"+sf, spLangPack+"/"+sf, dVars)
    print("+ Modules: ", end="")
    for sf in os.listdir(spLang+"/modules"):
 | | | 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | 
    spLangPack = "grammalecte/"+sLang
    helpers.createCleanFolder(spLangPack)
    for sf in os.listdir("gc_core/py/lang_core"):
        if not os.path.isdir("gc_core/py/lang_core/"+sf):
            helpers.copyAndFileTemplate("gc_core/py/lang_core/"+sf, spLangPack+"/"+sf, dVars)
    print("+ Modules: ", end="")
    for sf in os.listdir(spLang+"/modules"):
        if not sf.startswith(("gce_", "__pycache__")):
            file_util.copy_file(spLang+"/modules/"+sf, spLangPack)
            print(sf, end=", ")
    print()
    # TEST FILES
    with open("grammalecte/"+sLang+"/gc_test.txt", "w", encoding="utf-8", newline="\n") as hDstPy:
        hDstPy.write("# TESTS FOR LANG [" + sLang + "]\n\n")
 | 
| ︙ | ︙ |