From: Benjamin Mako Hill Date: Fri, 11 Apr 2014 22:29:40 +0000 (-0700) Subject: change diff regex options from -n and -r to -N and -R X-Git-Url: https://projects.mako.cc/source/wikiq/commitdiff_plain/61ee7626135a5cd0b1379448cc967d3e9022852c change diff regex options from -n and -r to -N and -R --- diff --git a/wikiq.cpp b/wikiq.cpp index dfa7251..0343dd3 100644 --- a/wikiq.cpp +++ b/wikiq.cpp @@ -56,9 +56,14 @@ typedef struct { char *comment; char *text; vector last_text_tokens; + + // title regexes vector title_regexes; + + // regexes for looking within diffs vector diff_regex_names; vector diff_regexes; + map revision_md5; // used for detecting reversions // track string size of the elements, to prevent O(N^2) processing in charhndl @@ -507,8 +512,8 @@ void print_usage(char* argv[]) { << endl << "options:" << endl << " -v verbose mode prints text and comments after each line of tab separated data" << endl - << " -n name of the following regex (e.g. -n name -r \"...\")" << endl - << " -r regex to check against additions and deletions" << endl + << " -N name of the following regex for diffs (e.g. -N name -R \"...\")" << endl + << " -R regex to check against diffs (i.e., additions and deletions)" << endl << " -t parse revisions only from pages whose titles match regex(es)" << endl << endl << "Takes a wikimedia data dump XML stream on standard in, and produces" << endl @@ -549,10 +554,10 @@ main(int argc, char *argv[]) case 'v': output_type = FULL; break; - case 'n': + case 'N': diff_regex_name = optarg; break; - case 'r': + case 'R': data.diff_regexes.push_back(pcrecpp::RE(optarg, pcrecpp::UTF8())); data.diff_regex_names.push_back(diff_regex_name); if (!diff_regex_name.empty()) {