Don't dump zip files to stdout.
This commit is contained in:
parent
2ab4705475
commit
3ad4e49e3d
24
src/main.cpp
24
src/main.cpp
|
@ -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";
|
// TODO: Read data from stdin.
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user