If you happen to have a large collection of images, tagged with artists, from another site, then it could be possible to search for the image on e621 and potentially apply the artist tag. The same holds for character tags, assuming artists and character owners post images they have made or comissioned on these sites. This fails if other people start uploading the same images, such as a specialized fetish-reposting account.
This repository contains some of the tools needed to do this matching on Furaffinities site.
character_artist_tags_by_post.json
is a file produced by the sql
select post_id, tag_name, tag_type from (
select unnest(tags) as tag_name, post_id, row_number() over (partition by post_id order by change_seq desc)
from e621.change_history
) as tags_post_table
inner join e621.tags using (tag_name)
where row_number <= 1
and (tag_type = 'artist' or tag_type = 'character')
and output using dbeaver's json export.
and sorted.txt.data
has the format e621:<e621_post_id> download-<is_sourced> with fa:<fa_post_id>\t<fa_artist_lower>
and as an example
e621:126668 download-*match with fa:5462583 ---
e621:126715 download-*match with fa:2674522 ---
e621:48519 download-*match with fa:5518496 ---
e621:728700 download-match with fa:15176228 --skittles--
e621:957464 download-*match with fa:14315632 -araku-
e621:957467 download-*match with fa:14315610 -araku-
e621:1049673 download-*match with fa:14424392 -arctic-
e621:809835 download-*match with fa:15438704 -arctic-
e621:366456 download-match with fa:8148985 -aru-
e621:161585 download-match with fa:5418127 -ash
e621:165008 download-*match with fa:6349459 -ash
e621:401256 download-*match with fa:9794037 -ash
e621:276126 download-*match with fa:9374388 -axiom-
The sqlite3 database used in 0_create_post_pairs.js
has the schema
CREATE TABLE artwork (
filename INTEGER,
post_id INTEGER PRIMARY KEY,
is_error_page INTEGER,
download_md5 TEXT,
full_md5 TEXT,
thumb_md5 TEXT,
download_url TEXT,
full_url TEXT,
thumb_url TEXT,
avatar_url TEXT,
artist_lower TEXT,
artist_upper TEXT,
title TEXT,
description TEXT,
date_posted TEXT,
category TEXT,
theme TEXT,
species TEXT,
gender TEXT,
favorites INTEGER,
comments INTEGER,
views INTEGER,
width INTEGER,
height INTEGER,
keywords TEXT,
rating TEXT,
camera TEXT,
date_and_time TEXT,
aperture TEXT,
iso_speed TEXT,
focal_length TEXT,
flash TEXT,
exposure TEXT,
metering_mode TEXT,
light_source TEXT
);
1_merge_files_and_guess.js
is where the magic happens and the final output is produced.