diff --git a/DataFile.txt b/DataFile.txt new file mode 100644 index 0000000000..e51d96b4f6 --- /dev/null +++ b/DataFile.txt @@ -0,0 +1 @@ +Wow..much emptiness diff --git a/Updates.txt b/Updates.txt index c2d09cfd1d..93e334bb48 100644 --- a/Updates.txt +++ b/Updates.txt @@ -240,3 +240,9 @@ Things maybe wanted to implement 2. Time bot has been running Seperate usercommands + +Bug fixes +Update 1-1 +Fix bug where bot dont save memory when closed +Fix bug where cannot see past certain amount of items + diff --git a/docs/README.md b/docs/README.md index 6200c5ad6a..50db1e8c35 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,46 +1,57 @@ # User Guide +This is a brief introduction on how to use "Toki Toki Task Bot". -##What is Duke? -Duke is a task bot build to keep track of all your task and schedules. + +## What is Duke? +Duke is a task bot built to keep track of all your task and schedules. Users can add and delete their tasks and Duke will keep track of all your task for you. -##Who is Yuri? -![Image of Yuki](https://github.com/Deunitato/duke/blob/master/src/main/resources/images/meanGirl.jpeg) -Yuri is personality build on top of Duke, the original bot. Yuri aims to ensure that you as a user understand her pain of keeping track of all your task. Even thou she is supposed to track the task for you, she will not hesitate to express her displeasure at your laziness and irresponsibility in handling your own to do list. +## Who is Yuri? +![Image of Yuki](https://github.com/Deunitato/duke/blob/master/src/main/resources/images/meanGirl.jpeg?raw=true) + + +Yuri is personality built on top of Duke, the original bot. Yuri aims to ensure that you as a user understand her pain of keeping track of all your task. +Even though she is supposed to track the task for you, she will not hesitate to express her displeasure at your laziness and irresponsibility in handling your own to do list. -## Installing the Software +## Installing the Doki Doki Task Bot Navigate to [github Releases](https://github.com/Deunitato/duke/releases) and download the latest release. Place the jar file into a new folder. Opening the Jar file will show a welcome text from YURI. -![Image of startup] (https://i.imgur.com/WZ1yERF.png) -## Features +![Image of startup](https://i.imgur.com/WZ1yERF.png) -### Add and delete -Add your own tasks/deadlines/events +## Features -### List your own tasks +#### Create your own tasks + 1. Create todo tasks + 2. Create event tasks + 3. Create deadline tasks +#### Organising your task + 1. Listing + 2. Mark your tasks as done + 3. Find tasks + 4. Delete tasks + +#### List your own tasks Ask Yuri to display the task that you have to do -### Check your statistic +#### Check your statistics Yuri will also keep track of things that you did within the day and week. -### Tsundere Personality -Yuri will "hate" your laziness but still feel compled to serve you as your personal secretary. + 1. Check the tasks done today/this week + 2. Check number of types done + 3. Check the task that expired +#### Tsundere Personality +Yuri will "hate" your laziness but still feel compelled to serve you as your personal secretary. -## Usage - -Basic Usage of Yuri -### `bye` - Saves Yuri memory -Yuri requires you to say bye for her to remember what you say. - -Example of usage: +## Usage -`bye` +Basic commands that Yuri will respond to. +### Creating your own tasks -### `TODO` - Creates an todo task +#### `TODO` - Creates an todo task Adds a TODO Tasks into your list @@ -50,35 +61,45 @@ Example of usage: Expected outcome: -`sighs...am I your slave again?` +`sighssss...am I your slave again?` -### `Event` - Creates an event task +#### `Event` - Creates an event task Creates a event and adds it into your list Yuri also requires the date of the event as denoted by /at Example of usage: -`event Anime Matsuri /at 12-01-2020` +`event Anime Matsuri /at 12/01/2020` + +`event Anime Matsuri /at 12/01/2020 1200` + +`event Anime Matsuri /at 1200` Expected outcome: -`sighs...am I your slave again?` +`sighsssss...am I your slave again?` -### `Deadline` - Creates an deadline +#### `Deadline` - Creates an deadline Creates a deadline and adds it into your list Yuri also requires the date of the event as denoted by /by Example of usage: -`event Homework /at 12-01-2020` +`event Homework /at 12/01/2020` + +`event Homework /at 1200` + +`event Homework /at 12/01/2020 1200` Expected outcome: -`sighs...am I your slave again?` +`sighsssss...am I your slave again?` + +### Organising your tasks -### `list` - Shows your list bucket +#### `list` - Shows your list bucket Displays the list of task that you current have. @@ -87,7 +108,7 @@ Example of usage: `list` -### `Done` - Marks task as done +#### `Done` - Marks task as done Marks the task signified by ID as done @@ -99,18 +120,8 @@ Expected outcome: `Okay whatever.. so you have completed this item.. so what? Marking item 1 as done ` -### `Stats` - List out all the stats command -Shows the list of stats command you could use. -Examples are - 1. Expired - list all the expired tasks - 2. Week - List the tasks you have completed in the week - -Example of usage: - -`stats` - -### `Find` - Searches for a task +#### `Find` - Searches for a task Searches for tasks in your list @@ -119,11 +130,14 @@ Example of usage: `find home` Expected outcome: + `Found this task in total:` -` 1. [T][X] Homework` + +` 1. [T][✘] Homework` + `Found in total 1 tasks` -### `Delete` - Deletes your task +#### `Delete` - Deletes your task Totally remove all records of your tasks @@ -135,8 +149,20 @@ Expected outcome: `Erasing your tracks are you?` +### Checking your statistics + +### `Stats` - List out all the stats command + +Shows the list of stats command you could use. +Examples of commands are + 1. `Expired` - list all the expired tasks + 2. `Week` - List the tasks you have completed in the week + +Example of usage: + +`stats` -#Sample Screenshots of Yuri +# Sample Screenshots of Yuri ## Adding Tasks diff --git a/docs/UI.PNG b/docs/UI.PNG new file mode 100644 index 0000000000..1287819984 Binary files /dev/null and b/docs/UI.PNG differ diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 0000000000..3397c9a492 --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-architect \ No newline at end of file diff --git a/memory.txt b/memory.txt index 1fe0030a3d..4fefa25f2a 100644 --- a/memory.txt +++ b/memory.txt @@ -2,5 +2,5 @@ deadline~true~oooo /by 10/02/2020 1200~11/2/2020 todo~false~apple~1/1/1 deadline~true~d1 /by 12/01/2020~12/2/2020 todo~true~one more~12/2/2020 -todo~false~eeee~1/1/1 -todo~false~mytask~1/1/1 +todo~false~to test delete button~1/1/1 +event~false~anime matsuri /at 12/01/2020~1/1/1 diff --git a/src/main/java/database/Storage.java b/src/main/java/database/Storage.java index 22e8f7ed0c..7e92f4a4e2 100644 --- a/src/main/java/database/Storage.java +++ b/src/main/java/database/Storage.java @@ -27,7 +27,7 @@ public class Storage { */ public static void memoryInit() { try { - file = new File("memory.txt"); + file = new File("DataFile.txt"); if (file.createNewFile()) { System.out.println("Init new memory"); } else { @@ -74,6 +74,7 @@ public static void saveMemory() throws DukeException { if (mylist.size() == 0) { overwrite("Wow..much emptiness"); + assert mylist.size() == 0 : " Must be 0"; } for (Task t: mylist) { String[] splitted = t.toString().split(" ", 3); diff --git a/src/main/java/duke/DukeInit.java b/src/main/java/duke/DukeInit.java index 7f0012610f..621b12d9de 100644 --- a/src/main/java/duke/DukeInit.java +++ b/src/main/java/duke/DukeInit.java @@ -13,15 +13,11 @@ public class DukeInit { + "| |_| | |_| | < __/\n" + "|____/ \\__,_|_|\\_\\___|\n";*/ //got it from some text generator - private static String logo = "\n" + - "__ __ _ _ ______ _____ \n" + - "\\ \\ / /| | | || ___ \\|_ _|\n" + - " \\ V / | | | || |_/ / | | \n" + - " \\ / | | | || / | | \n" + - " | | | |_| || |\\ \\ _| |_ \n" + - " \\_/ \\___/ \\_| \\_| \\___/ \n" + - " \n" + - " "; + private static String logo = " _ _ _ _ ___ _ \n" + + " | | | | | | | . \\ | |\n" + + " \\ / | ' | | / | |\n" + + " |_| `___' |_\\_\\ |_|\n" + + " \n"; /** * Initalises bot. */ diff --git a/src/main/java/duke/Main.java b/src/main/java/duke/Main.java index d980b24a1e..7d5e28a190 100644 --- a/src/main/java/duke/Main.java +++ b/src/main/java/duke/Main.java @@ -2,6 +2,9 @@ import java.io.IOException; +import commands.CommandInvoker; +import database.Storage; + import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Scene; @@ -38,4 +41,10 @@ public void start(Stage stage) { } } + @Override + public void stop() throws Exception { + Storage.saveMemory(); + CommandInvoker.stop(); + super.stop(); + } } diff --git a/src/main/resources/view/DialogBox.fxml b/src/main/resources/view/DialogBox.fxml index 98e64a4dc8..6759a68721 100644 --- a/src/main/resources/view/DialogBox.fxml +++ b/src/main/resources/view/DialogBox.fxml @@ -9,7 +9,7 @@ -