#own #password #ini-helper

tanzhenhui_code_lib

toolbox for my own

6 releases (3 breaking)

new 0.7.2 Apr 28, 2025
0.6.5 Nov 27, 2024

#8 in #own

Download history 27/week @ 2025-02-19 189/week @ 2025-04-23

189 downloads per month

MIT license

20KB
315 lines

ini_helper

implement example:

use tanzhenhui_code_lib::generate_get_ini_info;
generate_get_ini_info!(bz_dir, input_dir, output_dir, password);

this will read a file named "config.ini" in the same path of your program. in this example,the file will be like this:

config.ini

[common]

  • bz_dir = D:\tool\Bandizip\bz.exe
  • input_dir = D:\BaiduNetdiskDownload\
  • output_dir = D:\BaiduNetdiskDownload\output
  • password = 这是一个中文密码

you can get the info in the other place of your code like this:

use_example:

        let IniInfo {
            bz_dir,
            input_dir,
            output_dir,
            password,
        } = get_ini_info();

and you get four String variable in your code

git_helper

use_example:

use std::path::Path;
use tanzhenhui_code_lib::git_helper;
let path = Path::new(r"D:\PlugInSystem");
git_helper::git_command(path,"git branch -D branch_name");

it's equals to "cd D:\PlugInSystem && git branch -D branch_name"

You can look at the source code and look for some packaged git commands in GitManager what's more, a simplified merge request for gitlab is provided

Dependencies

~9–22MB
~369K SLoC