PixivUtil2 icon indicating copy to clipboard operation
PixivUtil2 copied to clipboard

[feature request?] Fanbox post directory

Open Yurihellsin opened this issue 2 years ago • 10 comments

HI I've tried everything but can't find a way for it to download each Fanbox post in it's own directory could this be added or am I missing something?

Prerequisites

  • [X ] Did you read FAQ section in readme.md?
  • [ X] Did you test with the latest releases or commit ?
  • [ X] Did you search for existing issues in Issues?

Description

[Description of the bug or feature]

Steps to Reproduce

  1. [First Step]
  2. [Second Step]
  3. [and so on...]

Expected behavior: [What you expected to happen]

Actual behavior: [What actually happened]

Log file: [Attach the pixivutil.log file in the application folder, recommended to delete the old file, reproduce the issue, and upload the newly generated file here]

Versions

You can get this information from executing PixivUtil2.py --help. Latest version available in https://github.com/Nandaka/PixivUtil2/releases

Yurihellsin avatar Sep 13 '22 20:09 Yurihellsin

It's in the README in the [FANBOX] section...

filenameFormatFanboxContent

Similar to filename format, but for files inside FANBOX posts.

filenameFormatFanboxCover

Similar to filename format, but for FANBOX post cover images

filenameFormatFanboxInfo

Similar to filename format, but for info dumps.

For example you could have this in your config.ini:

[FANBOX]
filenameFormatFanboxCover = fanbox/%member_id%/%urlFilename% - %title%
filenameFormatFanboxContent = fanbox/%member_id%/%urlFilename% - %title%
filenameFormatFanboxInfo = fanbox/%member_id%/%urlFilename% - %title%

So if you wanted each post in it's own directory you could do this: filenameFormatFanboxContent = %member_id%/%image_id%/%urlFilename% - %title%

biggestsonicfan avatar Sep 13 '22 21:09 biggestsonicfan

I have my directory settings as follows

filenameformatfanboxcover = %artist% (%member_id%)/-=FANBOX=-/%urlFilename% - %title% filenameformatfanboxcontent = %artist% (%member_id%)/-=FANBOX=-/%urlFilename% - %title% filenameformatfanboxinfo = %artist% (%member_id%)/-=FANBOX=-/%urlFilename% - %title%

This does create a separate directory for fanbox but no matter what I've tried I can't get it to create sub directories for each post as like with the Manga mode.

Yurihellsin avatar Sep 15 '22 02:09 Yurihellsin

Oh I'm not sure you can have the = around FANBOX in the name. The INI file might be trying to interpret that. I also don't see your / files to indicate a different directory?

biggestsonicfan avatar Sep 15 '22 03:09 biggestsonicfan

Oh I had the back slash instead of the forward and it was removed from the post sorry.

Yurihellsin avatar Sep 15 '22 08:09 Yurihellsin

Actually I'm now encountering this issue. My rootDirectory is /blah/blah/blah/pixiv/ but I can't seem to get Fanbox in a folder before /pixiv/ so it's /blah/blah/blah/pixiv/fanbox/ instead of /blah/blah/blah/fanbox/

biggestsonicfan avatar Nov 12 '22 01:11 biggestsonicfan

Admittedly, it wouldn't be too hard to add an override to Fanbox (and maybe Sketches) if the defined. If not defined, it uses the rootdir.

biggestsonicfan avatar Nov 13 '22 01:11 biggestsonicfan

What I want is it to be "download directory/artists/fanbox/post"

Yurihellsin avatar Nov 16 '22 19:11 Yurihellsin

try to append ..\ for relative path?

filenameFormatFanboxCover = ..\%searchTags%\%member_id% %member_token%\%R-18% %urlFilename% - %title%
filenameFormatFanboxContent = ..\%searchTags%\%member_id% %member_token%\%R-18% %urlFilename% - %title%
filenameFormatFanboxInfo =..\%searchTags%\%member_id% %member_token%\%R-18% %urlFilename% - %title%

Nandaka avatar Nov 17 '22 02:11 Nandaka

image This is how I have it at present which means all fanbox content goes into the one directory but I'd like to have each post in it's own directory.

Yurihellsin avatar Nov 17 '22 22:11 Yurihellsin

You can use %image_id%, e.g. %member_id% %member_token%\%image_id%\%R-18% %urlFilename% - %title%

Refer to https://github.com/Nandaka/PixivUtil2#filename-format-syntax

Nandaka avatar Nov 18 '22 00:11 Nandaka