Closed endkb closed 6 months ago
For SoundsDownloadScript, I'm thinking about just allowing dot sourcing a config file from an external .ps1. It's not graceful, but the script blocks for rclone would be a nightmare to convert to another format like xml, json, or ini. I do consider those user configurable items, even though they are more advanced than just changing a simple variable. External file would basically look like the config options in the main script. It would be called with a command line arg.
For genRSS, I might move debug and debugdirectory into the profile files. That only leaves kid3 and rclone locations. Those are easy to set if the script gets updated. genRSS doesn't get updated very often anyway.
Edit: I did some additional reading and ini files can't really do multiline values that would be needed for the script blocks to configure rclone.
A downside is that debug logging can't start until the config files are read, so if there's a config file problem, they won't be logged.
Just about everything is in place, I just don't know if I'm ready to pull the trigger on external config files, especially the dot sourcing in the SoundsDownloadScript because it seems so dirty. I don't really know why though, it's no different than modifying the configuration options inline...
Merged into main. Needs testing.
I'm satisfied that it works.
Right now, "script-wide" variables are stored at the top of the .ps1. If the script version gets updated, the values need to be transcribed.
Ini file might be a good option, there's already a function in the script to do that. It might need to be moved to a different section.
I don't know how an ini file would work with the remote script blocks.