py/gadict_srs_anki.py
changeset 561 a96c5bad041f
parent 560 dad049a0f585
child 562 d4dbeb503ef4
equal deleted inserted replaced
560:dad049a0f585 561:a96c5bad041f
   193             if sense.pos:
   193             if sense.pos:
   194                 buf.append("<span class='pos'>")
   194                 buf.append("<span class='pos'>")
   195                 buf.append(sense.pos)
   195                 buf.append(sense.pos)
   196                 buf.append("</span>")
   196                 buf.append("</span>")
   197             if sense.ant_list and len(sense.ant_list) > 0:
   197             if sense.ant_list and len(sense.ant_list) > 0:
   198                 buf.append("<span class='ant'>ant: ")
   198                 buf.append(" <span class='ant'>ant: ")
   199                 buf.append("; ".join(["{"+s+"}" for s in sense.ant_list]))
   199                 buf.append("; ".join(["{"+s+"}" for s in sense.ant_list]))
   200                 buf.append("</span>")
   200                 buf.append("</span>")
   201             if sense.syn_list and len(sense.syn_list) > 0:
   201             if sense.syn_list and len(sense.syn_list) > 0:
   202                 buf.append("<span class='syn'>syn: ")
   202                 buf.append(" <span class='syn'>syn: ")
   203                 buf.append("; ".join(["{"+s+"}" for s in sense.syn_list]))
   203                 buf.append("; ".join(["{"+s+"}" for s in sense.syn_list]))
   204                 buf.append("</span>")
   204                 buf.append("</span>")
   205             for (lang, tr) in sense.tr_list:
   205             for (lang, tr) in sense.tr_list:
   206                 if len(sense.tr_list) > 1:
   206                 if len(sense.tr_list) > 1:
   207                     buf.append("<div class='sense'>")
   207                     buf.append("<div class='sense'>")
   229             if sense.pos:
   229             if sense.pos:
   230                 buf.append("<span class='pos'>")
   230                 buf.append("<span class='pos'>")
   231                 buf.append(sense.pos)
   231                 buf.append(sense.pos)
   232                 buf.append("</span>")
   232                 buf.append("</span>")
   233             if sense.ant_list and len(sense.ant_list) > 0:
   233             if sense.ant_list and len(sense.ant_list) > 0:
   234                 buf.append("<span class='ant'>ant: ")
   234                 buf.append(" <span class='ant'>ant: ")
   235                 buf.append("; ".join(["{"+s+"}" for s in sense.ant_list]))
   235                 buf.append("; ".join(["{"+s+"}" for s in sense.ant_list]))
   236                 buf.append("</span>")
   236                 buf.append("</span>")
   237             if sense.syn_list and len(sense.syn_list) > 0:
   237             if sense.syn_list and len(sense.syn_list) > 0:
   238                 buf.append("<span class='syn'>syn: ")
   238                 buf.append(" <span class='syn'>syn: ")
   239                 buf.append("; ".join(["{"+s+"}" for s in sense.syn_list]))
   239                 buf.append("; ".join(["{"+s+"}" for s in sense.syn_list]))
   240                 buf.append("</span>")
   240                 buf.append("</span>")
   241             for (lang, tr) in sense.tr_list:
   241             for (lang, tr) in sense.tr_list:
   242                 if len(sense.tr_list) > 1:
   242                 if len(sense.tr_list) > 1:
   243                     buf.append("<div class='sense'>")
   243                     buf.append("<div class='sense'>")