Git Product home page Git Product logo

ip's Introduction

Interface Screenshot

Ui

Enkel v0.2

Latest release: here

Enkel v0.2 helps you manage a list of your tasks. Currently, 3 types of tasks are supported: tasks with/without a deadline, and events happening at a specifc time.
Enkel v0.2 uses command input. Simply enter your command and hit return.

Syntaxes of Commands

You can view this by typing help to Enkel.
All inputs except for <description> and <keyword> must be in lowercase.

To add a task:

  • todo <description>
  • deadline <description> /by <time>
  • event <description> /at <time>

Both <description> and <time> cannot be omitted. Valid time formats: yyyy-M-d (e.g. 2022-1-24) and yyyy-M-d H:mm (e.g. 2021-12-15 8:30)

To view tasks:

  • list: displays the whole list
  • find <keyword>: displays tasks containing the keyword in the description

To modify the list:

  • mark <index>: marks the task at the given index
  • unmark <index>: unmarks the task at the given index
  • edit <index> <syntax of adding a task> (e.g. edit 3 deadline lab report /by 2022-1-24 17:00): edits the task at the given index. If the task type is omitted, the original type will be used (you still need to use the syntax of adding a task. e.g. edit 3 lab report /by 2022-1-24 17:00)
  • delete <index>: deletes the task of the given index

To quit the program:

  • bye or cross it directly

ip's People

Contributors

zihaowrez avatar j-lum avatar damithc avatar jiachen247 avatar

ip's Issues

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

@zihaowrez 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/Parser.java lines 28-97:

    public static Command parse(String input) throws DukeException {
        input = input.trim();
        String[] splited = input.split(" ", 2);
        String firstWord = splited[0];
        String remaining = "";
        if (splited.length == 2) {
            remaining = splited[1];
        }
        remaining = remaining.trim();
        if (input.equals("bye")) {
            return new ByeCommand();
        } else if (input.equals("list")) {
            return new ListCommand();
        } else if (input.equals("help")) {
            return new HelpCommand();
        } else if (firstWord.equals("delete")) {
            if (!remaining.matches("-?\\d+")) {
                throw new DukeException("Must specify which task to delete");
            }
            return new DeleteCommand(Integer.parseInt(remaining));
        } else if (firstWord.equals("mark")) {
            if (!remaining.matches("-?\\d+")) {
                throw new DukeException("Must specify which task to mark");
            }
            return new MarkCommand(Integer.parseInt(remaining));
        } else if (firstWord.equals("unmark")) {
            if (!remaining.matches("-?\\d+")) {
                throw new DukeException("Must specify which task to unmark");
            }
            return new UnmarkCommand(Integer.parseInt(remaining));
        } else if (firstWord.equals("find")) {
            if (remaining.equals("")) {
                throw new DukeException("Must specify what to find");
            }
            return new FindCommand(remaining);
        } else if (firstWord.equals("edit")) {
            if (remaining.equals("")) {
                throw new DukeException("Must specify what to edit");
            } else if (!remaining.matches("-?\\d+ .+")) {
                throw new DukeException("Invalid format");
            }
            String[] indexText = remaining.split(" ", 2);
            return new EditCommand(Integer.parseInt(indexText[0]), indexText[1]);
        } else if (firstWord.equals("todo")) {
            if (remaining.equals("")) {
                throw new DukeException("The description of a todo cannot be empty");
            }
            return new TodoCommand(remaining);
        } else if (firstWord.equals("deadline")) {
            String[] descAndBy = remaining.split(" /by ", 2);
            if (descAndBy.length < 2) {
                throw new DukeException("Incorrect format");
            } else if (descAndBy[0].length() == 0) {
                throw new DukeException("The description of a deadline cannot be empty");
            }
            DukeDateTime datetime = DukeDateTime.parse(descAndBy[1].trim());
            return new DeadlineCommand(descAndBy[0].trim(), datetime);
        } else if (firstWord.equals("event")) {
            String[] descAndAt = remaining.split(" /at ", 2);
            if (descAndAt.length < 2) {
                throw new DukeException("Incorrect format");
            } else if (descAndAt[0].length() == 0) {
                throw new DukeException("The description of an event cannot be empty");
            }
            DukeDateTime datetime = DukeDateTime.parse(descAndAt[1].trim());
            return new EventCommand(descAndAt[0].trim(), datetime);
        } else {
            return new UnrecognizedCommand();
        }
    }

Suggestion: Consider applying SLAP (and other abstraction mechanisms) to shorten 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

Example from src/main/java/duke/gui/Launcher.java lines 9-11:

    /**
     * The main class.
     */

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 (Subject Only)

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.

Sharing iP code quality feedback [for @zihaowrez]

@zihaowrez 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

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/Parser.java lines 13-70:

    public static Command parse(String input) throws DukeException {
        input.trim();
        String[] splited = input.split(" ", 2);
        String firstWord = splited[0];
        String remaining = "";
        if (splited.length == 2) {
            remaining = splited[1];
        }
        if (input.equals("bye")) {
            return new ByeCommand();
        } else if (input.equals("list")) {
            return new ListCommand();
        } else if (input.matches("delete [1-9]+\\d*")) {
            return new DeleteCommand(Integer.parseInt(remaining));
        } else if (input.matches("mark [1-9]+\\d*")) {
            return new MarkCommand(Integer.parseInt(remaining));
        } else if (input.matches("unmark [1-9]+\\d*")) {
            return new UnmarkCommand(Integer.parseInt(remaining));
        } else if (firstWord.equals("find")) {
            if (remaining.equals("")) {
                throw new DukeException("Must specify what to find");
            }
            return new FindCommand(remaining);
        } else if (firstWord.equals("edit")) {
            if (remaining.equals("")) {
                throw new DukeException("Must specify what to edit");
            } else if (!remaining.matches("[1-9]+\\d* .+")) {
                throw new DukeException("Must specify which item to edit");
            }
            String[] indexText = remaining.split(" ", 2);
            return new EditCommand(Integer.parseInt(indexText[0]), indexText[1]);
        } else if (firstWord.equals("todo")) {
            if (remaining.equals("")) {
                throw new DukeException("The description of a todo cannot be empty");
            }
            return new TodoCommand(remaining);
        } else if (firstWord.equals("deadline")) {
            String[] desc_by = remaining.split(" /by ", 2);
            if (desc_by.length < 2) {
                throw new DukeException("Must specify a deadline");
            } else if (desc_by[0].length() == 0) {
                throw new DukeException("The description of a deadline cannot be empty");
            }
            DukeDateTime datetime = DukeDateTime.parse(desc_by[1]);
            return new DeadlineCommand(desc_by[0], datetime);
        } else if (firstWord.equals("event")) {
            String[] desc_at = remaining.split(" /at ", 2);
            if (desc_at.length < 2) {
                throw new DukeException("Must specify a time for the event");
            } else if (desc_at[0].length() == 0) {
                throw new DukeException("The description of an event cannot be empty");
            }
            DukeDateTime datetime = DukeDateTime.parse(desc_at[1]);
            return new EventCommand(desc_at[0], datetime);
        } else {
            return new UnrecognizedCommand();
        }
    }

Suggestion: Consider applying SLAP (and other abstraction mechanisms) to shorten 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 (Subject Only)

No easy-to-detect issues ๐Ÿ‘

โ„น๏ธ The bot account @nus-se-bot 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.