1 个不稳定版本
0.1.0 | 2022年7月18日 |
---|---|
0.0.0 |
|
#614 in #events
17KB
396 代码行
Chronicle
在命令行中编写您的 chronicle
安装
# from cargo
cargo install chronicle
用法
chron
chron help [SUBCOMMAND]
小贴士:如果这些命令看起来太长,请考虑使用 shell 别名。
# create new chronicle named "code"
# set the file for persisting the chronicle
chron new code /Users/eagr/logs/code.md
# set vim as default editor
chron config --editor "$(which vim)"
# set VS Code as default editor
chron config --editor "$(which code)"
# events willed be inked in reverse chronological order,
# which is the default
chron config --reverse
# in chronological order
chron config --reverse f
# set timestamp formats for date and hms, which adheres to
# https://docs.rs/chrono/0.4/chrono/format/strftime/index.html
chron config --date "%b %e, %Y"
chron config --time "%I:%M %p"
# recommended workflow: draft -> reword -> ink
chron draft code "[Implemented X](...)"
chron reword code
chron ink code
# wipe off draft buffer of "code"
# erased content can be found in $HOME/.chronicle/backup~/
chron erase code
配置
您也可以通过修改默认为
- Unix: $HOME/.chronicle/config.toml
- Windows: %USERPROFILE%\.chronicle\config.toml
# ===== global configuration =====
# editor for rewording
editor = "/usr/bin/vim"
# whether to list events in reverse chronological order,
# which defaults to
reverse = true
# timestamp date format, which defaults to
date = "%Y-%m-%d"
# timestamp hms format, which defaults to
time = "%H:%M"
# ===== per-chronicle configurations =====
# config options specific to chronicle "code",
# which override their global counterpart
[chronicle.code]
# === required fields ===
# path of file for persisting chronicle "code"
store = "/Users/eagr/logs/code.md"
# === optional fields ===
# options below will inherit from their global counterpart
# if you leave them out
reverse = true # or false
date = "..."
time = "..."
许可证
除非另有说明,否则本项目根据 MIT 和 Apache 许可证 2.0 分发。
依赖项
~5–15MB
~194K SLoC