Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
bbfab10
renamed chatbot Duke to Sparkle
sweetFish8 Feb 1, 2025
ac4ec14
updated logo to be bigger
sweetFish8 Feb 1, 2025
7718ae1
changed greeting message
sweetFish8 Feb 1, 2025
a79ea25
added echo behavior to Sparkle
sweetFish8 Feb 1, 2025
b9f6cad
Add Task class and marking method
sweetFish8 Feb 6, 2025
fc8da49
Add markAsUndone method to enable unchecking
sweetFish8 Feb 6, 2025
0439574
Revert "Add markAsUndone method to enable unchecking"
sweetFish8 Feb 6, 2025
f41bae3
Add markAsUndone method to Task class
sweetFish8 Feb 6, 2025
212b4c0
Add the function to control tasks as list and mark/unmark them
sweetFish8 Feb 6, 2025
4da7da5
Add styling file to gitignore
sweetFish8 Feb 6, 2025
6ab6da2
Create two subclass of Task
sweetFish8 Feb 6, 2025
c86d7db
Create Event class that extends Task
sweetFish8 Feb 6, 2025
bfd8427
Modify toString of Task class
sweetFish8 Feb 6, 2025
b312a64
Handle every subclass of Task
sweetFish8 Feb 6, 2025
e9c069d
Rewrite logo and refactor command processing
sweetFish8 Feb 14, 2025
ff61e51
Handle index error and fix separator
sweetFish8 Feb 14, 2025
fa98ad4
Change the name of class
sweetFish8 Feb 14, 2025
0fbb321
Create the automation for test
sweetFish8 Feb 14, 2025
0df253b
Refactor error handling: unify exceptions under SparkleException
sweetFish8 Feb 14, 2025
6fe412c
Merge branch 'branch-Level-5'
sweetFish8 Feb 14, 2025
d88ca44
Refactor project structure and packaging
sweetFish8 Feb 14, 2025
9c13e53
Add error handling to deadline and event
sweetFish8 Feb 14, 2025
c1090cf
Adjust paths in runtest.sh to match the updated packaging structure a…
sweetFish8 Feb 14, 2025
7948684
Adjust line length in commit message for better readability
sweetFish8 Feb 14, 2025
3726c58
Delete function to remove tasks and change tasks to Arraylist
sweetFish8 Feb 20, 2025
0db99f7
Add input to test delete function
sweetFish8 Feb 20, 2025
22b9dbf
Implement save function
sweetFish8 Feb 20, 2025
5433eb8
Merge branch 'branch-Level-7'
sweetFish8 Feb 20, 2025
1ecacb0
Implement function to read the file
sweetFish8 Feb 20, 2025
00c0d43
Fix error with reading file
sweetFish8 Feb 20, 2025
2b37b33
Import Gradle for jar file
sweetFish8 Feb 20, 2025
8d977df
Fix spacing and message
sweetFish8 Feb 20, 2025
198bc8c
Remove unnecessary statement
sweetFish8 Feb 20, 2025
43f123e
Fix filepath
sweetFish8 Feb 21, 2025
b63c4f3
OOP implementation
sweetFish8 Mar 14, 2025
89f97c3
Fixed bug in OOP change
sweetFish8 Mar 14, 2025
914953f
LocalDate implementation
sweetFish8 Mar 14, 2025
be76cc5
Find method to search task
sweetFish8 Mar 14, 2025
8f894e7
Revert "LocalDate implementation"
sweetFish8 Mar 14, 2025
8db56e4
Add Javadoc to Sparkle.java
sweetFish8 Mar 14, 2025
a0c4cae
Add Javadoc to task and subclassed
sweetFish8 Mar 14, 2025
a938b98
Merge branch 'master' into branch-Level-8
sweetFish8 Mar 14, 2025
4646e2e
Merge pull request #1 from sweetFish8/branch-Level-8
sweetFish8 Mar 14, 2025
fa80159
Merge branch 'master' into branch-Level-9
sweetFish8 Mar 14, 2025
9383b4f
Merge pull request #2 from sweetFish8/branch-Level-9
sweetFish8 Mar 14, 2025
4a8627b
Add Javadoc to all classes
sweetFish8 Mar 14, 2025
3cf204d
Merge branch 'master' into branch-A-JavaDoc
sweetFish8 Mar 14, 2025
26ddc1a
Merge pull request #3 from sweetFish8/branch-A-JavaDoc
sweetFish8 Mar 14, 2025
1e9da45
Fix error
sweetFish8 Mar 14, 2025
3315512
Add UserGuide
sweetFish8 Mar 14, 2025
202fb3a
Update Readme
sweetFish8 Mar 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ bin/

