X-Git-Url: https://harishankar.org/repos/?p=biaweb2.git;a=blobdiff_plain;f=biaweb.cpp;h=b1c827b5efb806d7202194c4d038f57d544d25ff;hp=a50bf015c43aadfd0594044c58715048889bf53b;hb=abd61eb094efbfca05e6fe0f1dd34a3e8e7de7a2;hpb=9dd960dd37c92af1ca6531c72b82849ea59a354c diff --git a/biaweb.cpp b/biaweb.cpp index a50bf01..b1c827b 100644 --- a/biaweb.cpp +++ b/biaweb.cpp @@ -8,18 +8,23 @@ int main (int argc, char *argv[]) { if (argc == 2) { std::shared_ptr tree (new DocumentTree (argv[1])); + tree.get()->set_stub (""); std::shared_ptr a1 (new DocumentTree("Child a1")); std::shared_ptr a2 (new DocumentTree("Child a2")); std::shared_ptr a3 (new DocumentTree("Child a3")); std::shared_ptr a4 (new DocumentTree("Child a4")); + std::shared_ptr 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 (); + tree.get()->create_tree_html (convert_title (argv[1])); } else std::cout << "Usage: " << argv[0] << "
" << std::endl;