Crates.io | tealr_doc_gen |
lib.rs | tealr_doc_gen |
version | 0.3.0 |
source | src |
created_at | 2022-02-20 22:46:16.118701 |
updated_at | 2023-12-15 02:15:26.076911 |
description | A cli tool to create online documentation for apis made with tealr |
homepage | |
repository | |
max_upload_size | |
id | 536007 |
size | 157,995 |
This tool is meant to be used together with tealr and is used to generate online documentation for lua/teal apis created with tealr
https://lenscas.github.io/tealsql/
teal_lua
get compiled to lua
and both versions get embedded.teal_lua
snippets, any errors get logged.The json file needed to generate the documentation can easily be gotten using
use tealr::{
TypeWalker,
};
fn main() {
let types = TypeWalker::new()
.process_type::<crate::TypeYouWantToDocument>()
.process_type<crate::OtherTypeYouWantToDocument>();
let json = serde_json::to_string_pretty(&types).unwrap();
println!("{}",json); //save to a file
}
To install, simply run
cargo install tealr_doc_gen
Cargo will do the rest.
After it is installed, generating the online documentation is done by running
tealr_doc_gen --json path/to/json/file --name yourApiName
--json
/path/to/json/generated/by/tealr
--name
nameOfTheLibrary
--build_folder
What folder to store the generated html pages at (defaults to ./pages
)--root
set if /
will not be the root of the server