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

Question: parent>child categories for child extractor options #4621

Open
dajotim937 opened this issue Oct 4, 2023 · 10 comments
Open

Question: parent>child categories for child extractor options #4621

dajotim937 opened this issue Oct 4, 2023 · 10 comments

Comments

@dajotim937
Copy link

support parent>child categories for child extractor options, for example an imgur album from a reddit thread with reddit>imgur

Can you elaborate what is this, what for and how to use this?

@mikf
Copy link
Owner

mikf commented Oct 4, 2023

I assumed "for example an imgur album from a reddit thread with reddit>imgur" was a good enough example, but apparently not. Guess I should've added some actual documentation and an example to docs/gallery-dl.example.conf.

It's for specifying options for child extractors, for example when processing the link to an imgur album found in a reddit thread, to make it no longer necessary to use conditional file and directory names like here.

Instead you can now do the following and override all options and not just filename and directory.

        "imgur": {
            "#": "general imgur options",
            "filename": "{id}.{extension}"
        },
        "reddit>imgur": {
            "#": "imgur options for links found on reddit",
            "filename": "{_reddit[id]} {id}.{extension}"
        }

@cheese529
Copy link

Thank you for explaining this mikf

@dajotim937
Copy link
Author

dajotim937 commented Oct 4, 2023

I assumed "for example an imgur album from a reddit thread with reddit>imgur" was a good enough example, but apparently not. Guess I should've added some actual documentation and an example to docs/gallery-dl.example.conf.

Yeah, I looked at docs but didn't find something about parent>child, so that's why this issue here. Mainly, I was confused with 'thread', because usually you say "child extractor" in config documentation

Okay, thank you. So follow up question. Will I be able use metadata from both extractors or only from parent one? For example, I use reddit post id AND redgifs id in filename if I download submission from reddit that contains redgifs link.

And second, how it will work with gfycat to redgif transition? Previously (before gfycat was closed and gallery had fix to redirect) I just pass down metadata and it was like reddit>gfycat>redgifs.

And thank you. This is great feature.

@Hrxn
Copy link
Contributor

Hrxn commented Oct 4, 2023

Okay, thank you. So follow up question. Will I be able use metadata from both extractors or only from parent one? For example, I use reddit post id AND redgifs id in filename if I download submission from reddit that contains redgifs link.

Yes, it's possible to use metadata from both extractors.

And second, how it will work with gfycat to redgif transition? Previously (before gfycat was closed and gallery had fix to redirect) I just pass down metadata and it was like reddit>gfycat>redgifs.

It should take the settings from RedGIFs, but have not tested this myself.

@rEnr3n
Copy link

rEnr3n commented Oct 8, 2023

How do I use reddit>imgur through the -o switch? I used it in the config file and it worked. But I have a configuration I don't want to put in my config file.

-o extractor.reddit>imgur.directory= didn't work.

@dajotim937
Copy link
Author

-o extractor.reddit>imgur.directory= didn't work.

Can't you just use -o directory=?

@mikf
Copy link
Owner

mikf commented Oct 9, 2023

-o extractor.reddit>imgur.directory= didn't work.

The > needs to be escaped or your shell will interpret it as stdout redirect.

@dajotim937
Copy link
Author

dajotim937 commented Oct 9, 2023

And, I guess, this and this are related to new feature. You haven't changed anything in this area, have you?

@mikf
Copy link
Owner

mikf commented Oct 10, 2023

No, I haven't and it will have to wait till v2.0. The current code base doesn't really allow for certain changes without having to basically rewrite (and potentially break) everything.

@dajotim937
Copy link
Author

Okay, just asking.

mikf added a commit that referenced this issue Jan 4, 2024
bradenhilton pushed a commit to bradenhilton/gallery-dl that referenced this issue Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants