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/usr/bin/checks-parser" \
|
||||||
> AppDir/AppRun
|
> AppDir/AppRun
|
||||||
|
|
||||||
cp ../../icon.png AppDir/checks-parser
|
cp ../../icon.png AppDir/checks-parser.png
|
||||||
|
|
||||||
chmod +x AppDir/AppRun
|
chmod +x AppDir/AppRun
|
||||||
cp ../../checks-parser AppDir/usr/bin
|
cp ../../checks-parser AppDir/usr/bin
|
||||||
|
|
|
@ -50,7 +50,7 @@ Settings::Settings(std::string path) {
|
||||||
}
|
}
|
||||||
})"_json;
|
})"_json;
|
||||||
|
|
||||||
output << settings;
|
output << settings.dump(4);
|
||||||
output.flush();
|
output.flush();
|
||||||
output.close();
|
output.close();
|
||||||
this->settings = settings;
|
this->settings = settings;
|
||||||
|
@ -70,7 +70,7 @@ void Settings::write_setting(std::string setting, std::string value) {
|
||||||
|
|
||||||
this->settings[setting] = value;
|
this->settings[setting] = value;
|
||||||
|
|
||||||
output << this->settings;
|
output << this->settings.dump(4);
|
||||||
}
|
}
|
||||||
std::string Settings::get_setting(std::string setting) {
|
std::string Settings::get_setting(std::string setting) {
|
||||||
return this->settings[setting];
|
return this->settings[setting];
|
||||||
|
@ -93,5 +93,5 @@ void Settings::alter_setting(std::string setting, std::string value) {
|
||||||
void Settings::flush() {
|
void Settings::flush() {
|
||||||
std::ofstream output(this->settings_file_path, std::fstream::trunc);
|
std::ofstream output(this->settings_file_path, std::fstream::trunc);
|
||||||
|
|
||||||
output << this->settings;
|
output << this->settings.dump(4);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue