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

[Wang Qin] iP #54

Open
wants to merge 93 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
65f72a8
Add support for Gradle workflow
j-lum Aug 6, 2019
0112efe
Add sample checkstyle configuration
j-lum Aug 12, 2019
cfd6da7
Change file mode on `gradle` to be executable
j-lum Aug 18, 2019
6e6ace1
Merge pull request #12 from j-lum/gradle+x
j-lum Aug 18, 2019
a3ca5a4
Add configuration for console applications
j-lum Aug 20, 2019
7b60e81
Merge pull request #13 from j-lum/javaexec
j-lum Aug 21, 2019
c4678f7
JavaFX tutorial: Support cross-platform JARs
j-lum Sep 20, 2019
30efbae
JavaFX tutorial: Support cross-platform JARs [#16]
damithc Oct 7, 2019
a98cf99
v1.0 add echo
wangqinNick Jan 17, 2020
f028311
Extract TextUi class
wangqinNick Jan 22, 2020
6d67bb1
Abstract Parser class, Messages class, Command class
wangqinNick Jan 22, 2020
587ae62
Add add function
wangqinNick Jan 22, 2020
49ef42a
Add list function [Level 2]
wangqinNick Jan 22, 2020
d795532
Add done function [Level 3]
wangqinNick Jan 22, 2020
226493b
Add Todo Task
wangqinNick Jan 23, 2020
4af20dd
Add class Deadline Task
wangqinNick Jan 23, 2020
d9f4039
Add class EventTask
wangqinNick Jan 23, 2020
5ccd523
[Edited] Add class Event Task
wangqinNick Jan 23, 2020
d89e3ea
Add package commands.add
wangqinNick Jan 23, 2020
88ccaac
[Edited] refine package commands.add
wangqinNick Jan 24, 2020
761daa8
Add Text UI Testing [Not Working due to package issues]
wangqinNick Jan 26, 2020
bb6ad8a
Add Help function
wangqinNick Jan 26, 2020
1934726
Add Clear Command
wangqinNick Jan 26, 2020
d9075cd
Add Delete Function [Not Perfect]
wangqinNick Jan 27, 2020
b880add
Add more func to Delete Function
wangqinNick Jan 27, 2020
42fcc41
clean up code
wangqinNick Jan 30, 2020
7da099d
Add Save (to file) [Level 7]
wangqinNick Jan 31, 2020
023f9de
Add Find function (have not edited the format)
wangqinNick Feb 1, 2020
d12b5ae
Improve Find function
wangqinNick Feb 1, 2020
8a1d643
Add Date Parse Only for Deadline Tasks [Level 8 Minimal]
wangqinNick Feb 1, 2020
1ebb042
Improve Date Parse for Deadline Tasks
wangqinNick Feb 1, 2020
3df331f
abstract more methods
wangqinNick Feb 3, 2020
21ae69e
Debug find function (fix auto-clear issue)
wangqinNick Feb 3, 2020
31521de
debug and clean Done / Delete function
wangqinNick Feb 3, 2020
b70463e
Merge branch 'gradle'
wangqinNick Feb 4, 2020
393ce9a
Implement gradle -minimal level
wangqinNick Feb 4, 2020
52a9177
Fixed exceptions-not-handled bug
wangqinNick Feb 5, 2020
984f0ce
implement gradle
wangqinNick Feb 5, 2020
ae1c499
Add echo v1.0
wangqinNick Feb 5, 2020
82fb76e
add echo v1.1
wangqinNick Feb 5, 2020
1040e6e
Add Echo javaFX v1.5
wangqinNick Feb 5, 2020
84a81ca
clean up code
wangqinNick Feb 5, 2020
8ea0311
refactor javaFX methods
wangqinNick Feb 5, 2020
42e31b7
clean up code
wangqinNick Feb 5, 2020
33f3c41
Integrate GUI with Duke (still have bugs) v2.0
wangqinNick Feb 6, 2020
f345eee
clean up
wangqinNick Feb 7, 2020
1302922
Merge branch 'branch-Level-8'
wangqinNick Feb 7, 2020
b03f6a6
Merge branch 'branch-Level-9'
wangqinNick Feb 7, 2020
4a2578d
Add further text-ui
wangqinNick Feb 7, 2020
4a79188
Update test ui file
wangqinNick Feb 7, 2020
c5796c1
clean up
wangqinNick Feb 7, 2020
be00e66
move print functions to message
wangqinNick Feb 7, 2020
c14c810
clean up print functions
wangqinNick Feb 7, 2020
4b5c6ce
Update List function to be compatible with javaFX
wangqinNick Feb 7, 2020
8eb6c95
Merge branch 'branch-javaFX'
wangqinNick Feb 7, 2020
219a22f
Update Find function to be compatible with javaFX
wangqinNick Feb 7, 2020
d0b0db4
Add taskIndex field to Task object
wangqinNick Feb 7, 2020
8319b6b
Add taskID
wangqinNick Feb 8, 2020
52e8c83
Add two .fxml file in resources/view
wangqinNick Feb 8, 2020
8221f37
Add save_json command
wangqinNick Feb 17, 2020
32ff89d
implement read file using gson
wangqinNick Feb 17, 2020
548acb3
clean up code
wangqinNick Feb 17, 2020
3b1aeda
Able to build shadow jar
wangqinNick Feb 17, 2020
66fff65
handle invalid input exception for Add deadline and event command
wangqinNick Feb 18, 2020
8d17754
Add mux for GUI and CLI
wangqinNick Feb 18, 2020
0240dac
clean up
wangqinNick Feb 22, 2020
474cc1b
add dup-check for todo Task
wangqinNick Feb 22, 2020
a133f34
add check Deadline and Event duplicate
wangqinNick Feb 22, 2020
2576d5b
minor changes
wangqinNick Feb 22, 2020
74f10b8
Add color font
wangqinNick Feb 22, 2020
8ea2766
add more advanced display
wangqinNick Feb 22, 2020
b5c89dc
clear screen command + clean up
wangqinNick Feb 22, 2020
ef546f3
clean up
wangqinNick Feb 23, 2020
b403940
clean up CLI
wangqinNick Feb 26, 2020
75fe1d7
further clean up CLI (list)
wangqinNick Feb 26, 2020
b0cd83b
refactor the structure
wangqinNick Feb 28, 2020
8cb50da
ui design
wangqinNick Feb 28, 2020
49c8065
handle incorrect format exception
wangqinNick Feb 28, 2020
fcba7be
add user guide v0.1
wangqinNick Mar 1, 2020
103230c
fix output bug for gui
wangqinNick Mar 1, 2020
b08601e
fix bugs for gui output
wangqinNick Mar 1, 2020
c42b4a8
update output source
wangqinNick Mar 1, 2020
653183d
add image v1.0
wangqinNick Mar 1, 2020
763b336
clean up
wangqinNick Mar 1, 2020
b316034
v2.0 clean up
wangqinNick Mar 1, 2020
700f419
Set theme jekyll-theme-time-machine
wangqinNick Mar 2, 2020
2aefeae
update the correct readme
wangqinNick Mar 2, 2020
dffa9ec
Merge commit '700f419af78c477f71d4f5dc1f44820f8bc0c6d7'
wangqinNick Mar 2, 2020
2c4b046
update the correct picture
wangqinNick Mar 2, 2020
63bfbfb
add more picture
wangqinNick Mar 2, 2020
ec733fa
update picture
wangqinNick Mar 2, 2020
304be96
relife
wangqinNick Mar 5, 2020
a77f1c4
relife 2.0
wangqinNick Mar 5, 2020
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
1 change: 1 addition & 0 deletions .:data:taskManager.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"taskIndex":0,"taskDescription":"read a book","isDone":false,"taskType":"T","taskTime":"-1","taskDeadlineDate":{"year":999999999,"month":12,"day":31}}]
1 change: 1 addition & 0 deletions .:data:taskManager.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
T|N|read a book
274 changes: 235 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,235 @@
# Setting up

