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

[feature request] ability to **add** custom global variables #3773

Closed
ClosedPort22 opened this issue Mar 14, 2023 · 3 comments
Closed

[feature request] ability to **add** custom global variables #3773

ClosedPort22 opened this issue Mar 14, 2023 · 3 comments

Comments

@ClosedPort22
Copy link
Contributor

It would be nice to be able to add custom global variables instead of replacing util.GLOBALS. Currently I use a separate configuration profile for a postprocessor that needs some custom logic, but this workaround falls short when I need to use built-in functions in the same postprocessor.

@mikf
Copy link
Owner

mikf commented Mar 15, 2023

Add these lines to your module:

from gallery_dl import util
globals().update(util.GLOBALS)

@mikf
Copy link
Owner

mikf commented Mar 18, 2023

I did update globals such that it updates the GLOBALS dict instead of overwriting it (a1ca240).

@ClosedPort22
Copy link
Contributor Author

Thank you!

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