Giter Club home page Giter Club logo

ip's Introduction

Plaudern User Guide

Screenshot of Plaudern

Plaudern is a task management application that allows users to record their upcoming tasks and update tasks' states. It is designed to be simple and easy to use, and is in the form of an interactive chatbot which makes the communication more interesting.

Quick Start

  1. Ensure you have Java 11 or above installed in your Computer.
  2. Download the latest plaudern.jar from here.
  3. Copy the file to the folder you want to use as the home folder for Plaudern.
  4. Run the file using the command java -jar plaudern.jar in the terminal.

Features

Adding a todo task: todo <task description>

Todo tasks are tasks without date to finish or start.
Examples:

todo read CS2103T textbook

Sample output:

Got it. I've added this task:
[T][ ] read CS2103T textbook
Now you have 1 tasks in the list.

Adding a deadline task: deadline <task description> /by <yyyy-mm-dd>

Deadline tasks are tasks with a date to finish.
Examples:

deadline submit report /by 2023-03-10

Sample output:

Got it. I've added this task:
[D][ ] submit report (by: Mar 10 2023)
Now you have 2 tasks in the list.

Adding an event task: event <task description> /from <yyyy-mm-dd> /to <yyyy-mm-dd>

Event tasks are tasks with a date to start and end.
Examples:

event finish math homework /from 2022-11-13 /to 2022-11-14

Sample output:

Got it. I've added this task:
[E][ ] finish math homework (from: Nov 13 2022 to: Nov 14 2022)
Now you have 3 tasks in the list.

Marking a task as done: mark <task number>

Mark a task as done.
Examples:

mark 1

Sample output:

Nice! I've marked this task as done:
[T][X] read CS2103T textbook

Unmarking a task as done: unmark <task number>

Unmark a task as done.
Examples:

unmark 1

Sample output:

Noted. I've marked this task as undone:
[T][ ] read CS2103T textbook

Deleting a task: delete <task number>

Delete a task from the task list.
Examples:

delete 1

Sample output:

Noted. I've removed this task:
[T][ ] read CS2103T textbook
Now you have 2 tasks in the list.

Finding tasks by keyword: find <keyword>

Find tasks by keyword in the task content.
Examples:

find homework

Sample output:

Here are the matching tasks in your list:
1. [E][ ] finish math homework (from: Nov 13 2022 to: Nov 14 2022)

Listing all tasks: list

List all tasks in the task list.
Sample output:

Here are the tasks in your list:
1. [T][ ] read CS2103T textbook
2. [D][ ] submit report (by: Mar 10 2023)
3. [E][ ] finish math homework (from: Nov 13 2022 to: Nov 14 2022)

Exiting the application: bye

Exit the application after 2 seconds.
Sample output:

Bye. Hope to see you again soon!

Displaying most recent tasks upon entering the application

When user enters the application, the 2 unmarked tasks with the most recent due will be displayed.
Sample output:

==Reminder==
Those tasks are due next:
1. [D][ ] submit report (by: Mar 10 2023)
2. [E][ ] finish math homework (from: Nov 13 2022 to: Nov 14 2022)

Saving the data

The data will be saved in the hard disk in the form of a txt file automatically after any command that changes the data. There is no need to save manually.

Loading the data

The data will be loaded from the txt file in the hard disk when the application starts up.

Note

If it is the first time the application starts up, the application will automatically create the data file for storage.

Caution

DO NOT CHANGE THE DATA FILE MANUALLY: If the format of data in the data file is invalid, Plaudern will not be able to load the data and will require the user to delete the data file manually.

Additional notes about commands

  • Usage of the special character | is strictly prohibited in the command.
  • Commands are case-insensitive.
  • Words in <angle brackets> are the parameters to be supplied by the user.
  • <task number> is 1-based integer index of the task in the task list.
  • Date format: yyyy-mm-dd
  • mark and unmark commands can be done multiple times on the same task without causing any error.

Warning

  • No preceding space is allowed in the command. For example, todo read book is invalid.
  • No preceding space is allowed before the date in the command. For example, deadline submit report /by 2023-03-10 is invalid.

ip's People

Contributors

ella-e avatar j-lum avatar damithc avatar seanleong339 avatar jiachen247 avatar eclipse-dominator avatar

ip's Issues

Sharing iP code quality feedback [for @Ella-e]

@Ella-e We did an automated analysis of your code to detect potential areas to improve the code quality. We are sharing the results below, to help you improve the iP code further.

IMPORTANT: Note that the script looked for just a few easy-to-detect problems only, and at-most three example are given i.e., there can be other areas/places to improve.

Aspect: Tab Usage

No easy-to-detect issues ๐Ÿ‘

Aspect: Naming boolean variables/methods

Example from src/main/java/duke/tasks/Task.java lines 7-7:

    private Boolean status;