**Prerequisites**

* JDK 11
* Recommended: IntelliJ IDE
* Fork this repo to your GitHub account and clone the fork to your computer

**Importing the project into IntelliJ**

1. Open IntelliJ (if you are not in the welcome screen, click `File` > `Close Project` to close the existing project dialog first).
1. Set up the correct JDK version.
* Click `Configure` > `Structure for new Projects` (in older versions of Intellij:`Configure` > `Project Defaults` > `Project Structure`).
* If JDK 11 is listed in the drop down, select it. If it is not, click `New...` and select the directory where you installed JDK 11.
* Click `OK`.
1. Click `Import Project`.
1. Locate the project directory and click `OK`.
1. Select `Create project from existing sources` and click `Next`.
1. Rename the project if you want. Click `Next`.
1. Ensure that your src folder is checked. Keep clicking `Next`.
1. Click `Finish`.

# Tutorials

Duke Increment | Tutorial
---------------|---------------
`A-Gradle` | [Gradle Tutorial](tutorials/gradleTutorial.md)
`A-TextUiTesting` | [Text UI Testing Tutorial](tutorials/textUiTestingTutorial.md)
`Level-10` | JavaFX tutorials:<br>→ [Part 1: Introduction to JavaFX][fx1]<br>→ [Part 2: Creating a GUI for Duke][fx2]<br>→ [Part 3: Interacting with the user][fx3]<br>→ [Part 4: Introduction to FXML][fx4]

