Cleaned up the generation of document tree index
[biaweb2.git] / biaweb.cpp
index a50bf01..0d9a3e8 100644 (file)
@@ -8,6 +8,7 @@ int main (int argc, char *argv[]) {
     if (argc == 2)
     {
         std::shared_ptr<DocumentTree> tree (new DocumentTree (argv[1]));
+        tree.get()->set_stub ("");
 
         std::shared_ptr<DocumentTree> a1 (new DocumentTree("Child a1"));
         std::shared_ptr<DocumentTree> a2 (new DocumentTree("Child a2"));
@@ -19,7 +20,7 @@ int main (int argc, char *argv[]) {
         tree.get()->add_child (a1.get());
         std::cout << a3.get()->stub_hierarchy () << a3.get()->get_stub () << std::endl;
         tree.get()->visualize_tree ();
-        tree.get()->create_index ();
+        tree.get()->create_index (convert_title (argv[1]));
     }
     else
         std::cout << "Usage: " << argv[0] << " <main tree>" << std::endl;