py/gadict_c5.py
changeset 402 b47698d5ccab
parent 399 a6a7036f3c6f
child 403 241ecfe2ca3c
equal deleted inserted replaced
401:791994f95561 402:b47698d5ccab
    27         import traceback
    27         import traceback
    28         traceback.print_exc()
    28         traceback.print_exc()
    29     exit(1)
    29     exit(1)
    30 finally:
    30 finally:
    31     fin.close()
    31     fin.close()
       
    32 
       
    33 prelude = dom[0]
       
    34 if prelude.name is not None:
       
    35     fout.write("_____\n\n00-database-short\n")
       
    36     fout.write(prelude.name)
       
    37     fout.write("\n")
       
    38 if len(prelude.urls) > 0:
       
    39     fout.write("_____\n\n00-database-url\n")
       
    40     for url in prelude.urls:
       
    41         fout.write(url)
       
    42         fout.write("\n")
       
    43 fout.write("_____\n\n00-database-info\n")
       
    44 if prelude.name is not None:
       
    45     fout.write("Dictionary name: ")
       
    46     fout.write(prelude.name)
       
    47     fout.write("\n\n")
       
    48 fout.write("Project URLs: ")
       
    49 fout.write(" , ".join(prelude.urls))
       
    50 fout.write("\n\n")
       
    51 fout.write("Project licenses: ")
       
    52 fout.write(", ".join(prelude.licences))
       
    53 fout.write("\n")
    32 
    54 
    33 for idx in range(1, len(dom)):
    55 for idx in range(1, len(dom)):
    34     article = dom[idx]
    56     article = dom[idx]
    35     fout.write("_____\n\n")
    57     fout.write("_____\n\n")
    36     title = "; ".join(article[0].keys())
    58     title = "; ".join(article[0].keys())