X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fappli%2FbbRegenerateBoxesLists%2FbbRegenerateBoxesLists.cpp;h=b981604ebe418ca462d1ba3a3ecc57a25d986529;hb=a16b50b85de5ca6a4dfdfbc5656b490e0d358f52;hp=5f6612456e7aafcb1c52520b155a7faa39667068;hpb=b838e74e8b1e67f28442e6394f9220f41a7d546a;p=bbtk.git diff --git a/kernel/appli/bbRegenerateBoxesLists/bbRegenerateBoxesLists.cpp b/kernel/appli/bbRegenerateBoxesLists/bbRegenerateBoxesLists.cpp index 5f66124..b981604 100644 --- a/kernel/appli/bbRegenerateBoxesLists/bbRegenerateBoxesLists.cpp +++ b/kernel/appli/bbRegenerateBoxesLists/bbRegenerateBoxesLists.cpp @@ -5,25 +5,45 @@ //========================================================================== int main(int argc, char **argv) { - - bbtk::Interpreter::Pointer I = bbtk::Interpreter::New(); - I->SetCommandLine(true); - I->SetThrow(false); - - - std::string doc_path = bbtk::ConfigurationFile::GetInstance().Get_doc_path(); - doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator(); - doc_path += "bbdoc"; - doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator(); - - I->InterpretLine( "exec freeze"); - I->InterpretLine( "include *"); - I->GetExecuter()->GetFactory()->CreateHtmlIndex(bbtk::Factory::Initials,doc_path + "index-alpha.html"); + if (argc>1) + { + if (argv[1][1]=='q') + bbtk::MessageManager::SetMessageLevel("max",0); + else if (argv[1][1]=='v') + bbtk::MessageManager::SetMessageLevel("all",9); + else + { + std::cout << "usage : bbRegenerateBoxesLists [-q|-v] (quiet or verbose)" << std::endl; + return 0; + } + } + + try + { + bbtk::Interpreter::Pointer I = bbtk::Interpreter::New(); + I->SetCommandLine(true); + I->SetThrow(false); + + + std::string doc_path = bbtk::ConfigurationFile::GetInstance().Get_doc_path(); + doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator(); + doc_path += "bbdoc"; + doc_path += bbtk::ConfigurationFile::GetInstance().Get_file_separator(); + + I->InterpretLine( "exec freeze"); + I->InterpretLine( "include *"); + I->GetExecuter()->GetFactory()->CreateHtmlIndex(bbtk::Factory::Initials,doc_path + "index-alpha.html"); I->GetExecuter()->GetFactory()->CreateHtmlIndex(bbtk::Factory::Packages,doc_path + "index-package.html"); I->GetExecuter()->GetFactory()->CreateHtmlIndex(bbtk::Factory::Categories,doc_path + "index-category.html"); I->GetExecuter()->GetFactory()->CreateHtmlIndex(bbtk::Factory::Adaptors,doc_path + "index-adaptors.html"); - - return 0; + + } + catch (bbtk::Exception e) + { + std::cout << "* ERROR : "<