make the parser 2 pass system

- first run parser with --download
- then run the exif script
- finally run parser without any flags
This commit is contained in:
Ashik K 2023-03-11 15:18:01 +01:00
parent cfd21da55b
commit 3abcdabce9
1 changed files with 70 additions and 67 deletions

View File

@ -137,6 +137,7 @@ int main(int argc, char **argv)
if (subjv.IsArray()) {
for (auto i = 0; i<subjv.GetArray().Size(); i++) {
subjects += subjv[i].GetString();
subjects += " ";
}
std::replace( description.begin(), description.end(), ',', ':');
std::replace( description.begin(), description.end(), '\n', ' ');
@ -175,6 +176,7 @@ int main(int argc, char **argv)
}
}
if (!download_mode) {
if (is_cc_license) {
char exif_file[128];
snprintf(exif_file, sizeof exif_file, "%s-%s.jpeg.exif.json", article_id.c_str(), mediaid.c_str());
@ -254,6 +256,7 @@ int main(int argc, char **argv)
}
}
}
}
out_file1.close();
return 0;
}