Add Nix flakes#7
Conversation
and remove the ocr-path from the config so that changes to the env var will take place
|
apparently the default config string is required to save the config |
I think to use the order config->env variable->args ( So if anything is set after config, we'll use that instead |
So you're suggesting to separate the The issue is that the config gets overwritten with the old store path everytime it changes |
|
I meant to get File.ocr_path = GetValue<std::string>("default.ocr-path", File.ocr_path);then at the end let's get const char* env = getenv("TESSDATA_PREFIX");
if (env && env[0] != '\0')
File.ocr_path = env;and then it will be overwritten by |
|
I think it'd be a good idea if you could unset variables through the UI, and also have the config empty by default |
|
unnecessary work for just one config variable |
|
another gross idea could be to simply disable the option in the UI on NixOS |
why not just use this? This can be used on *Nix and Windows |
|
can also avoid removing the convinient freedom to set the ocr-path to something like |
|
so make the env var replace the option? |
From config file yes |
$TESSDATA_PREFIX now supersedes ocr-path
|
@Toni500github check this? |
|
change back to |
|
I'd suggest to remove the linux-only guard since can be used for macOS and windows and other unix systems that oshot perhabs supports accidentally |
|
this should be all good |

This PR:
TESSDATA_PREFIXby default when trying to resolveocr_path.ocr-pathdefinition in the default config, so that environment variable changes can take place normally.Issues: