py/gadict_srs_anki.py
changeset 565 ac68f2680ea0
parent 562 d4dbeb503ef4
child 566 0bba61492c37
--- a/py/gadict_srs_anki.py	Sat Sep 17 10:18:12 2016 +0300
+++ b/py/gadict_srs_anki.py	Wed Sep 21 22:09:37 2016 +0300
@@ -98,10 +98,13 @@
   font-style: italic;
 }
 .ant {
-  color: red;
+  color: #404080;
 }
 .syn {
-  color: blue;
+  color: #804040;
+}
+.rel {
+  color: #804080;
 }
 .attrs {
   color: blue;
@@ -230,14 +233,25 @@
                 buf.append("<span class='pos'>")
                 buf.append(sense.pos)
                 buf.append("</span>")
+            need_sep = False
             if sense.ant_list and len(sense.ant_list) > 0:
                 buf.append(" <span class='ant'>ant: ")
                 buf.append("; ".join(sense.ant_list))
                 buf.append("</span>")
+                need_sep = True
             if sense.syn_list and len(sense.syn_list) > 0:
+                if need_sep:
+                    buf.append(" |")
                 buf.append(" <span class='syn'>syn: ")
                 buf.append("; ".join(sense.syn_list))
                 buf.append("</span>")
+                need_sep = True
+            if sense.rel_list and len(sense.rel_list) > 0:
+                if need_sep:
+                    buf.append(" |")
+                buf.append(" <span class='rel'>rel: ")
+                buf.append("; ".join(sense.rel_list))
+                buf.append("</span>")
             for (lang, tr) in sense.tr_list:
                 if len(sense.tr_list) > 1:
                     buf.append("<div class='sense'>")