Skip to content

Commit

Permalink
chore: adding crate package (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurhenrique committed Apr 24, 2021
1 parent 0e2a65e commit 6a22932
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
[package]
name = "calendar"
name = "rustical"
version = "0.1.0"
authors = ["Arthur Henrique <arthur393@gmail.com>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
description = "⚡️ Lightning-fast and minimal calendar command line. It's similar to `cal` but simpler and uglier. Written in Rust 🦀"
readme = "README.md"
repository = "https://github.com/arthurhenrique/rustical"
license-file = "LICENSE"
keywords = ["calendar", "cal"]
categories = ["command-line-utilities"]

[dependencies]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Arthur Henrique

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
23 changes: 10 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
# rustical

it's similar to `cal` cli but simpler and uglier.
⚡️ Lightning-fast and minimal calendar command line. It's similar to `cal`.
Written in Rust 🦀

## dependencies

+ rust

## usage
## How Can Install?

```sh
cargo run <year>
$ cargo install rustical
```

## sample
## Usage

![usage](./doc/calendar-rust.png)
```sh
$ rustical <year>
```

## todo list
## Hands On

+ [ ] display months side by side (column 3 row 4 by default)
+ [ ] tests
+ [ ] create crate package
![hands-on](./doc/rustical.gif)
Binary file removed doc/calendar-rust.png
Binary file not shown.
Binary file added doc/rustical.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ fn main() {
println!("debug: {}", days_by_date(30, 3, 2021, m.clone(), y));
}

println!(" {} ", year);
println!(" {}", year);
for month in 1..13 {
println!(" --{:02}-- ", month);
println!(" Su Mo Tu We Th Fr Sa ");
println!(" --{:02}--", month);
println!(" Su Mo Tu We Th Fr Sa");
for day in 1..months[month] + 1 {
// display trough first day
if day == 1 {
Expand Down

0 comments on commit 6a22932

Please sign in to comment.