@@ -114,6 +114,9 @@ void showHelp(const std::string& name)
114114 << " --table=" << TableClasses::DefaultTableClass << " \n "
115115 << " --row=" << TableClasses::DefaultRowClass << " \n "
116116 << " --cell=" << TableClasses::DefaultCellClass << " \n "
117+ << " --no-open - Usually the program tries to open the generated HTML\n "
118+ << " files in a web browser for viewing. If this option is\n "
119+ << " given, no such attempt is made.\n "
117120 << " --subset-check - Search for messages with texts that are completely\n "
118121 << " contained in other messages, too.\n "
119122 << " --list-from X - List all messages that were sent by user X, where X stands\n "
@@ -136,6 +139,7 @@ int main(int argc, char **argv)
136139
137140 bool doHTML = false ;
138141 HTMLOptions htmlOptions;
142+ bool doNotOpen = false ;
139143
140144 bool searchForSubsets = false ;
141145 std::vector<FilterUser> filters = std::vector<FilterUser>();
@@ -371,6 +375,15 @@ int main(int argc, char **argv)
371375 htmlOptions.tableClasses .cell = TableClasses::DefaultCellClass;
372376 htmlOptions.tableClasses .useClasses = true ;
373377 }// param == std-classes
378+ else if (param == " --no-open" )
379+ {
380+ if (doNotOpen)
381+ {
382+ std::cerr << " Parameter " << param << " must not occur more than once!\n " ;
383+ return rcInvalidParameter;
384+ }
385+ doNotOpen = true ;
386+ }
374387 else if ((param == " --subset-check" ) || (param == " --redundant-check" ))
375388 {
376389 if (searchForSubsets)
@@ -529,6 +542,11 @@ int main(int argc, char **argv)
529542 {
530543 return rc;
531544 }
545+ if (!doNotOpen)
546+ {
547+ // Open first HTML file in browser.
548+ openFirstIndexFile (fm, pmdb::paths::html ());
549+ }
532550 } // if HTML file generation was requested
533551
534552 if (searchForSubsets)
0 commit comments