#manager #relationship #database #io #operations #sentences-tags #sentence-tag

app stdbm

stdbm - 句子标签数据库管理器:简单的具有句子标签关系的数据库管理器

4个版本

0.0.4 2022年6月6日
0.0.3 2022年6月5日
0.0.2 2022年5月8日
0.0.1 2022年4月27日

数据库实现中排名202

Apache-2.0

19KB
421 代码行

stdbm

句子标签数据库管理器

Crates.io Crates.io License Build Status Contributors

关于

简单的具有句子标签关系的数据库管理器

  • 句子标签关系为1:N;
  • 使用csv文件进行I/O操作。

用法

stdbm 
Sentences-tags database manager

USAGE:
    stdbm <SUBCOMMAND>

OPTIONS:
    -h, --help    Print help information

SUBCOMMANDS:
    add              Add new register (to either sentences or tags)
    filter-string    Filter and display datatable registers which contain filter_string
    filter-tag       Filter and display sentences which are related to tag
    help             Print this message or the help of the given subcommand(s)
    link             Link sentence and tag
    list             List registers of datatable
    rm               Remove register by id
    update           Update register value by id

默认配置文件位于 config/default.toml -- 当前内容

config_type = "toml"

[data_io]
data_file_type = "csv"
sentences = "assets/sentences.csv"
tags = "assets/tags.csv"
sentences_tags = "assets/sentences_tags.csv"

文件结构

.
├── .github
│   ├── ISSUE_TEMPLATE
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   └── workflows
│       └── ci.yml
├── .gitignore
├── Cargo.toml
├── LICENSE.md
├── README.md
├── assets
│   ├── sentences.csv
│   ├── sentences_tags.csv
│   └── tags.csv
├── config
│   └── default.toml
└── src
    ├── data_structures.rs
    ├── db_operations.rs
    ├── settings.rs
    └── stdbm.rs

许可证

许可协议:Apache 2.0.

开发

创建新标签并运行CI

CI管道 (.github/workflows/ci.yml) 在每次推送新标签时运行。

要推送新的git标签,可以使用以下命令

git tag v<MAJOR>.<MINOR>.<PATCH> && git push origin --tag

例如

git tag v0.1.0 && git push origin --tag

[待办事项] 当前待办事项

  • 开发缺失的功能
    • 更新记录
    • 删除记录
  • 整体改进 - 良好实践
    • 添加测试
    • 提高函数的可重用性

依赖关系

~5.5MB
~95K SLoC