Suggestion: Follow the given naming convention for boolean variables/methods (e.g., use a boolean-sounding prefix).You may ignore the above if you think the name already follows the convention (the script can report false positives in some cases)

Aspect: Brace Style

No easy-to-detect issues ๐Ÿ‘

Aspect: Package Name Style

No easy-to-detect issues ๐Ÿ‘

Aspect: Class Name Style

No easy-to-detect issues ๐Ÿ‘

Aspect: Dead Code

No easy-to-detect issues ๐Ÿ‘

Aspect: Method Length

No easy-to-detect issues ๐Ÿ‘

Aspect: Class size

No easy-to-detect issues ๐Ÿ‘

Aspect: Header Comments

Example from src/main/java/duke/Duke.java lines 61-64:

    /**
     * You should have your own function to generate a response to user input.
     * Replace this stub with your completed method.
     */

Suggestion: Ensure method/class header comments follow the format specified in the coding standard, in particular, the phrasing of the overview statement.

Aspect: Recent Git Commit Message

possible problems in commit ea64415:


Merge branch 'master' into branch-B-Reminders
Update with master


  • No blank line between subject and body

possible problems in commit d9eaeaf:


Merge branch 'master' into branch-B-Reminders
Update with master


  • No blank line between subject and body

possible problems in commit 46f0322:


Merge branch 'master' into branch-A-CI
Update with master


  • No blank line between subject and body

Suggestion: Follow the given conventions for Git commit messages for future commits (do not modify past commit messages as doing so will change the commit timestamp that we used to detect your commit timings).

Aspect: Binary files in repo

Suggestion: Avoid committing binary files (e.g., *.class, *.jar, *.exe) or third-party library files in to the repo.


โ„น๏ธ The bot account used to post this issue is un-manned. Do not reply to this post (as those replies will not be read). Instead, contact [email protected] if you want to follow up on this post.

Sharing iP code quality feedback [for @Ella-e] - Round 2

@Ella-e We did an automated analysis of your code to detect potential areas to improve the code quality. We are sharing the results below, so that you can avoid similar problems in your tP code (which will be graded more strictly for code quality).

IMPORTANT: Note that the script looked for just a few easy-to-detect problems only, and at-most three example are given i.e., there can be other areas/places to improve.

Aspect: Tab Usage

No easy-to-detect issues ๐Ÿ‘

Aspect: Naming boolean variables/methods

No easy-to-detect issues ๐Ÿ‘

Aspect: Brace Style

No easy-to-detect issues ๐Ÿ‘

Aspect: Package Name Style

No easy-to-detect issues ๐Ÿ‘

Aspect: Class Name Style

No easy-to-detect issues ๐Ÿ‘

Aspect: Dead Code

No easy-to-detect issues ๐Ÿ‘

Aspect: Method Length

Example from src/main/java/duke/Duke.java lines 67-121:

    public String getResponse(String userInput) {
        String response = "";
        try {
            // use parser to process the userInput
            // the parser object contains all the current user input line information
            Parser parser = new Parser();
            parser.parse(userInput);

            // check for end the session
            if (parser.getCurrentKey().equals(KeyEnum.EXITKEY)) {
                response = ui.onExit();
            }

            // continue for the functionality
            switch (parser.getCurrentKey()) {
            case DEADLINE:
            case TODO:
            case EVENT:
                Task task = tasks.addTask(parser.getInputDetail(),
                    parser.getFrom(), parser.getTo(), parser.getCurrentKey());
                storage.writeTasksToFile(tasks);
                response = ui.onAddSuccess(task, tasks.getNumOfTasks());
                break;
            case LIST:
                response = ui.showList(tasks);
                break;
            case MARK:
                Task markedTask = tasks.markTaskById(parser.getIndex(), true);
                storage.writeTasksToFile(tasks);
                response = ui.onMarkDone(markedTask);
                break;
            case UNMARK:
                Task unMarkedTask = tasks.markTaskById(parser.getIndex(), false);
                storage.writeTasksToFile(tasks);
                response = ui.onUnmarkDone(unMarkedTask);
                break;
            case DELETE:
                Task deletedTask = tasks.deleteTaskById(parser.getIndex());
                storage.writeTasksToFile(tasks);
                response = ui.onDelete(deletedTask, tasks);
                break;
            case FIND:
                TaskList matchedTasks = tasks.findTasks(parser.getInputDetail());
                response = ui.showMatchedList(matchedTasks);
                break;
            default:
                break;
            }
        } catch (BaseException e) {
            response = ui.showErrorMsg(e.getMessage());
        } catch (IOException e) {
            response = ui.showLoadingError();
        }
        return response;
    }

