File size: 807 Bytes
895ccaa
 
 
 
 
 
 
 
 
 
95f378b
 
895ccaa
 
95f378b
 
895ccaa
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python

from __future__ import annotations

def create_tag_dom(label, ignore, prob):
    result_html = ''
    if ignore:
        result_html += '<div class="m5dd_list">'
    else:
        result_html += '<div class="m5dd_list use">'
    result_html += '<span class="add action">➕</span>'
    result_html += '<span class="dec action">➖</span>'
    result_html += '<span class="label action">' + str(label) + '</span>'
    result_html += '<span class="prob">' + str(round(prob, 3)) + '</span>'
    result_html += '<span class="up action">🔼</span>'
    result_html += '<span class="down action">🔽</span>'
    result_html += '<a class="wiki action" href="https://danbooru.donmai.us/wiki_pages/' + label + '" target="_blank">📙</a>'
    result_html += '</div>'

    return result_html