/* This file is part of epubgrep. * Copyright © 2021 tastytea * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ #include "options.hpp" #include #include #include #include int main(int argc, char *argv[]) { using std::cout; boost::locale::generator locale_generator; locale_generator.add_messages_path("translations"); locale_generator.add_messages_path("/usr/share/locale"); locale_generator.add_messages_domain("epubgrep"); std::locale::global(locale_generator("")); cout.imbue(std::locale()); auto vm{epubgrep::parse_options(argc, argv)}; if (vm.count("help") + vm.count("version") > 0) { return EXIT_SUCCESS; } cout << "extended-regexp: " << vm.count("extended-regexp") << '\n'; cout << "perl-regexp: " << vm.count("perl-regexp") << '\n'; cout << "ignore-case: " << vm.count("ignore-case") << '\n'; }