Danbooru

[Userscript] IndexedRelatedTags

Posted under General

IndexedRelatedTags caches related tags queries for post edits and uploads, facilitating quicker lookups on average. Additionally, it brings back the old style of related tags that was present prior to the change on 2023-03-13.

Installation

Project page
Main script

Usage notes

It's used mostly the same as related tags The primary difference is under the covers, in how the data is stored and retrieved.

Wikis

It provides the ability to query only the wiki page, to include the list_of_* wikis, or to query no wikis. Additionally, duplicate tags can be included, and all tags will appear in the order as they appear in the wiki.

Categories

Any of the tag categories can be individually queried. "All" queries all categories.

Types

Supports the following comparisons:

  • default - Does a similarity calculation for "All"; frequency for categories.
  • frequency - How many posts a tag has in common with all other tags.
  • similarity - How many posts two tags have in common with each other.
  • like - Which tags contain the tag name?
Other

Since the tag columns are placed horizontally, the related tags section can be set to be scrollable. This adds a scrollbar to the top/bottom, and also facilitates moving the related tags section via the left/right arrow keys.

Final

Any suggestions or feedback is appreciated.

Latest edits

  • (2024-03-21)
    • Version 3 - Tag checklists

Versions

Show
  • (2023-03-28)
    • Version 2 - Initial release
  • (2024-03-21)
    • Version 3 - Tag checklists

Updated

Pushed Version 3.

  • Additions
    • Ability to have a checklist per tag
      • checklist_tags_enabled - Shows the checklist tags when using one of the related tags buttons.
      • checklist_query_only_enabled - Adds a Checklist button which will only show the checklist tags.
    • Additional query for unknown tags
      • query_unknown_tags_enabled
      • Added since some wikis do not return the tags with the dtext links, and thus the category cannot be found.
  • Changes
    • Added deprecated coloration (light grey)
    • Changed the defaults on some settings
Checklist controls

Found on the userscript menu (settings > Userscript Menus > IndexedRelatedTags), top/right side. There are 3 controls: view, save, populate.

View will show the checklist if there is one for the tag under Tag name. Each tag in the checklist will be shown on a separate line.

Save will save the current list of tags in the text box. They can be separated by either spaces or separate lines. Nonexistant or deprecated tags can also be added, though these will be highlighted as such when the checklist tag column gets generated when editing a post. Checklists can be deleted by emptying the text box before saving.

Populate will pull the current list of tags from the wiki and display them in the order they appear, as well as removing no duplicates.

1