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

A cleaner and more readable postprocessors.content-format #1080

Closed
musjj opened this issue Oct 25, 2020 · 0 comments
Closed

A cleaner and more readable postprocessors.content-format #1080

musjj opened this issue Oct 25, 2020 · 0 comments

Comments

@musjj
Copy link

musjj commented Oct 25, 2020

The format template for the metadata postprocessor requires you to insert \n for newlines because of JSON's limitations.
But this gets unreadable real quick if your templates are complex. I'm not sure what the best solution would be, but how about using a list of strings that gallery-dl can '\n'.join(list) later on?

So instead of doing this:

"postprocessors": [
    {
        "name": "metadata", "mode": "custom", "extension": "tags",
        "content-format": "tag1:{tag1}\ntag2:{tag2}\ntag3:{tag3}\ntag4:{tag4}\ntag5:{tag5}\ntag6:{tag6}\ntag7:{tag7}"
    }

]

You do this:

"postprocessors": [
    {
        "name": "metadata", "mode": "custom", "extension": "tags",
        "content-format": ["tag1:{tag1}",
                           "tag2:{tag2}",
                           "tag3:{tag3}",
                           "tag4:{tag4}",
                           "tag5:{tag5}",
                           "tag6:{tag6}",
                           "tag7:{tag7}"]
    }
]
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

2 participants