Example from src/main/java/duke/tasks/TaskList.java lines 157-201:

    public TaskList findNextDueTasks(int numOfTasks) {
        ArrayList<Task> nextTasks = new ArrayList<>(tasks);
        nextTasks.removeIf(Task::getIsDone); // remove completed tasks
        nextTasks.sort(new Comparator<Task>() {
            @Override
            public int compare(Task o1, Task o2) {
                if (o1 instanceof Todo) {
                    return 1;
                }
                if (o2 instanceof Todo) {
                    return -1;
                }

                if (o1 instanceof Deadline) {
                    if (o2 instanceof Deadline) {
                        return ((Deadline) o1).getBy().compareTo(((Deadline) o2).getBy());
                    } else if (o2 instanceof Event) {
                        return ((Deadline) o1).getBy().compareTo(((Event) o2).getBy());
                    }
                } else if (o1 instanceof Event) {
                    if (o2 instanceof Deadline) {
                        return ((Event) o1).getBy().compareTo(((Deadline) o2).getBy());
                    } else if (o2 instanceof Event) {
                        return ((Event) o1).getBy().compareTo(((Event) o2).getBy());
                    }
                }
                return 0;
            }
        });

        if (nextTasks.size() <= numOfTasks) {
            return new TaskList(nextTasks);
        }

        ArrayList<Task> tempTasks = new ArrayList<>();
        int counter = numOfTasks;
        for (Task task: nextTasks) {
            if (counter <= 0) {
                break;
            }
            tempTasks.add(task);
            counter--;
        }
        return new TaskList(tempTasks);
    }

Example from src/main/java/duke/utils/Parser.java lines 32-95:

    public void parse(String userInput) throws InvalidKeyException, EmptyBodyException,
            WrongFormatException, InvalidNumberException, DateTimeParseException, InvalidDateTimeException {
        String[] userInputSplit = userInput.split(" ");
        // verify that the user input is valid
        String checkInputMsg = checkSpecialCharacter(userInputSplit);
        if (!checkInputMsg.equals("valid")) {
            throw new WrongFormatException(checkInputMsg);
        }
        this.determineCurrentKey(userInputSplit[0]);
        switch (this.currentKey) {
        case DEADLINE:
            if (userInput.length() <= 9) {
                throw new EmptyBodyException();
            }
            try {
                inputDetail = userInput.substring(9, userInput.indexOf("/by"));
                to = formatDate(userInput.substring(userInput.indexOf("/by") + 4));
            } catch (Exception e) {
                throw new WrongFormatException("\"deadline content /by yyyy-mm-dd\"");
            }
            break;
        case TODO:
        case FIND:
            if (userInput.length() <= 5) {
                throw new EmptyBodyException();
            }
            inputDetail = userInput.substring(5);
            break;
        case EVENT:
            if (userInput.length() <= 6) {
                throw new EmptyBodyException();
            }
            try {
                inputDetail = userInput.substring(6, userInput.indexOf("/from"));
                from = formatDate(userInput.substring(userInput.indexOf("/from") + 6, userInput.indexOf("/to") - 1));
                to = formatDate(userInput.substring(userInput.indexOf("/to") + 4));
                if (from.isAfter(to)) {
                    throw new InvalidDateTimeException("The start date should be before the end date");
                }
            } catch (InvalidDateTimeException e) {
                throw e;
            } catch (Exception e) {
                throw new WrongFormatException("\"event content /from yyyy-mm-dd /to yyyy-mm-dd\"");
            }
            break;
        case MARK:
        case UNMARK:
        case DELETE:
            try {
                this.index = new Integer(userInputSplit[1]) - 1;
                this.inputDetail = this.index.toString();
            } catch (Exception e) {
                throw new InvalidNumberException();
            }
            break;
        default:
            break;
        }

        // check if the user input contains only empty spaces.
        if (!(currentKey.equals(KeyEnum.LIST) || currentKey.equals(KeyEnum.EXITKEY)) && inputDetail.trim().isEmpty()) {
            throw new EmptyBodyException();
        }
    }

Suggestion: Consider applying SLAP (and other abstraction mechanisms) to shorten methods e.g., extract some code blocks into separate methods. You may ignore this suggestion if you think a longer method is justified in a particular case.

Aspect: Class size

No easy-to-detect issues ๐Ÿ‘

Aspect: Header Comments

No easy-to-detect issues ๐Ÿ‘

Aspect: Recent Git Commit Message

No easy-to-detect issues ๐Ÿ‘

Aspect: Binary files in repo

No easy-to-detect issues ๐Ÿ‘


โ— You are not required to (but you are welcome to) fix the above problems in your iP, unless you have been separately asked to resubmit the iP due to code quality issues.

โ„น๏ธ The bot account used to post this issue is un-manned. Do not reply to this post (as those replies will not be read). Instead, contact [email protected] if you want to follow up on this post.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.