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

metadata options seem to be ignored? #712

Closed
calestyo opened this issue Apr 27, 2020 · 9 comments
Closed

metadata options seem to be ignored? #712

calestyo opened this issue Apr 27, 2020 · 9 comments

Comments

@calestyo
Copy link

Hey.

I can't seem to get this working...

Having a config file like this:

{
        "metadata": {
                "directory": "metadata"
        },
        
        "extractor": {
                "deviantart": {
                        "include": ["gallery", "scraps"],
                        "metadata": true,
                        "extra": true,
                        "client-id": 0,
                        "client-secret": "012345",
                        "refresh-token": "012345"
                }
        }
}

When not specifying --write-medata on the command line, no metadata files are created at all. When specifying, they are written, but metadata.directory seems to be ignored.

Also, at least extractor.deviantart.metadata doesn't seem to have any effect - with and without the very same data is extracted (i.e. no difference in license, and so on, as the documentation implies).

Any ideas? Thanks,
Chris.

@mikf
Copy link
Owner

mikf commented Apr 27, 2020

You need to put the metadata.directory value inside a post-processor object:

{
    "extractor": {
        "deviantart": {
            "postprocessors": [{
                "name": "metadata",
                "directory": "metadata"
            }],
            "include": ["gallery", "scraps"],
            "metadata": true,
            "extra": true,
            "client-id": 0,
            "client-secret": "012345",
            "refresh-token": "012345"
        }
    }
}

You also shouldn't use --write-medata when having this option in your config, because it's going to overwrite it (see #678)

Also, at least extractor.deviantart.metadata doesn't seem to have any effect - with and without the very same data is extracted (i.e. no difference in license, and so on, as the documentation implies).

extractor.deviantart.extra automatically enables extractor.deviantart.metadata

@calestyo
Copy link
Author

Hi.

Thanks, the thing with the postprocessor did the trick.

The only remaining thing is now, that when downloading journals, it doesn't download linked sta.sh images in them. Is this expected to work, or am I making some mistake?

Thanks.

@Vrihub
Copy link
Contributor

Vrihub commented Apr 28, 2020

I got tricked too in the past by a similar misunderstanding.

Indeed configuration.rst sometimes fails at explaining where to put some of the configuration directives.

Suggested improvements:

@calestyo
Copy link
Author

@mikf Any idea about the thing with sta.sh images not downloaded for journals?

Also perhaps one can rededicate this ticket to improve documentation for how to use metadata:

Maybe as @Vrihub suggested, i.e. something like:

extractor.*.postprocessors
Contains all post-processors (like metadata, ...) to be applied on the respective extractor. Example:
"postprocessors": [{"name": "metadata", "directory": "someOtherDirectory"}, {...}] with name specifying the name of the postprocessor

And for the metadata section something like:
This needs to be specified as a post.processor for an extractor.

Thanks :-)

@mikf
Copy link
Owner

mikf commented Apr 30, 2020

Any idea about the thing with sta.sh images not downloaded for journals?

Enabling extra only looks at the descriptions of Deviations (that's why it automatically enables metadata, to have access to said descriptions) Extending this functionality to also include Journal texts shouldn't be too much of a problem, I hope.

Vrihub added a commit to Vrihub/gallery-dl that referenced this issue May 10, 2020
mikf pushed a commit that referenced this issue May 10, 2020
* Link configuration examples in the intro, see #712

* Clarify overriding conf files by options, see #678
@calestyo
Copy link
Author

Would sta.sh downloading work already for scraps? Since these seem to be just gallery items anyway?

@calestyo
Copy link
Author

calestyo commented Jun 3, 2020

Extending this functionality to also include Journal texts shouldn't be too much of a problem, I hope.

Just wondered, whether this is actually on the roadmap? :-)

mikf added a commit that referenced this issue Jun 4, 2020
@mikf
Copy link
Owner

mikf commented Jun 4, 2020

Sorry, I kind of forgot about this ... anyway: 41d0316

@calestyo
Copy link
Author

calestyo commented Jun 5, 2020

Thanks a lot.

I guess this issue can be closed than.

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

3 participants