Skip to content

Commit

Permalink
Merge pull request #3 from soumyasen1809/master
Browse files Browse the repository at this point in the history
Merge master to main
  • Loading branch information
soumyasen1809 authored Sep 10, 2024
2 parents 908a131 + a99a5d2 commit 32ab930
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 9 deletions.
31 changes: 25 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ RustyTUICalendar is a terminal-based calendar application written in Rust. It le
## Features

- Display a monthly calendar starting from Sunday
- Add, edit, and delete events
- Add and delete events
- Highlight current date
- Add, edit and delete To-Do list
- Add and delete To-Do list
- User-friendly terminal interface

## Installation
Expand All @@ -17,22 +17,41 @@ To install RustyTUICalendar, you need to have Rust and Cargo installed on your s
Clone the repository:

```sh
git clone https://github.com/soumyasen1809/RustyTUICalendar.git
cd RustyTUICalendar
$ git clone https://github.com/soumyasen1809/RustyTUICalendar.git
$ cd RustyTUICalendar
```

Build the project:

```sh
cargo build --release
$ cargo build --release
```

Run the application:

```sh
cargo run
$ cargo run
```

## Features
Press F3 to start typing your commands.

- **Add Events to ToDo or Calendar**: If the input specifies `todo`, it adds the event to the ToDo list. If the input specifies `app`, it adds the appointment to the calendar.
```sh
$ app, 2024-09-14 13:14:50, Appointment Title, Appointment Location
$ todo, true, Todo Title
```
- **Search for an Appointment**: If the input specifies `search`, it searches for the appointment in the calendar for the given date.
```sh
$ find, 2024-09-14
```
- **Jump to Today**: If the input specifies `today`, it sets the calendar date to the current date.
```sh
$ today
```

Additionally, press F1 and F2 to move to previous and next months respectively.

## Contributing

Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.
Expand Down
4 changes: 2 additions & 2 deletions assets/appointments.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
"location": "Lounge C"
},
{
"date": "2024-09-08 15:00:00",
"date": "2024-09-09 15:00:00",
"event_name": "Old Team Meeting",
"location": "Online: https://teams.microsoft.com/l/meetup-join/19%3ameeting_NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2%40thread.v2/0?context=%7b%22Tid%22%3a%22your-tenant-id%22%2c%22Oid%22%3a%22your-object-id%22%7d"
},
{
"date": "2024-09-08 07:09:34",
"date": "2024-09-09 07:09:34",
"event_name": "Have a demo ready",
"location": "Library"
}
Expand Down
4 changes: 3 additions & 1 deletion src/to_do_widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ fn write_user_input_to_json(
}
} else if parts_input.len() == 2 {
// Search for an appointment
if parts_input[0].trim().to_lowercase().contains("find") {
if (parts_input[0].trim().to_lowercase().contains("find"))
|| parts_input[0].trim().to_lowercase().contains("search")
{
if parts_input[1].clone().len() < 19 {
// If less than 19, then it is in NaiveDate format => need to change it to NaiveDateTime
let date_time_formated =
Expand Down

0 comments on commit 32ab930

Please sign in to comment.