arenasys / sd-tagging-helper

A GUI to help with manual tagging and cropping
233 stars 12 forks source link

Alternative tag csvs? #18

Open 152334H opened 2 years ago

152334H commented 2 years ago

The a1111-tagcomplete extension has support for different booru tag lists, in the form of a config file.

Currently, this project is hardcoded to use the danbooru.csv file. I would like to develop a fork that allows for arbitrary booru csv files to be used, but

arenasys commented 2 years ago

tagType is just the index for tagColor, functionally it doesn't matter. QML crash course: create a tagColors property on the backend that returns the list of colors:

@pyqtProperty(list, notify=updated)
def tagColors(self):
    return ["#0879f8", "#c00004", "#fff", "#c10cad", "#00ab2c", "#fd9200", "#08f4f8"]

if you change what tagColors returns you need to emit the notify signal (self.updated.emit()) for the front end to update. then use it in the QML:

color: backend.showingTagColors ? backend.tagColors[backend.tagType(model.text)] : "white"

next is: where is the program looking for tag lists, how is the user going to select the tag list, and where are the tag colors stored for each list.