-
-
Notifications
You must be signed in to change notification settings - Fork 996
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
Reading config files from current dir for portable version #682
Comments
Peter writes:
The [main page](https://github.com/mikf/gallery-dl) states that under Windows the config files are read from either:
- `%USERPROFILE%\gallery-dl\config.json` or
- `%USERPROFILE%\gallery-dl.conf`
Can you also make it so that we can put config.json, gallery-dl.conf as well as any other config files the app reads in the same directory as the executable? I would like a completely portable copy and don't want to place my config files in %USERPROFILE% on every machine I run the app on.
`-c' option can be used to do that.
(I'm completely unfamiliar with Windows but at least on Unix systems
looking for config.json or gallery-dl.conf in the same directory where
`gallery-dl' is installed (e.g. `/usr/local/bin') would be probably a
bit weird.)
|
Yes, exactly. If you really want to do something completely portable, use the command-line option to specify a config file (see comment above). This is very easy to do if you simply call And just for fun, in your own script you can also do stuff like simply move the config file into %USERPROFILE%, invoke gallery-dl, and then just move the file back. Or just change the value of %USERPROFILE% ad-hoc. The possibilities are endless 😏 |
@Hrxn: Nah, not gonna move files into %USERPROFILE% of systems I plug my USB drive into. Far too easy to have things abort and leave behind trash. As for changing the value of the envar itself, doesn't seem like a good idea (at least not when -c is available). @iamleot: Wouldn't be weird for Windows programs in the least, especially if they support portable usage (most stand-alone command-line apps do). Thanks for the tip about -c though - that's useful! @mikf: -c is nice but if you can make the app also scan the current dir for its config files (even if only on Windows) then that'll be great. Also, to be perfectly honest |
Thanks @mikf! |
But even when I use the Edit I think I fixed this by putting the following in the topmost level of gallery-dl.conf:
|
The main page states that under Windows the config files are read from either:
%USERPROFILE%\gallery-dl\config.json
or%USERPROFILE%\gallery-dl.conf
Can you also make it so that we can put config.json, gallery-dl.conf as well as any other config files the app reads in the same directory as the executable? I would like a completely portable copy and don't want to place my config files in %USERPROFILE% on every machine I run the app on.
The text was updated successfully, but these errors were encountered: