Don't dump zip files to stdout.

This commit is contained in:
tastytea 2021-05-24 05:46:12 +02:00
parent 2ab4705475
commit 3ad4e49e3d
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
1 changed files with 2 additions and 22 deletions

View File

@ -91,28 +91,8 @@ int main(int argc, char *argv[])
}
}
if (vm.count("input-file") > 0)
if (vm.count("input-file") == 0)
{
cout << "\nINPUT FILES:\n";
for (const auto &file : vm["input-file"].as<std::vector<std::string>>())
{
cout << " " << file << ":\n";
try
{
for (const auto &entry : epubgrep::zip::list(file))
{
cout << " " << entry;
cout << "\n CONTENT:\n";
cout << "START" << epubgrep::zip::read_file(file, entry)
<< "END\n";
}
}
catch (const epubgrep::zip::exception &e)
{
cerr << '\n' << translate("ERROR: ") << e.what() << '\n';
cerr << translate("Error while processing EPUB file.") << '\n';
return EXIT_FAILURE;
}
}
// TODO: Read data from stdin.
}
}