Where have I gone? (Creating an application)
I have not been here for a long time, as well as on civitai, I began to rarely publish anything. The reason for this is the creation of an application. I've been working on it for 9 hours a day every day for a week now, and since I'm not a programmer, this is a new experience for me and I'm proud of what I've already done. Today I want to share with you my idea and tell you about what is already working well in my program.
Initially, my idea was to create a script that would collect images of various artists for me, assemble them into a competent structure, automatically deleting text from them and describing them for SD.
Script logic:
1. "get_artist_list" - Parsing the list of artists from the Joyreactor website into files Artists_1.txt , _2, and so on up to 20 files with 500 entries each. From which, in the future, the name (URL) of the artist will be randomly taken for our needs. There is also a "check_and_update_artist_files" method - If files and names in them (500 in each) exist and are unique, this parsing is skipped.
2. "get_random_artist_from_multiple_files" is a method for randomly selecting an artist from 20 files. (perhaps I will change this decision in the future).
3. "get_last_page_number" - Parsing the number of images on the pages of this artist. Joyreactor has a very unusual page logic. The first page of the artist is the last, and in order to determine the next page, I had to create logic to determine the penultimate page of the artist, because there are more recent images on it. In the output, we get (number) - the number of images of this artist.
3. "get_artist_preview_images" - Preview parsing. First, the number of pages is determined according to the last stage and previews are parsed from the last to the first (this logic implies loading incomplete images into the cache so that I can look and understand whether I need images of this artist or choose another one. There are no "thumbnail" files on the site, so the ones that we usually see when the page loads are loaded).
4. "get_artist_images" - Image parsing. Uploading full-scale images (full). Here, the logic differs in that full-scale images are already uploaded to the directory with the artist's name in the file system under convenient names of folders (artist's) and files in them (1.jpg,2.jpg , etc.). Another logic differs from the preview in that if less than 20 images are found, then parsing is skipped if more than 40 images are found, then only 40 of the most recent images are downloaded anyway (you can change them in the UI).
5. "remove_watermark" - I'm working on it. So far, I have not been able to find a suitable method for removing text from images. If you know how to do this in Python, you can help me :3
6. At this stage there will be a description of the images, which I will begin to implement after I have dealt with the previous stage :D
Also, for ease of use, it took a lot of time to think through the user interface and its logic. At the moment, almost everything I wanted in it works correctly, but there are points that I need to refine both in terms of aesthetics and functionality. You can see the images of what I have at the moment.:
1.
in this screenshot, we see the functionality of the first tab. collecting a list and showing previews when selecting an artist from the list. (I have not completed the design for the horizontal scrollbar and have not yet dealt with the adequacy of the preview area, but everything is beautiful in the next tab. also, the "Select Artist" button selects the selected artist and moves it to the second tab).
2.
here we see the second tab, where we can select the desired folder with already uploaded images, or do parsing of images by other artists (we can enter them ourselves, press the random button, or select from the previous tab, the "Remove watermarks" button takes us to the 3rd tab, selecting the selected folder to delete the text)
there is no point in showing the third tab, it does not work until the method for deleting text has been thought out (
(and yes, I see design flaws that I intend to fix in the future)
You can support me in creating this application financially, mentally, physically, any way is welcome :D