Skip to content

Commit

Permalink
Release
Browse files Browse the repository at this point in the history
  • Loading branch information
cheeyou committed Sep 30, 2019
1 parent 26ca484 commit 1697e91
Show file tree
Hide file tree
Showing 8 changed files with 131 additions and 114 deletions.
86 changes: 0 additions & 86 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,89 +38,3 @@ Duke Increment | Tutorial
* 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.

# **DUKE**- User Guide

## Table of Content
1. Introduction
1. Getting Started
1. Features
1. FAQ

## 1. Introduction:
**DUKE** is a desktop application that allows an individual to **organise his/her daily tasks and expenses** efficiently. While it consists of a Graphical User Interface (GUI) that makes interaction with the user friendly and understandable, **DUKE** is **optimised** for users who prefer to work with a Command Line Interface (CLI) which allows for fast typing and interpretation of the user-given commands.

## 2. Getting Started:
1. Ensure that you have Java 11 or above on your computer
1. Download the latest release of duke.jar here
1. Copy and paste the file to the folder you would like to use as the home folder for your DUKE app
1. Double click the file to start the app. The GUI should appear within a few seconds
1. Type your command in the command box and press “Enter” on your keyboard or “Send” on the GUI to execute it
e.g. Typing **Glossary** and pressing **Enter** will refer you to a list of all helpful commands
1. Refer to Section 3 **Features** for a list of all useful commands

## 3. Features:
### Command Format:
* The **first** word that you type into the command prompt will be the command
* Each command has its respective input format. Refer to our glossary for more details
* Ensure that the command format is correct before pressing **Enter** or clicking **Send**. This line of command will then prompt **DUKE** to respond accordingly
* Commands are **not** case-sensitive

### Commands:
1. View all commands: 'glossary'
* Format: glossary
* Allows you to view a list of all useful commands
1. Add a task:
* 'todo'
* Format: [task details]
* Adds a todo-type task for you
* 'deadline'
* Format: [task details] /by [dd/mm/yyyy] [24hr time format]
* Adds a deadline-type task for you
* 'event'
* Format: [task details] /at [dd/mm/yyyy] [start time(24hr time format)]-[end time(24hr time format)]
* Adds an event-type task for you
1. Delete a task: 'delete'
* Format: delete [n]
* Deletes the nth task in the list
1. Mark a task as done: 'done'
* Format: done [n]
* Marks the nth task in the list as done
1. View all tasks: 'list'
* Format: list
* Lists all available tasks and their done status
1. Find a task: 'find'
* Format: Find [keyword/phrase]
* Lists all available tasks that contains the given keyword or phrase
1. Add an expense: 'spending'
* Format: spending [category] [amount] [description]
* Below is the list of all available categories:
1. Food
1. Transport
1. Education
1. Household
1. Apparel
1. Beauty
1. Health
1. Social
1. Others
1. Delete an expense: 'delexp'
* Format: delexp [category] [n]
* Deletes the nth expense in the list from the given category
1. View all expenses: 'expenses'
* Format: expenses
* Lists all available expenses and their total amount

## 4. FAQs
**Q: Where can I find all the commands?**
* A: Type 'glossary' into the command prompt and click enter. This will print out a list of all useful commands for your reference.
**Q: How do I exit from the application?**
* A: Left-click the red-buttom marked X at the top right hand corner of the application window.
**Q: If I key in a wrong amount for my expense, how can i correct it?**
* A: As of Version 1.0.0, the only way to fo it would be to remove this expense and add it back again. We are working on providing you with an easier way to handle expenses and task editing in Version 2. Stay tuned.**
**Q: What is the difference between a task and an expense?**
* A: Our application provides you with both choices, where a task keeps track of your daily schedule and activities while an expense takes note of your daily spendings.





28 changes: 20 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
id 'java'
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.7'
id 'com.github.johnrengelman.shadow' version '5.1.0'
}

Expand All @@ -16,14 +15,27 @@ application {
// Change this to your main class.
mainClassName = "duke.Launcher"
}

javafx {
version = "11.0.2"
modules = [ 'javafx.controls', 'javafx.fxml' ]
}

