DeepDanbooru / createTagDom.py
MonkeyJuice's picture
update style
95f378b
raw
history blame
807 Bytes
#!/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