Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconstructing DeviantArt gallery/folder structure #276

Closed
ReneRanzinger opened this issue May 22, 2019 · 7 comments
Closed

Reconstructing DeviantArt gallery/folder structure #276

ReneRanzinger opened this issue May 22, 2019 · 7 comments

Comments

@ReneRanzinger
Copy link

Since the flat configuration argument seems not to be working for now (see #271) is it possible to add a feature that allows to reconstruct the DeviantArt gallery/folder structure? For example by adding the association of an image with folder(s) in the metadata json file of the image or by generating an individual file containing this association for all images?

@mikf
Copy link
Owner

mikf commented May 26, 2019

There is currently no such option, and flat will be fixed when f837ea9 is released in the next version.

flat=false works by going through the list of all gallery folders, but that has its downsides:

  • deviations can be in no folder at all and will therefore not be picked up
  • deviations can be in multiple folders at once, so you would be downloading the same image multiple times

As an example, take this account: https://www.deviantart.com/justatest235723 with two posted images.

flat=true will give you both, but flat=false will only download the first one - twice.

I would be possible to add a folders metadata field that lists all folder names a deviation is part of, but that might cost a bit of network traffic and API calls if used.

@ReneRanzinger
Copy link
Author

ReneRanzinger commented May 27, 2019 via email

mikf added a commit that referenced this issue May 31, 2019
@Hrxn
Copy link
Contributor

Hrxn commented May 31, 2019

Since the only other option to reconstruct the folder AND get all images is to download everything twice.

Depends, I think. Using the archive option together with skip = true should work as well.

@mikf
Copy link
Owner

mikf commented May 31, 2019

That's a really nice idea I didn't even think about, but it sadly doesn't work. Initially the archive IDs for flat=true and flat=false are different (one uses the gallery extractor, the other the folder extractor), and when you adjust them to match you'd be skipping files that are in more than 1 folder ...

Anyway @ReneRanzinger , I added a folders option that will add a list of folder names to each deviation. You can download all files with flat=true, write their metadata to separate files, and use those folder names to put them where they belong afterwards.

Parent folders are indicated with a /:

 "folders": [
    "Featured",
    "Artworks/Variants"
],

(Technically each folder is a child of Featured, but that is ignored)

@YukiUnHappy
Copy link

YukiUnHappy commented Jun 2, 2019

Can the deviantart extractor process the specified folder and recursive process the sub folder then download in the sub directory? Just like to keep the multilevel folder structures as the author set.

@Hrxn
Copy link
Contributor

Hrxn commented Jun 2, 2019

Maybe a new option for the postprocessor? 😄

@ReneRanzinger
Copy link
Author

@mikf Thanks for implementing the option. I tested it and works great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants