Go to the source code of this file.
◆ createOptionParser()
Create the OptionParser of this program.
- Returns
- OptionParser of this program
Definition at line 13 of file main.cpp.
14 std::cerr <<
"createOptionParser : create the option parser :" << std::endl;
16 parser.setExampleLongOption(
"phoenix_tex2html --input=fileInput.tex --output=\"output/Directory\"");
17 parser.setExampleShortOption(
"phoenix_tex2html -i fileInput.tex -o output/Directory");
21 std::string defaultOutputDir(
".");
22 parser.addOption(
"output",
"o", defaultOutputDir,
"output directory where the files will be generated");
24 std::string bibliographyFile(
"");
25 parser.addOption(
"bibliography",
"b", bibliographyFile,
"input bibliography file");
26 std::string includeDir(
".");
27 parser.addOption(
"includedirs",
"I", includeDir,
"list of include directories");
29 parser.addOption(
"mathjax",
"j",
OptionType::NONE,
false,
"enable the MathJax backend instead of the Latex one");
References OptionType::FILENAME, OptionType::NONE, and createReleaseCurl::parser.
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 33 of file main.cpp.
35 std::cerr <<
"createOptionParser : parse the argument" << std::endl;
36 parser.parseArgument(argc, argv);
39 std::string inputFile;
40 defaultMode.
getValue(inputFile,
"input");
41 std::cout <<
"inputFile = '" << inputFile <<
"'" << std::endl;
43 std::string outputDir(
".");
44 defaultMode.
getValue(outputDir,
"output");
49 std::cout <<
"outputDir = '" << outputDir <<
"'" << std::endl;
51 std::string inputBibliography(
"");
52 defaultMode.
getValue(inputBibliography,
"bibliography");
53 std::cout <<
"inputBibliography = '" << inputBibliography <<
"'" << std::endl;
55 std::list<std::string> listInclude;
56 defaultMode.
getValue(listInclude,
"includedirs");
57 std::cout <<
"listInclude :" << std::endl;
58 for(std::list<std::string>::iterator it(listInclude.begin()); it != listInclude.end(); ++it){
59 std::cout <<
"\t" << (*it) << std::endl;
63 std::cout <<
"useMathJax = " << useMathJax << std::endl;
References createOptionParser(), OptionMode::getValue(), OptionMode::isOptionExist(), and createReleaseCurl::parser.