No description
Find a file
2025-09-10 13:58:33 +07:00
lib update gitignore and sync_file_list doc 2025-09-09 15:19:50 +07:00
src add more debug 2025-09-10 13:58:33 +07:00
.gitignore update gitignore and sync_file_list doc 2025-09-09 15:19:50 +07:00
Cargo.lock add copy function 2025-09-10 10:25:21 +07:00
Cargo.toml add copy function 2025-09-10 10:25:21 +07:00
libfilesGuide.png add deps and some guide 2025-09-09 15:26:00 +07:00
README.md add copy function 2025-09-10 10:25:21 +07:00

libtbr

libtbr is swiss-knife toolbox for Taobin project.

cargo add --git https://gitlab.forthrd.io/Pakin/libtbr.git
cargo update

Examples

Initialize Config

use libtbr::recipe_functions::common;

// this read file `.tbcfg` in the current directory
let cfg = common::get_config();

let recipe_dir = cfg.get("RECIPE_DIR").unwrap();

Get recipe from specific country (latest)

...
let latest_versions = grep_latest_versions(recipe_dir).unwrap();

// try get malaysia recipe, may fail if country does not exist
let mys_version = latest_versions.get("mys");
// try to create malaysia recipe model
let mys_recipe_model = common::create_recipe_model_from_file(common::create_recipe_path(
    "mys",
    *mys_version.unwrap(),
));

...

...WIP