soupault icon indicating copy to clipboard operation
soupault copied to clipboard

Specify config via CLI arguments

Open toastal opened this issue 2 years ago • 4 comments

I have many cases where I would like to reference a configuration file, soupault.toml from another directory, like in the /nix/store, or via process substitution in the shell. I would expect something along the lines of readFile $ fromMaybe defaultFilePath (CLIArgs.configFile :: Maybe String).

toastal avatar May 08 '22 15:05 toastal

Hm, maybe I'm missing something. Could you elaborate why SOUPAULT_CONFIG=/path/to/soupault.toml soupault is insufficient?

dmbaturin avatar May 08 '22 19:05 dmbaturin

So the main problem here is my ability to remember this was added (also, I skimmed the code but my OCaml skills are not quite there so I definitely missed it).

What might more actionable is adding stuff like this to the Usage or manpage so it's a little easier to find.

toastal avatar May 09 '22 06:05 toastal

It's documentes in https://soupault.app/reference-manual/#custom-directory-layouts , but I agree it may not be the most obvious place. Do you have specific ideas how to make it more visible?

dmbaturin avatar May 09 '22 08:05 dmbaturin

Well 'usage' may be a good spot to list such env vars. Else one day manpages??

toastal ไข่ดาว | https://toast.al PGP: 7944 74b7 d236 dab9 c9ef e7f9 5cce 6f14 66d4 7c9e

toastal avatar May 09 '22 10:05 toastal

It's been possible since 4.2.0 but I forgot to reference the issue in the commit.

dmbaturin avatar Feb 08 '23 13:02 dmbaturin