dependencies {
String javaFxVersion = '11'
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'
testImplementation 'org.junit.jupiter:junit-jupiter:5.5.0'
}
shadowJar {
archiveBaseName = "Wicky"
archiveBaseName = "duke"
archiveVersion = "1.0.0"
archiveClassifier = null
archiveAppendix = null
Expand Down
12 changes: 12 additions & 0 deletions data/tasks.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
-----
Food
5.0 : rice
Transport
Education
Household
Apparel
80.0 : stuff
Beauty
Health
Social
Others
89 changes: 78 additions & 11 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,87 @@
# User Guide
# **DUKE**- User Guide

## Features
## Table of Content
1. Introduction
1. Getting Started
1. Features
1. FAQ

### Feature 1
Description of feature.
## 1. Introduction:
**DUKE** is a desktop application that allows an individual to **organise his/her daily tasks and expenses** efficiently. While it consists of a *Graphical User Interface (GUI)* that makes interaction with the user friendly and understandable, **DUKE** is **optimised for users** who prefer to work with a *Command Line Interface (CLI)* which allows for fast typing and interpretation of the user-given commands.

## Usage
## 2. Getting Started:
1. Ensure that you have **Java 11** or above on your computer
1. Download the latest release of [duke.jar]() here
1. Copy and paste the file to the folder you would like to use as the home folder for your **DUKE** application
1. Double click the file to start the application. The *GUI* should appear within a few seconds
1. Type your command in the command box and press **Enter** on your keyboard or **Send** on the *GUI* to execute it
e.g. Typing **Glossary** or pressing **Enter** will refer you to a list of all helpful commands
1. Refer to **Section 3. Features** for a list of all useful commands

## 3. Features:
### Command Format:
* The **first word** that you type into the command prompt will be the command
* Each command has its respective input format. Refer to our glossary for more details
* Ensure that the command format is correct before pressing **Enter** or clicking **Send**. This line of command will then prompt **DUKE** to respond accordingly
* Commands are **not** case-sensitive

### Commands:
1. View all commands: 'glossary'
* Format: glossary
* Allows you to view a list of all useful commands
1. Add a task:
* 'todo'
* Format: [task details]
* Adds a todo-type task for you
* 'deadline'
* Format: [task details] /by [dd/mm/yyyy] [24hr time format]
* Adds a deadline-type task for you
* 'event'
* Format: [task details] /at [dd/mm/yyyy] [start time(24hr time format)]-[end time(24hr time format)]
* Adds an event-type task for you
1. Delete a task: 'delete'
* Format: delete [n]
* Deletes the nth task in the list
1. Mark a task as done: 'done'
* Format: done [n]
* Marks the nth task in the list as done
1. View all tasks: 'list'
* Format: list
* Lists all available tasks and their done status
1. Find a task: 'find'
* Format: Find [keyword/phrase]
* Lists all available tasks that contains the given keyword or phrase
1. Add an expense: 'spending'
* Format: spending [category] [amount] [description]
* Below is the list of all available categories:
1. Food
1. Transport
1. Education
1. Household
1. Apparel
1. Beauty
1. Health
1. Social
1. Others
1. Delete an expense: 'delexp'
* Format: delexp [category] [n]
* Deletes the nth expense in the list from the given category
1. View all expenses: 'expenses'
* Format: expenses
* Lists all available expenses and their total amount

## 4. FAQs
* **Q: Where can I find all the commands?**
A: Type 'glossary' into the command prompt and click enter. This will print out a list of all useful commands for your reference.
* **Q: How do I exit from the application?**
A: Left-click the red-buttom marked X at the top right hand corner of the application window.
* **Q: If I key in a wrong amount for my expense, how can i correct it?**
A: As of Version 1.0.0, the only way to fo it would be to remove this expense and add it back again. We are working on providing you with an easier way to handle expenses and task editing in Version 2. Stay tuned.**
* **Q: What is the difference between a task and an expense?**
A: Our application provides you with both choices, where a task keeps track of your daily schedule and activities while an expense takes note of your daily spendings.

### `Keyword` - Describe action

Describe action and its outcome.

Example of usage:

`keyword (optional arguments)`

Expected outcome:

`outcome`
1 change: 1 addition & 0 deletions src/main/java/duke/Duke.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public Duke(String filePath) {
} catch (FileNotFoundException e) {
ui.showLoadingError();
tasks = new TaskList();
listOfAllExpenses = new ExpenseList();
}
}

Expand Down
2 changes: 0 additions & 2 deletions src/main/java/duke/logic/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ public void parse() { //cannot use "|" as a replacement
if (tempArr.length > 1) { //account for the fact that commands like "list" do not have duke.task details
taskDetails = ((String) Array.get(tempArr, 1)).trim();
}
System.out.println(command);
System.out.println(taskDetails);
}

/**
Expand Down
13 changes: 10 additions & 3 deletions src/main/java/duke/logic/Storage.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class Storage {

public Storage(String filePath) {
this.filePath = filePath;
tempExpenseList = null;
}

/**
Expand Down Expand Up @@ -60,7 +61,13 @@ public void write(ArrayList<Task> taskList, ArrayList<ExpenseCategory> expensesL
try {
rewriteFile(this.filePath, "");
} catch (IOException e) {
System.err.println("Error: " + e.getMessage());
File file = new File(this.filePath);
try {
file.getParentFile().mkdir();
file.createNewFile();
} catch (IOException ie) {
System.out.println("error");
}
}
for (Task task : taskList) {
StringBuilder dataBuilder = new StringBuilder();
Expand Down Expand Up @@ -169,11 +176,11 @@ public ArrayList<Task> load() throws FileNotFoundException {
}
}
}
tempExpenseList = expenseListToBeLoaded;
this.tempExpenseList = expenseListToBeLoaded;
return taskListToBeLoaded;
}

public ExpenseList getTempExpenseList() {
return tempExpenseList;
return this.tempExpenseList;
}
}
14 changes: 10 additions & 4 deletions src/test/java/duke/task/TaskTest.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
package duke.task;

import org.junit.jupiter.api.Assertions;
/*
import duke.task.Deadline;
import duke.task.Todo;
import duke.task.Event;
import duke.task.Task;
import org.junit.jupiter.api.Assertions;;
import org.junit.jupiter.api.Test;
import src.test
*/

public class TaskTest {
/*
@Test
public void testStringConversion() {
Assertions.assertEquals("[T][✗] eat", new Todo("eat").toString());
Expand All @@ -15,6 +20,7 @@ public void testStringConversion() {
public void testSetDone() {
Task temp = new Todo("sleep");
temp.setDone();
Assertions.assertEquals(done, temp.isDone());
Assertions.assertEquals(true, temp.isDone());
}
*/
}

0 comments on commit 1697e91

Please sign in to comment.