Label Pixiv Bookmarks

Automatically add existing labels for images in the bookmarks, and users are able to search the bookmarks

As of 2022-09-07. See the latest version.

Author
philimao
Ratings
0 0 0
Version
4.13
Created
2021-03-23
Updated
2022-09-07
Size
73.6 KB
License
MIT
Applies to

Label Pixiv Bookmarks

Automatically add existing tags for images in the bookmarks, and search them

Please Use Tampermonkey as the script manager

  • The script is developed on Tampermonkey, whereas Greasemonkey has quite different API calls.

Intro

  • The script will compare your existing bookmark tags and tags of the image, then find the intersection and save

  • If there is no intersection, the script will skip the image. Or you can configure the script to add the first tag of the image by default.

  • You might also search your bookmarks by your custom tag

  • The script is implemented by Pixiv Web APIs. Please open a new issue at GitHub if it was outdated.

For First-time User

  • This is a new account with all bookmarked images uncategorized. Let's start from here.

step1

  • There are several ways to build up your bookmarked tags pool from scratch before using the script
  1. In the bookmarks page, hovering on the thumbnail and clicking the Edit tags button. you will find the Creat a tag button in the dialog. After saving all your changes, those created tags will be saved to your bookmarked tags.

step2.1

  1. In the bookmark detail page, you can choose some tags from Tags for this work, and then click Edit Bookmark to save

step2.2

  1. Let the script grabs the first tag from the work to build up your bookmarked tags pool. In this case you should make sure that in the advanced settings of the script add the first tag option is set to Yes. You are free to remove those unwanted tags later, and don't forget to reset the value to No after you tags pool has been settled.

step2.3

  1. Use the synonym dictionary of the script. All the user tags (i.e. the target tag) will be added to your bookmarked tags pool. See below to find out how to use the synonym dict.

Start Labeling

  • In the Bookmarks Page, click Label button to open the script page
  • For first time user, if you already have some bookmarked tags, just click Start to run
  • Or you might need to add some tags to your pool as aforementioned
  • Assume that we already have the tag [新世紀エヴァンゲリオン] being bookmarked

step3

  • Wait for the progress bar until it reaches the end.
  • Refresh the page, and we will find that all images with the tag [新世紀エヴァンゲリオン] have been categorized

step3

Synonym Dictionary

  • Sometimes the author does not provide the so-called official tag for the artwork. This inconsistency makes it hard for us to do labeling.
  • Here we introduce the synonym dictionary that stores tag-alias pairs. All alias for a tag will be regarded as the same as the tag itself.
  • For example, the tags of the image contains [EVA] instead of [新世紀エヴァンゲリオン], so that it won't be categorized into [新世紀エヴァンゲリオン].

step4

  • Open the script page and we wil find the Edit Dict button.
  • The Target Tag is the one that you want it in your bookmark tags pool (eg: 新世紀エヴァンゲリオン); and the Alias are the tags that you want them to be regarded as the target tag (eg: eva, evangelion).
  • Note that all alias should be delimited by spaces, or line breakers
  • Click Update Tag to save the user tag and alias into the dictionary. If the alias is empty the user tag will be removed
  • You can export the dictionary to local disk as a backup
  • To modify the alias, enter the user tag value and click Load Tag to load the alias value from the dict (or use tab key), and click Update Tag to save

step5

  • After executing the script again, all uncategorized images with either the target tag, or the alias tag now have been categorized to your target tag.

step6

  • There are a lot of things you can do with this functionality. For example, most character in pixiv use the katakana (片仮名) as its official name, which makes the non-Japanese speakers hard to recognize the name.

  • Take Soryu Asuka Langley as an instance. She has at least four kinds of appellations like 惣流・アスカ・ラングレー/式波・アスカ・ラングレー/そうりゅう・アスカ・ラングレー/しきなみ・アスカ・ラングレー. Now we can set asuka as the target tag, and those Japanese names as the alias.

step7

step7

Examples

  • Here are the example of my own synonym dictionary and user tags. You might refer it to set yours.

dictionary userTags

About Some Advanced Settings

  • Auto Labeling For

    • By default, the script does label for those uncategorized images
    • You may want to re-label all your favorite artworks when some newly-added tags were not applied to those former images.
    • For example, if you just add [ayanami_rei] to your user tags, you can choose [新世紀エヴァンゲリオン] and re-run the script. Therefore, all images with [新世紀エヴァンゲリオン] tag will be searched and labeled again.
  • Whether the first tag will be added if there is not any match

    • Design for a cold start
    • It works when the intersection of your existing bookmark tags and tags of the work is empty, then the first tag of the image will be added
  • Whether NSFW works will be labeled as #R-18?

    • By default, the script will categorize those NSFW works into the R-18 tag
    • If you don't want the tag, set it as No before starting

Remove All Tags from Selected Works

  • The script can help you remove all tags from selected artworks easily
  • This usually helps when you want to reset multiple images to Uncategorized
  • Click on the Edit Bookmarks button, and you will find an extra Remove Tags button below the tags section
  • The button is disabled until you select several images

Remove a Bookmark Tag from Related Works

  • It is not hard for you to find that a new button named Delete Tag XXX comes out when you click on the Edit Bookmarks button
  • This will help you to remove this bookmark tag from ALL related images
  • This operation will not affect the bookmarked status, i.e. the images will become uncategorized if there is not any other tag remains

Search Your Bookmarks

  • You can also search your bookmarks with this script
  • Click Search Button to open the search page, and search with the keyword [asuka], which is the target tag we have added to the bookmarked tags pool before
  • The script will return all images with tag [asuka] or [asuka]'s alias.

FAQ

  • The Label button cannot be found on the website

    • Firstly make sure that you are at the correct place, and try to refresh before the next step
    • The new version of Pixiv UI uses React to update the page without refreshing, so the button might not be loaded
    • Generally, the correct path should be like https://www.pixiv.net/users/{YOUR UID}/bookmarks/artworks or https://www.pixiv.net/bookmark.php
    • If the path is correct, and the button is still nowhere to find, it is probably because Pixiv updates its UI. Inform me at GitHub by opening an issue
  • The script cannot work and alert a prompt

    • Please take down the prompt and open an issue at GitHub. The problem can be specific
  • The synonym dictionary got lost accidentally

    • Expand Load Dict and click the restore button the download the backup. The file could be imported to restore your dictionary.
    • If you think it is a bug, open an issue.
  • Whether Pixiv will ban my account for the script

    • The script is basically for self-use, and I have limited the speed of sending requests. It works properly on thousands of images.

Copyright and contact

The script complies with the MIT license.

Please report bugs or new features expected at GitHub.