-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
33 lines (25 loc) · 840 Bytes
/
main.cpp
File metadata and controls
33 lines (25 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <iostream>
#include <boost/program_options.hpp>
#include "filter.h"
namespace po = boost::program_options;
int main(int argc, char ** argv)
{
Simplify::FilterOptions filterOptions;
po::options_description opts("Simplify options");
opts.add_options()
("help,h", "Show this help message")
("exclude,x", po::value(&filterOptions.excludes), "Add a directory to exclusion list")
("excludemounts,X", po::bool_switch(&filterOptions.excludeMounts)->default_value(false), "Add all mount points to exclusion list")
;
po::variables_map vm;
po::store(po::command_line_parser(argc, argv).options(opts).run(), vm);
po::notify(vm);
if (vm.count("help")) {
std::cout << opts << std::endl;
return 1;
}
Simplify::Filter filter;
filter.initiailize(filterOptions);
filter.filterStream(std::cin, std::cout);
return 0;
}