/text-ui-test/ACTUAL.TXT
text-ui-test/EXPECTED-UNIX.TXT

.vscode/
176 changes: 150 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,150 @@
# Duke project template

This is a project template for a greenfield Java project. It's named after the Java mascot _Duke_. Given below are instructions on how to use it.

## Setting up in Intellij

Prerequisites: JDK 17, update Intellij to the most recent version.

1. Open Intellij (if you are not in the welcome screen, click `File` > `Close Project` to close the existing project first)
1. Open the project into Intellij as follows:
1. Click `Open`.
1. Select the project directory, and click `OK`.
1. If there are any further prompts, accept the defaults.
1. Configure the project to use **JDK 17** (not other versions) as explained in [here](https://www.jetbrains.com/help/idea/sdk.html#set-up-jdk).<br>
In the same dialog, set the **Project language level** field to the `SDK default` option.
1. After that, locate the `src/main/java/Duke.java` file, right-click it, and choose `Run Duke.main()` (if the code editor is showing compile errors, try restarting the IDE). If the setup is correct, you should see something like the below as the output:
```
Hello from
____ _
| _ \ _ _| | _____
| | | | | | | |/ / _ \
| |_| | |_| | < __/
|____/ \__,_|_|\_\___|
```

**Warning:** Keep the `src\main\java` folder as the root folder for Java files (i.e., don't rename those folders or move Java files to another folder outside of this folder path), as this is the default location some tools (e.g., Gradle) expect to find Java files.
# Sparkle User Guide

![Sparkle User Guide Image](https://act-upload.hoyoverse.com/event-ugc-hoyowiki/2024/02/25/127094529/00a75fdab753a244ab93b56d7a53819e_1128020071342605456.png?x-oss-process=image%2Fformat%2Cwebp)

## Introduction
Sparkle is a task management chatbot that helps you keep track of your tasks in a fun and interactive way!

## Features

### Adding ToDos
You can add a todo task using the following command:

**Command:** `todo TASK_NAME`

**Example:**
```
todo Read a book
```

**Expected Output:**
```
Let's make it fun! I've added this task:
[T][ ] Read a book
Looks like you've got X tasks in your list~ Better get moving!
```

### Adding Deadlines
You can add a deadline task using the following command:

**Command:** `deadline TASK_NAME /by DEADLINE`

**Example:**
```
deadline Submit assignment /by Sunday 11:59PM
```

**Expected Output:**
```
Let's make it fun! I've added this task:
[D][ ] Submit assignment (by: Sunday 11:59PM)
Looks like you've got X tasks in your list~ Better get moving!
```

### Adding Events
You can add an event task using the following command:

**Command:** `event TASK_NAME /from START_TIME /to END_TIME`

**Example:**
```
event Team meeting /from Monday 2PM /to Monday 4PM
```

**Expected Output:**
```
Let's make it fun! I've added this task:
[E][ ] Team meeting (from: Monday 2PM to: Monday 4PM)
Looks like you've got X tasks in your list~ Better get moving!
```

### Listing Tasks
You can view all your tasks by using:

**Command:** `list`

**Expected Output:**
```
Here are the tasks in your list~
1. [T][ ] Read a book
2. [D][ ] Submit assignment (by: Sunday 11:59PM)
3. [E][ ] Team meeting (from: Monday 2PM to: Monday 4PM)
```

### Marking a Task as Done
You can mark a task as done using:

**Command:** `mark TASK_NUMBER`

**Example:**
```
mark 1
```

**Expected Output:**
```
Boom! Task's done and dusted~
[T][X] Read a book
```

### Unmarking a Task
You can unmark a task using:

**Command:** `unmark TASK_NUMBER`

**Example:**
```
unmark 1
```

**Expected Output:**
```
Not done yet, but it's still on the radar!
[T][ ] Read a book
```

### Finding Tasks
You can search for tasks that match a specific keyword using the following command:

**Command:** `find KEYWORD`

**Example:**
```
find assignment
```
**Expected Output:**
```
Here are the tasks that match your search~
1. [D][ ] Submit assignment (by: Sunday 11:59PM)

```


### Deleting a Task
You can delete a task using:

**Command:** `delete TASK_NUMBER`

**Example:**
```
delete 2
```

**Expected Output:**
```
Got it! Poof! This task is gone:
[D][ ] Submit assignment (by: Sunday 11:59PM)
Look at that! You've got X tasks left to juggle!
```

### Exiting Sparkle
You can exit the program using:

**Command:** `bye`

**Expected Output:**
```
See you around, Stelle~ Try to stay out of trouble next time!
```

**Enjoy using Sparkle!**
19 changes: 19 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
plugins {
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}

application {
mainClass = "sparkle.core.Sparkle"
}

shadowJar {
archiveFileName = 'sparkle.jar'
}
148 changes: 134 additions & 14 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,150 @@
# Duke User Guide
# Sparkle User Guide

// Update the title above to match the actual product name
![Sparkle User Guide Image](https://act-upload.hoyoverse.com/event-ugc-hoyowiki/2024/02/25/127094529/00a75fdab753a244ab93b56d7a53819e_1128020071342605456.png?x-oss-process=image%2Fformat%2Cwebp)

// Product screenshot goes here
## Introduction
Sparkle is a task management chatbot that helps you keep track of your tasks in a fun and interactive way!

// Product intro goes here
## Features

## Adding deadlines
### Adding ToDos
You can add a todo task using the following command:

// Describe the action and its outcome.
**Command:** `todo TASK_NAME`

// Give examples of usage
**Example:**
```
todo Read a book
```

**Expected Output:**
```
Let's make it fun! I've added this task:
[T][ ] Read a book
Looks like you've got X tasks in your list~ Better get moving!
```

### Adding Deadlines
You can add a deadline task using the following command:

**Command:** `deadline TASK_NAME /by DEADLINE`

**Example:**
```
deadline Submit assignment /by Sunday 11:59PM
```

**Expected Output:**
```
Let's make it fun! I've added this task:
[D][ ] Submit assignment (by: Sunday 11:59PM)
Looks like you've got X tasks in your list~ Better get moving!
```

### Adding Events
You can add an event task using the following command:

Example: `keyword (optional arguments)`
**Command:** `event TASK_NAME /from START_TIME /to END_TIME`

// A description of the expected outcome goes here
**Example:**
```
event Team meeting /from Monday 2PM /to Monday 4PM
```

**Expected Output:**
```
Let's make it fun! I've added this task:
[E][ ] Team meeting (from: Monday 2PM to: Monday 4PM)
Looks like you've got X tasks in your list~ Better get moving!
```

### Listing Tasks
You can view all your tasks by using:

**Command:** `list`

**Expected Output:**
```
expected output
Here are the tasks in your list~
1. [T][ ] Read a book
2. [D][ ] Submit assignment (by: Sunday 11:59PM)
3. [E][ ] Team meeting (from: Monday 2PM to: Monday 4PM)
```

## Feature ABC
### Marking a Task as Done
You can mark a task as done using:

**Command:** `mark TASK_NUMBER`

**Example:**
```
mark 1
```

**Expected Output:**
```
Boom! Task's done and dusted~
[T][X] Read a book
```

// Feature details
### Unmarking a Task
You can unmark a task using:

**Command:** `unmark TASK_NUMBER`

## Feature XYZ
**Example:**
```
unmark 1
```

**Expected Output:**
```
Not done yet, but it's still on the radar!
[T][ ] Read a book
```

### Finding Tasks
You can search for tasks that match a specific keyword using the following command:

**Command:** `find KEYWORD`

**Example:**
```
find assignment
```
**Expected Output:**
```
Here are the tasks that match your search~
1. [D][ ] Submit assignment (by: Sunday 11:59PM)

```


### Deleting a Task
You can delete a task using:

**Command:** `delete TASK_NUMBER`

**Example:**
```
delete 2
```

**Expected Output:**
```
Got it! Poof! This task is gone:
[D][ ] Submit assignment (by: Sunday 11:59PM)
Look at that! You've got X tasks left to juggle!
```

### Exiting Sparkle
You can exit the program using:

**Command:** `bye`

**Expected Output:**
```
See you around, Stelle~ Try to stay out of trouble next time!
```

// Feature details
**Enjoy using Sparkle!**
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading