Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lee Bing Heng] iP #565

Open
wants to merge 41 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
28ad2b8
Add Gradle support
May 24, 2020
ed6d4d2
Bump gradle and lib version
Eclipse-Dominator Aug 5, 2023
b25d3fc
Level-0
starrylight99 Aug 30, 2023
ab429f2
Level-1
starrylight99 Aug 30, 2023
5d0b01b
Level-1
starrylight99 Aug 30, 2023
5cff248
Level-2
starrylight99 Aug 31, 2023
4bcfb6d
Level-3
starrylight99 Aug 31, 2023
5b04fb0
save
starrylight99 Aug 31, 2023
846244f
Level-5
starrylight99 Sep 5, 2023
4d6ba07
Level-6
starrylight99 Sep 5, 2023
148378c
Level-7
starrylight99 Sep 6, 2023
6bd8f78
Added .gitkeep /data
starrylight99 Sep 7, 2023
4928ea2
Level-8
starrylight99 Sep 7, 2023
75cadb5
Merge branch 'add-gradle-support'
starrylight99 Sep 7, 2023
b3d5ded
A-Gradle
starrylight99 Sep 7, 2023
374f03c
A-JUnit
starrylight99 Sep 7, 2023
e54726b
A-Jar
starrylight99 Sep 7, 2023
d3b2b46
A-JavaDoc
starrylight99 Sep 7, 2023
191dc4e
A-CodingStandard
starrylight99 Sep 7, 2023
912cb5f
Level-9
starrylight99 Sep 7, 2023
e11d0a1
A-CheckStyle
starrylight99 Sep 10, 2023
feb6a69
Level-10
starrylight99 Sep 10, 2023
11c0197
Level-10
starrylight99 Sep 22, 2023
70a37ae
A-Assertions
starrylight99 Sep 22, 2023
191b988
Merge pull request #2 from starrylight99/branch-A-Assertions
starrylight99 Sep 22, 2023
5635950
save
starrylight99 Sep 22, 2023
d5d469d
A-CodeQuality
starrylight99 Sep 22, 2023
be0054b
A-CodeQuality
starrylight99 Sep 22, 2023
6d33c7c
Merge pull request #3 from starrylight99/branch-A-CodeQuality
starrylight99 Sep 22, 2023
3cb34ca
Refactored Session.java: Segmented initializeUI
starrylight99 Sep 22, 2023
598ab02
Merge pull request #4 from starrylight99/A-FullCommitMessage
starrylight99 Sep 22, 2023
999e1fb
BCD-Extension
starrylight99 Sep 22, 2023
724ec38
BCD-Extension
starrylight99 Sep 22, 2023
f00ce7a
Merge branch 'master' into branch-BCD-Extension
starrylight99 Sep 22, 2023
6d7c0e0
Merge pull request #5 from starrylight99/branch-BCD-Extension
starrylight99 Sep 22, 2023
f635ed8
A-Release
starrylight99 Sep 22, 2023
93693a1
Merge pull request #6 from starrylight99/branch-A-Release
starrylight99 Sep 22, 2023
e3abefc
A-UserGuide
starrylight99 Oct 4, 2023
31d7187
A-UserGuide
starrylight99 Oct 4, 2023
fafd23e
Ui.png
starrylight99 Oct 4, 2023
72a70f3
Fixed Ui.png name
starrylight99 Oct 4, 2023
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
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ bin/

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

# Java class files
*.class

# Data folder for csv
/data
111 changes: 87 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,87 @@
# 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 11, 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 11** (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.
3. 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
____ _
| _ \ _ _| | _____
| | | | | | | |/ / _ \
| |_| | |_| | < __/
|____/ \__,_|_|\_\___|
```
# Duke User Guide

Welcome to the Duke the Chatbot! This chatbot is designed to help you store and display information about your upcoming events using a Command Line Interface (CLI). Below is a list of available commands and their descriptions:

## Available Commands

### 1. List

- Command: `list`
- Parameters: None
- Description: List all upcoming events.
- Usage: `list`

### 2. Mark

- Command: `mark (i)`
- Parameters:
- `i`: The index of the event to mark (must be an integer).
- Description: Mark the specified event in the list of events.
- Usage: `mark 1` (to mark the first event)

### 3. Unmark

- Command: `unmark (i)`
- Parameters:
- `i`: The index of the event to unmark (must be an integer).
- Description: Unmark the specified event.
- Usage: `unmark 1` (to unmark the first event)

### 4. Todo

- Command: `todo (name)`
- Parameters:
- `name`: The name of the todo event (represented by a string).
- Description: Add a todo event with the provided name.
- Usage: `todo Buy groceries`

### 5. Event

- Command: `event (name) /from (datetime) /to (datetime)`
- Parameters:
- `name`: The name of the event.
- `datetime`: The start and end date and time of the event.
- Description: Add an event with a name, start date, and end date.
- Usage: `event Birthday Party /from 2023-10-15 15:00 /to 2023-10-15 18:00`

### 6. Deadline

- Command: `deadline (name) /by (datetime)`
- Parameters:
- `name`: The name of the deadline event.
- `datetime`: The deadline date and time.
- Description: Add a deadline event with a name and a specified deadline.
- Usage: `deadline Submit Report /by 2023-11-01 23:59`

### 7. Find

- Command: `find (name)`
- Parameters:
- `name`: The keyword to search for within event names.
- Description: Find event names that match the provided string.
- Usage: `find Party`

### 8. Upcoming

- Command: `upcoming`
- Parameters: None
- Description: List all events in ascending order of their datetime.
- Usage: `upcoming`

### 9. Bye

- Command: `bye`
- Parameters: None
- Description: Exit the program.
- Usage: `bye`

## Example Usage

- To list all upcoming events: `list`
- To mark the first event: `mark 1`
- To add a todo event: `todo Buy groceries`
- To add an event with a specific date and time: `event Birthday Party /from 2023-10-15 15:00 /to 2023-10-15 18:00`
- To find events with the keyword "Party" in their names: `find Party`
- To exit the program: `bye`

Feel free to use these commands to manage your upcoming events effectively with the chatbot. Enjoy using Duke!
65 changes: 65 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
plugins {
id 'checkstyle'
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '7.1.2'
}

repositories {
mavenCentral()
}

checkstyle {
toolVersion = '10.2'
}

repositories {
mavenCentral()
}

dependencies {
String javaFxVersion = '17.0.7'

implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-base', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-controls', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-fxml', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-graphics', version: javaFxVersion, classifier: 'linux'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.10.0'
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.10.0'
}

test {
useJUnitPlatform()

testLogging {
events "passed", "skipped", "failed"

showExceptions true
exceptionFormat "full"
showCauses true
showStackTraces true
showStandardStreams = false
}
}

application {
mainClass.set("duke.Duke")
}

shadowJar {
archiveFileName = "duke.jar"
//archiveClassifier = null
//dependsOn("distZip", "distTar")
}

run{
standardInput = System.in
}
Loading