Document tree generation to HTML output completed
[biaweb2.git] / biaweb.cpp
index 0d9a3e8..b1c827b 100644 (file)
@@ -14,13 +14,17 @@ int main (int argc, char *argv[]) {
         std::shared_ptr<DocumentTree> a2 (new DocumentTree("Child a2"));
         std::shared_ptr<DocumentTree> a3 (new DocumentTree("Child a3"));
         std::shared_ptr<DocumentTree> a4 (new DocumentTree("Child a4"));
+        std::shared_ptr<Document> d1 (new Document("Test Document", "", 
+                                                ""));
+        d1.get()->set_markdown_content ("# Heading \n\nThis is some text, hello world");
+        a1.get()->add_document (d1.get());
         a3.get()->add_child (a4.get());    
         a1.get()->add_child (a2.get());
         a1.get()->add_child (a3.get());
         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 (convert_title (argv[1]));
+        tree.get()->create_tree_html (convert_title (argv[1]));
     }
     else
         std::cout << "Usage: " << argv[0] << " <main tree>" << std::endl;