[fx1]: <tutorials/javaFxTutorialPart1.md>
[fx2]: <tutorials/javaFxTutorialPart2.md>
[fx3]: <tutorials/javaFxTutorialPart3.md>
[fx4]: <tutorials/javaFxTutorialPart4.md>

# Feedback, Bug Reports

* If you have feedback or bug reports, please post in [se-edu/duke issue tracker](https://github.com/se-edu/duke/issues).
* We welcome pull requests too.

# Kuri - User Guide
By: `Wang Qin` Since: `Feb 2019`


* [1. Introduction](#introduction)
* [2. Quick Start](#quick-start)
* [3. Features](#features)
+ [3.1. Adding a task:](#addtask) `add`
+ [3.2. Listing all tasks:](#list) `list`
+ [3.3. Finding a task by keywords:](#find) `find`
+ [3.4. Deleting a task:](#delete) `delete`
+ [3.5. Delete all tasks in the Kuri task list](#clear) `clear`
+ [3.6. Complete a task:](#complete) `done`
+ [3.7. Clear the screen:](#clear) `clear`
+ [3.8. List all possible functions:](#help) `help`
+ [3.9. Save task list to Json:](#save_json) `save_json`
+ [3.10. Exiting the program:](#exit) `bye`
* [4. FAQ](#faq)
* [5. Command Summary](#command-summary)


<a name="introduction"></a>


## 1. Introduction
<p align="center">
<img src="src/main/resources/images/Screenshot 2020-03-01 at 9.33.27 PM.png">
</p>


Kuri is an app with both graphic user interface and commandline user interface, for those who prefer to use a desktop app to keep track of their to-do lists. More importantly, Duke is **optimized for those who prefer to work with a Command Line Interface (CLI)**.
Jump to [_Section 2, "Quick Start"_](#quick-start) to get started.


<a name="quick-start"></a>

## 2. Quick Start

* 1. Ensure that `Java 11` or above is installed in your Computer.
* 2. Download the latest `kuri.jar` [_here_](https://github.com/JosephLimWeiJie/duke/releases/download/v0.2.0/duke.jar).
* 3. Copy the file to the folder you want to use as the home folder for your Duke.
* 4. Use the `java -jar + absolute file location` command to run the app. It should appear in a few seconds. For example, `java -jar /Users/wangqin/Documents/year2/cs2113T/ip/build/libs/kuri-v1.1.jar`


* 5. Choose the platform you desired for Kuri, graphical user interface (GUI) or command line user interface (CLI).
Type `1` for GUI and `2` for CLI.
<p align="center">
<img src="src/main/resources/images/Screenshot 2020-03-01 at 9.33.41 PM.png">
</p>
* 6. For CLI, type in a command and press `ENTER` to execute it. For e.g. typing `list` and pressing enter will list all your current tasks.
* 7. Some other commands you can try:
* `todo return book`: adds a todo task to return a book
* `deadline Finish a movie /by 2019-12-01T10:00`: adds a deadline task to finish a movie by 1 Dec 2019 at 1000 hrs.
* `event Midnight Party /at Marina Bay Sands`: adds an event task to attend a midnight party at Marina Bay Sands
* `done 1`: Mark the first task as done shown in the current list.
* `bye`: Exits the app
* 7. Refer to [_Section 3, "Features"_](#features) for more details of each command.

For GUI, simply type in the command and click `Enter` button.
<p align="center">
<img src="src/main/resources/images/Screenshot 2020-03-01 at 9.33.55 PM.png">
</p>

<p align="center">
<img src="src/main/resources/images/Screenshot 2020-03-01 at 9.34.00 PM.png">
</p>

PS:
* Since most of the GUI functions and CLI functions are very similar, the following feature list are mainly focused on CLI, but also applied for GUI.

* The app is optimized to run in full-screen-size commandline window.

<a name="features"></a>


## 3. Features


<a name="addtask"></a>

### 3.1 Adding a task: `add`

Adds a task into Duke.


* **Format**:
* `todo TASK_DESCRIPTION`
* `deadline TASK_DESCRIPTION /by DATE_TIME`
* `event TASK_DESCRIPTION /on START_DATE_TIME to END_DATE_TIME`

* **Examples**:
* `todo return book`
* `deadline Thesis submission /by 2020-01-12T23:59`
* `event Wedding Ceremony /on 2020-01-12T11:00 to 2020-01-12T12:00`

<a name="list"></a>

### 3.2. Listing all tasks: `list`

Shows a list of all the tasks in Duke.

**Format**: `list`


<a name="find"></a>

### 3.3 Finding a task: `find`

Finds tasks that contain a given keyword.

**Format** : `find KEYWORD`

**Example**: `find book`

<a name="delete"></a>

### 3.4 Deleting a task: `delete`
Deletes a specified task from Duke.

**Format**: `delete INDEX`

```javascript
* Deletes the task at the specified INDEX.
* The index refers to the index number shown on the displayed task list.
* The index must be a positive number 1,2,3,...
```

<a name="filter"></a>

### 3.5 Delete all tasks in the Kuri task list: `clear`
Filters tasks based on a given DATE.

**Format**: `clear`

**Example**: `clear`

<a name="complete"></a>

### 3.6 Complete a task: `done`

Marks a task as completed at the specified INDEX.

**Format**: `done INDEX`

```javascript
* The index refers to the index number shown on the displayed task list.
* The index must be a positive number 1,2,3,..
```
<a name="exit"></a>

### 3.7 Clear the screen: `clr`

Clear the screen.

**Format**: `clr`


<a name="exit"></a>

### 3.8. List all possible functions: `help`

List all help functions, their usages and their examples.
An interesting fact is not only `help` can make `Kuri` list all possible functions, but also all unrecognized commands.

**Format**: `help`


<a name="exit"></a>

### 3.9. Save task list to Json: `save_json`

Save the current task list in `Kuri` system to a Json file.
It is designed similar as save functions in other editors to avoid unexpected siturations, such as running out battery, program shut down, or even computer shut down.

**Format**: `save_json`

<a name="exit"></a>

### 3.10 Exiting the program: `bye`

Exits the program.

**Format**: `bye`

### 3.11 Warnings:

Shown as "Alert!"

<p align="center">
<img src="src/main/resources/images/Screenshot 2020-03-01 at 9.45.47 PM.png">
</p>

**Format**: `bye`

<a name="faq"></a>

## 4. FAQ

*Q1:* Why the jar file is much larger (100 mega bytes) compared to others?

*A:* Due to the mass use of external libraries, the `Kuri.jar` contains not only the executable program, but also most of the
libraries as well as output file (.json). So that, users do not need to copy the data file (.json) when he wants to use Kuri on another
computer. Only one `Kuri.jar` is needed.

*Q2:* Why there is a text file and also a Json file in the output directory?

*A:* The program only loads data from .json file but it saves to both .json and .txt file. The text file is purely for user to read and the json is mainly used to load task list


<a name="command-summary"></a>

## 5. Command Summary
* Add
* Format:
* `todo TASK_DESCRIPTION`
* `deadline TASK_DESCRIPTION /by DATE_TIME`
* `event TASK_DESCRIPTION /on START_DATE_TIME to END_DATE_TIME`
* Examples:
* `todo return book`
* `deadline Thesis submission /by 2020-01-12T23:59`
* `event Wedding Ceremony /on 2020-01-12T11:00 to 2020-01-12T12:00`
* List: `list`
* Find: `find KEYWORD`
* e.g. `find book`
* Delete: `delete INDEX`
* e.g. `delete 2`
* Complete: `done INDEX`
* e.g. `done 1`
* Clear/Delete all tasks: `clear`
* Clear the screen: `clr`
* Help: `help`
* Save: `save_json`
* Exit: `bye`

74 changes: 74 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
plugins {
id 'java'
id 'application'
//id 'checkstyle'
id 'com.github.johnrengelman.shadow' version '5.1.0'
}

//checkstyle {
// toolVersion = '8.23'
//}

shadowJar {
archiveBaseName = "kuri"
archiveVersion = "v1.1"
archiveClassifier = null
archiveAppendix = null
}

task customFatJar(type: Jar) {
manifest {
attributes 'Main-Class': 'Main'
}
baseName = 'all-in-one-jar'
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
with jar
}

group 'seedu.duke'
version '0.1.0'

repositories {
mavenCentral()
}

dependencies {
String testFxVersion = '4.0.15-alpha'
String jUnitVersion = '5.4.0'
String javaFxVersion = '11'

//config the jar to Mavern library
implementation 'org.fusesource.jansi:jansi:1.18'
implementation 'com.google.code.gson:gson:2.8.6'
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'
implementation group: 'org.openjfx', name: 'javafx-media', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-media', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-media', version: javaFxVersion, classifier: 'linux'
implementation group: 'org.openjfx', name: 'javafx-web', version: javaFxVersion, classifier: 'win'
implementation group: 'org.openjfx', name: 'javafx-web', version: javaFxVersion, classifier: 'mac'
implementation group: 'org.openjfx', name: 'javafx-web', version: javaFxVersion, classifier: 'linux'
}

application {
// Change this to your main class.
mainClassName = 'sample.Main'
}

run {
standardInput = System.in
}

configurations {
runtimeLibraries
}
Loading