Skip to content

Commit ca8c46a

Browse files
authored
Merge pull request #402 from dezgeg/add_tool
cal: Add tool
2 parents 02901b2 + f9340c3 commit ca8c46a

File tree

8 files changed

+591
-0
lines changed

8 files changed

+591
-0
lines changed

Cargo.lock

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ uudoc = []
2727

2828
feat_common_core = [
2929
"blockdev",
30+
"cal",
3031
"chcpu",
3132
"ctrlaltdel",
3233
"dmesg",
@@ -48,6 +49,7 @@ feat_common_core = [
4849
]
4950

5051
[workspace.dependencies]
52+
chrono = "0.4"
5153
clap = { version = "4.4", features = ["wrap_help", "cargo"] }
5254
clap_complete = "4.4"
5355
clap_mangen = "0.2"
@@ -92,6 +94,7 @@ uucore = { workspace = true }
9294

9395
#
9496
blockdev = { optional = true, version = "0.0.1", package = "uu_blockdev", path = "src/uu/blockdev" }
97+
cal = { optional = true, version = "0.0.1", package = "uu_cal", path = "src/uu/cal" }
9598
chcpu = { optional = true, version = "0.0.1", package = "uu_chcpu", path = "src/uu/chcpu" }
9699
ctrlaltdel = { optional = true, version = "0.0.1", package = "uu_ctrlaltdel", path = "src/uu/ctrlaltdel" }
97100
dmesg = { optional = true, version = "0.0.1", package = "uu_dmesg", path = "src/uu/dmesg" }

src/uu/cal/Cargo.toml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[package]
2+
name = "uu_cal"
3+
version = "0.0.1"
4+
description = "cal ~ display a calendar"
5+
6+
edition = "2021"
7+
8+
[lib]
9+
path = "src/cal.rs"
10+
11+
[[bin]]
12+
name = "cal"
13+
path = "src/main.rs"
14+
15+
[dependencies]
16+
chrono = { workspace = true }
17+
clap = { workspace = true }
18+
uucore = { workspace = true }

src/uu/cal/cal.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# cal
2+
3+
```
4+
cal [options] [[[day] month] year]
5+
```
6+
7+
Display a calendar

0 commit comments

Comments
 (0)