Files
README.md

pixiv-sync #

Sync your pictures with your Pixiv account, along with an improved image viewer.

Features #

Sync #

  • Removes unliked posts
  • Downloads new posts
  • Translates tags from japanese to english
  • Checks for image corruption
  • Creates data of all liked posts
  • Creates image size data
  • Support for private and non-private posts

Viewer #

  • Uses data from sync to display images in a grid-like format
  • Improved tag system
  • Supports viewing private and non-private posts
  • Ability to quickly re-sync images and data while changing config parameters
  • Efficiently and quickly show all images without any need for pagination

Building #

  • cd into src/viewer and run npm run build

Setup #

NPM will be used as the package manager, adapt the commands for your package manager if you use something else.

  • cd into viewer and run npm i
  • cd into sync and run npm i
  • Create config.json
    Use config.example.json as a base and fill out userId and pictureDirectory. Change any other configs if you want
  • Create .env
    Use .example.env as a base and fill out PIXIV_TOKEN
  • If you want to build the website: cd into viewer and run npm run build then cd into sync and run npm run start
  • Else if you want to run in dev mode, cd into viewer and run npm run start, then in another terminal cd into sync and run npm run start

How to get your userId #

Go to Pixiv and click your profile button
Profile Button
Next, click the Bookmarks button
Bookmarks Button
And finally get your User ID from the URL
URL

How to format your pictureDirectory #

In this example, the root pictures folder will be ~/Pictures/art
You need to make folders called images and private, and then deleted
inside both of those folders\

All folders: #

  • ~/Pictures/art/images
  • ~/Pictures/art/images/deleted
  • ~/Pictures/art/private
  • ~/Pictures/art/private/deleted

How to get your PIXIV_TOKEN #

Go to Pixiv and open Inspect Element (CTRL + Shift + I on most browsers) and go to the Network Tab
Network Tab
Next on the first request to pixiv.net (Reload if you have to)
Request
And then go to the Cookies tab and find PHPSESSID
Cookies Tab
Finally, click the PHPSESSID value and copy everything after the _!