Metadata mapping

last updated

Every site describes its posts its own way: its own tag categories, its own rating letters, its own URLs. monloader translates all of that into what monbooru expects, using a profile per site (the shipped ones, with your edits on top) and a generic fallback for the rest.

Tags#

A booru’s tag categories land in the monbooru category with the same name (general, artist, character, copyright, meta, species). The rest go to the closest match:

Site category monbooru category
metadata, lore, faults meta
contributor, circle, group artist
parody, series, studio copyright
model person
invalid, deprecated dropped
anything else general

Tag names are brought into monbooru’s form on the way: lowercase, with spaces turned into underscores (fate/grand order becomes fate/grand_order).

Ratings#

The full words (general, sensitive, questionable, explicit, and safe, which becomes general) mean the same everywhere. The trap is the letter s: on Danbooru it means “sensitive”, everywhere else it means “safe”. monloader knows which kind of site each one is and reads it accordingly. A rating it doesn’t recognize leaves the image unrated.

Manga sites usually don’t rate their galleries at all, which would let them through a safe-for-work ceiling. So the profiles of adult-only sites (nhentai, hitomi, exhentai and the like) rate their downloads explicit whenever the site doesn’t say otherwise.

Sources#

Each image gets its post’s page as its source, labelled with the site’s name, so source:danbooru finds everything from danbooru. A direct link to a file has no post page, so its source is the file’s own address; when monsender sends a file along with the page you found it on, that page is used instead.

Booru posts also bring the artist’s commentary, the original upload they point to (a pixiv or twitter page, say), and any note boxes drawn on the image; see Sources and notes. A post that names a parent post is linked to it in monbooru once both are there.

One label per site#

The same site can show up under several names: danbooru from its posts, cdn.donmai.us from a direct link to one of its files. To keep them under one source in monbooru, a site’s settings have two fields:

  • Source label is the name its downloads are filed under. Empty keeps the site’s own name.
  • Host aliases are the other addresses that belong to it: file servers, mirrors. A file from one of them counts as the site. monsender uses the same list to recognize the site on a mirror.

For a host that isn’t any site gallery-dl knows (a wiki you save images from, say), give it a label under host labels, below the sites tables. Labels only apply to new downloads.

Editing a site’s profile#

When a site’s tags or ratings come out wrong, fix them on the profile and mapping tabs of its settings. Changes apply to the next download.

  • Family decides how ratings and tag categories are read. Most sites that aren’t boorus use generic. Kind says whether a gallery is a manga, bundled into one archive.
  • The rating map fixes a site whose letters read wrong: a site that uses e for “everyone” would otherwise come out explicit.
  • The category map sends one of the site’s tag categories to a different monbooru category, or drops it.
  • Tag rules fix single tags: rename a misspelled one, move it to another category with a category: prefix, or leave the replacement empty to drop it.
  • Setting the md5 search URL lets the site take part in reverse lookup.

Your profile is saved as one file, and the export tab gives it to you ready to share. If a fix is worth having for everyone, see site profiles.