pretty-printing settings.json
This commit is contained in:
parent
988dc0e133
commit
cca20abbfd
|
@ -21,7 +21,7 @@ export TESSDATA_PREFIX=\$APPDIR/usr/share/tesseract-ocr/4.00/tessdata
|
|||
\$APPDIR/usr/bin/checks-parser" \
|
||||
> AppDir/AppRun
|
||||
|
||||
cp ../../icon.png AppDir/checks-parser
|
||||
cp ../../icon.png AppDir/checks-parser.png
|
||||
|
||||
chmod +x AppDir/AppRun
|
||||
cp ../../checks-parser AppDir/usr/bin
|
||||
|
|
|
@ -50,7 +50,7 @@ Settings::Settings(std::string path) {
|
|||
}
|
||||
})"_json;
|
||||
|
||||
output << settings;
|
||||
output << settings.dump(4);
|
||||
output.flush();
|
||||
output.close();
|
||||
this->settings = settings;
|
||||
|
@ -70,7 +70,7 @@ void Settings::write_setting(std::string setting, std::string value) {
|
|||
|
||||
this->settings[setting] = value;
|
||||
|
||||
output << this->settings;
|
||||
output << this->settings.dump(4);
|
||||
}
|
||||
std::string Settings::get_setting(std::string setting) {
|
||||
return this->settings[setting];
|
||||
|
@ -93,5 +93,5 @@ void Settings::alter_setting(std::string setting, std::string value) {
|
|||
void Settings::flush() {
|
||||
std::ofstream output(this->settings_file_path, std::fstream::trunc);
|
||||
|
||||
output << this->settings;
|
||||
output << this->settings.dump(4);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue