Skip to content

Commit

Permalink
Merge branch 'master' into branch-updateQuickStart
Browse files Browse the repository at this point in the history
  • Loading branch information
DesSnowy authored Nov 7, 2024
2 parents a38a609 + 8167b7a commit ba8ff69
Show file tree
Hide file tree
Showing 16 changed files with 317 additions and 44 deletions.
4 changes: 3 additions & 1 deletion docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ Finds persons whose names contain any of the given tag keywords.

<box type="warning" icon=":fa-solid-circle-exclamation:" light>

* The search is case-sensitive. e.g `friends` will not match `Friends`
* The search is case-insensitive. e.g `friends` will match `Friends`
* At least one tag must be provided.
* The order of the keywords does not matter. e.g. `t/friends t/family` will match `t/family t/friends`
* Only the tags is searched.
Expand Down Expand Up @@ -495,6 +495,8 @@ Unmarks a student as present for a particular week.
<box type="definition" icon=":fa-solid-spell-check:" light>

<md>**Format: `unmark n/NAME w/[WEEK_NUMBER]`**</md>
<md>**Format: `unmark n/NAME week/[WEEK_NUMBER]`**</md>

</box>

<box type="definition" icon=":fa-solid-spell-check:" light>
Expand Down
45 changes: 28 additions & 17 deletions src/main/java/seedu/address/logic/commands/AddGradeCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,35 @@
*/
public class AddGradeCommand extends Command {
public static final String COMMAND_WORD = "addGrade";
public static final String COMMAND_WORD_SHORT_FORM = "ag";
public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Adds a grade of an assignment to the person.\n"
+ "Parameters: "
+ PREFIX_NAME
+ "NAME "
+ PREFIX_ASSIGNMENT
+ "ASSIGNMENT "
+ PREFIX_SCORE
+ "SCORE\n"
+ "Example: "
+ COMMAND_WORD
+ " "
+ PREFIX_NAME
+ "John Doe "
+ PREFIX_ASSIGNMENT
+ "Ex01 "
+ PREFIX_SCORE
+ "9\n"
+ "Example: "
+ COMMAND_WORD_SHORT_FORM
+ " "
+ PREFIX_NAME
+ "John Doe "
+ PREFIX_ASSIGNMENT
+ "Ex01 "
+ PREFIX_SCORE
+ "9";
public static final String COMMAND_WORD_LOWER_CASE = "addgrade";
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Adds a grade of an assignment to the person.\n"
+ "Parameters: "
+ PREFIX_NAME
+ "NAME "
+ PREFIX_ASSIGNMENT
+ "ASSIGNMENT "
+ PREFIX_SCORE
+ "SCORE\n"
+ "Example: "
+ COMMAND_WORD
+ " "
+ PREFIX_NAME
+ "John Doe "
+ PREFIX_ASSIGNMENT
+ "Ex09 "
+ PREFIX_SCORE
+ "9";
public static final String MESSAGE_SUCCESS = "New assignment added: %1$s";
public static final String HELP_MESSAGE =
"Input addGrade without any fields to see list of assignments specified in database.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@
public class DeleteCommand extends Command {

public static final String COMMAND_WORD = "delete";
public static final String COMMAND_WORD_SHORT_FORM = "rm";

public static final String MESSAGE_USAGE = COMMAND_WORD
public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Deletes the person identified by the name shown in the displayed person list.\n"
+ "Parameters: "
+ PREFIX_NAME + "NAME\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_NAME + "John Doe\n"
+ "Example: " + COMMAND_WORD_SHORT_FORM + " "
+ PREFIX_NAME + "John Doe";

public static final String MESSAGE_DELETE_PERSON_SUCCESS = "Deleted Person: %1$s";
Expand Down
9 changes: 8 additions & 1 deletion src/main/java/seedu/address/logic/commands/EditCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ public class EditCommand extends Command {

public static final String COMMAND_WORD = "edit";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Edits the details of the person identified "
public static final String COMMAND_WORD_SHORT_FORM = "e";

public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Edits the details of the person identified "
+ "by the index number used in the displayed person list. "
+ "Existing values will be overwritten by the input values.\n"
+ "Parameters: INDEX (must be a positive integer) "
Expand All @@ -49,6 +52,10 @@ public class EditCommand extends Command {
+ "Example: " + COMMAND_WORD + " 1 "
+ PREFIX_EMAIL + "[email protected] "
+ PREFIX_GITHUB + "john123 "
+ PREFIX_TELEGRAM + "@johnDoe\n"
+ "Example: " + COMMAND_WORD_SHORT_FORM + " 1 "
+ PREFIX_EMAIL + "[email protected] "
+ PREFIX_GITHUB + "john123 "
+ PREFIX_TELEGRAM + "@johnDoe";


Expand Down
8 changes: 6 additions & 2 deletions src/main/java/seedu/address/logic/commands/ExportCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@
public class ExportCommand extends Command {

public static final String COMMAND_WORD = "export";
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Exports person data to a CSV file.\n"
public static final String COMMAND_WORD_SHORT_FORM = "ex";

public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Exports person data to a CSV file.\n"
+ "Parameters: FILE_PATH"
+ "[" + PREFIX_PATH + "FILE_PATH]\n"
+ "Example: " + COMMAND_WORD + " " + PREFIX_PATH + "data/persons.csv";
+ "Example: " + COMMAND_WORD + " " + PREFIX_PATH + "data/persons.csv\n"
+ "Example: " + COMMAND_WORD_SHORT_FORM + " " + PREFIX_PATH + "data/persons.csv";

private final String filePath;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@
public class FilterCommand extends Command {

public static final String COMMAND_WORD = "filter";
public static final String COMMAND_WORD_SHORT_FORM = "f";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Filter the list to show all contacts whose tag "
public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Filter the list to show all contacts whose tag "
+ "contain any of the specified keywords (case-insensitive) and displays them as a list with index "
+ "numbers.\n"
+ "Parameters: " + PREFIX_TAG + "TAG" + " [" + PREFIX_TAG + "MORE_TAG]...\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_TAG + "student "
+ PREFIX_TAG + "T02\n"
+ "Example: " + COMMAND_WORD_SHORT_FORM + " "
+ PREFIX_TAG + "student "
+ PREFIX_TAG + "T02";

private final TagContainsKeywordsPredicate predicate;
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/seedu/address/logic/commands/FindCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,14 @@ public class FindCommand extends Command {

public static final String COMMAND_WORD = "find";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all persons whose names contain any one of "
public static final String COMMAND_WORD_SHORT_FORM = "fd";

public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Finds all persons whose names contain any one of "
+ "the specified keywords (case-insensitive) and displays them as a list with index numbers.\n"
+ "Parameters: KEYWORD [MORE_KEYWORDS]...\n"
+ "Example: " + COMMAND_WORD + " alice bob charlie";
+ "Example: " + COMMAND_WORD + " alice bob charlie\n"
+ "Example: " + COMMAND_WORD_SHORT_FORM + " alice bob charlie";

private final NameContainsKeywordsPredicate predicate;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@
public class GitHubCommand extends Command {
public static final String COMMAND_WORD = "github";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Launches the github repository of the user.\n"
public static final String COMMAND_WORD_SHORT_FORM = "git";

public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Launches the github repository of the user.\n"
+ "Parameters: "
+ PREFIX_NAME + "NAME\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_NAME + "John Doe\n"
+ "Example: " + COMMAND_WORD_SHORT_FORM + " "
+ PREFIX_NAME + "John Doe";
public static final String MISSING_PERSON_EXCEPTION = "The person you specified does not exist"
+ " in the address book.\n"
Expand Down
12 changes: 8 additions & 4 deletions src/main/java/seedu/address/logic/commands/ImportCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@
public class ImportCommand extends Command {

public static final String COMMAND_WORD = "import";
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Imports person data from a CSV file.\n"
+ "Parameters: FILE_PATH"
+ "[" + PREFIX_PATH + "FILE_PATH]\n"
+ "Example: " + COMMAND_WORD + " " + PREFIX_PATH + "data/persons.csv";
public static final String COMMAND_WORD_SHORT_FORM = "im";

public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Imports person data from a CSV file.\n"
+ "Parameters: FILE_PATH"
+ "[" + PREFIX_PATH + "FILE_PATH]\n"
+ "Example: " + COMMAND_WORD + " " + PREFIX_PATH + "data/persons.csv\n"
+ "Example: " + COMMAND_WORD_SHORT_FORM + " " + PREFIX_PATH + "data/persons.csv";
public static final String CORRECT_HEADER_USAGE =
"Header of CSV file should be Name, Email, Telegram, Tags, Github, Assignments, WeeksPresent"
+ " (Case insensitive, Order sensitive)";
Expand Down
10 changes: 8 additions & 2 deletions src/main/java/seedu/address/logic/commands/MarkCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,17 @@ public class MarkCommand extends Command {

public static final String COMMAND_WORD = "mark";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Marks the name as present for that particular "
public static final String COMMAND_WORD_SHORT_FORM = "m";

public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Marks the name as present for that particular "
+ "week. The max week number is 13.\n"
+ "Parameters: " + PREFIX_NAME + "NAME " + PREFIX_WEEK + "WEEK_NUMBER "
+ "Parameters: " + PREFIX_NAME + "NAME " + PREFIX_WEEK + "WEEK_NUMBER\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_NAME + "John Doe "
+ PREFIX_WEEK + "1\n"
+ "Example: " + COMMAND_WORD_SHORT_FORM + " "
+ PREFIX_NAME + "John Doe "
+ PREFIX_WEEK + "1";

public final int week;
Expand Down
14 changes: 12 additions & 2 deletions src/main/java/seedu/address/logic/commands/RemoveGradeCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@
public class RemoveGradeCommand extends Command {
public static final String COMMAND_WORD = "removeGrade";
public static final String COMMAND_WORD_LOWER_CASE = "removegrade";

public static final String COMMAND_WORD_SHORT_FORM = "rg";

public static final String MESSAGE_USAGE =
COMMAND_WORD
COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Removes a grade of an assignment from the person.\n"
+ "Parameters: "
+ PREFIX_NAME
Expand All @@ -43,7 +46,14 @@ public class RemoveGradeCommand extends Command {
+ PREFIX_NAME
+ "John Doe "
+ PREFIX_ASSIGNMENT
+ "Ex09";
+ "Ex01\n"
+ "Example: "
+ COMMAND_WORD_SHORT_FORM
+ " "
+ PREFIX_NAME
+ "John Doe "
+ PREFIX_ASSIGNMENT
+ "Ex01";

public static final String MESSAGE_SUCCESS = "Assignment %1$s removed from %2$s";
public static final String MESSAGE_FAILURE = "Assignment %s does not exist for %s.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,17 @@ public class UnmarkCommand extends Command {

public static final String COMMAND_WORD = "unmark";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Unmarks the name as present for that particular "
public static final String COMMAND_WORD_SHORT_FORM = "um";

public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Unmarks the name as present for that particular "
+ "week.\n"
+ "Parameters: " + PREFIX_NAME + "NAME " + PREFIX_WEEK + "WEEK_NUMBER\n"
+ "Example: " + COMMAND_WORD + " "
+ PREFIX_NAME + "John Doe "
+ PREFIX_WEEK + "1\n"
+ "Example: " + COMMAND_WORD_SHORT_FORM + " "
+ PREFIX_NAME + "John Doe "
+ PREFIX_WEEK + "1";

public final int week;
Expand Down
23 changes: 15 additions & 8 deletions src/main/java/seedu/address/logic/commands/ViewCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@
public class ViewCommand extends Command {
public static final String COMMAND_WORD = "view";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Views details of a contact.\n"
+ "Parameters: "
+ PREFIX_NAME
+ "NAME\n"
+ "Example: "
+ COMMAND_WORD
+ " "
+ PREFIX_NAME + "JohnDoe";
public static final String COMMAND_WORD_SHORT_FORM = "v";

public static final String MESSAGE_USAGE = COMMAND_WORD + " or " + COMMAND_WORD_SHORT_FORM
+ ": Views details of a contact.\n"
+ "Parameters: "
+ PREFIX_NAME
+ "NAME\n"
+ "Example: "
+ COMMAND_WORD
+ " "
+ PREFIX_NAME + "John Doe\n"
+ "Example: "
+ COMMAND_WORD_SHORT_FORM
+ " "
+ PREFIX_NAME + "John Doe";

public static final String VIEW_ACKNOWLEDGMENT = "Viewing contact";
public static final String CLOSE_VIEW_ACKNOWLEDGMENT = "Closing view of contact";
Expand Down
40 changes: 40 additions & 0 deletions src/main/java/seedu/address/logic/parser/AddressBookParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,40 @@ public Command parseCommand(String userInput) throws ParseException {

case AddCommand.COMMAND_WORD:
return new AddCommandParser().parse(arguments);

case ExportCommand.COMMAND_WORD:
return new ExportCommandParser().parse(arguments);

case ExportCommand.COMMAND_WORD_SHORT_FORM:
return new ExportCommandParser().parse(arguments);

case ImportCommand.COMMAND_WORD:
return new ImportCommandParser().parse(arguments);

case ImportCommand.COMMAND_WORD_SHORT_FORM:
return new ImportCommandParser().parse(arguments);

case EditCommand.COMMAND_WORD:
return new EditCommandParser().parse(arguments);

case EditCommand.COMMAND_WORD_SHORT_FORM:
return new EditCommandParser().parse(arguments);

case DeleteCommand.COMMAND_WORD:
return new DeleteCommandParser().parse(arguments);

case DeleteCommand.COMMAND_WORD_SHORT_FORM:
return new DeleteCommandParser().parse(arguments);

case ClearCommand.COMMAND_WORD:
return new ClearCommand();

case FindCommand.COMMAND_WORD:
return new FindCommandParser().parse(arguments);

case FindCommand.COMMAND_WORD_SHORT_FORM:
return new FindCommandParser().parse(arguments);

case ListCommand.COMMAND_WORD:
return new ListCommand();

Expand All @@ -93,26 +111,48 @@ public Command parseCommand(String userInput) throws ParseException {
case AddGradeCommand.COMMAND_WORD_LOWER_CASE:
return new AddGradeCommandParser().parse(arguments);

case AddGradeCommand.COMMAND_WORD_SHORT_FORM:
return new AddGradeCommandParser().parse(arguments);

case RemoveGradeCommand.COMMAND_WORD_LOWER_CASE:
return new RemoveGradeCommandParser().parse(arguments);

case RemoveGradeCommand.COMMAND_WORD_SHORT_FORM:
return new RemoveGradeCommandParser().parse(arguments);

case FilterCommand.COMMAND_WORD:
return new FilterCommandParser().parse(arguments);

case FilterCommand.COMMAND_WORD_SHORT_FORM:
return new FilterCommandParser().parse(arguments);

case MarkCommand.COMMAND_WORD:
return new MarkCommandParser().parse(arguments);

case MarkCommand.COMMAND_WORD_SHORT_FORM:
return new MarkCommandParser().parse(arguments);

case UnmarkCommand.COMMAND_WORD:
return new UnmarkCommandParser().parse(arguments);

case UnmarkCommand.COMMAND_WORD_SHORT_FORM:
return new UnmarkCommandParser().parse(arguments);

case SortCommand.COMMAND_WORD:
return new SortCommandParser().parse(arguments);

case GitHubCommand.COMMAND_WORD:
return new GitHubCommandParser().parse(arguments);

case GitHubCommand.COMMAND_WORD_SHORT_FORM:
return new GitHubCommandParser().parse(arguments);

case ViewCommand.COMMAND_WORD:
return new ViewCommandParser().parse(arguments);

case ViewCommand.COMMAND_WORD_SHORT_FORM:
return new ViewCommandParser().parse(arguments);

default:
logger.finer("This user input caused a ParseException: " + userInput);
throw new ParseException(MESSAGE_UNKNOWN_COMMAND);
Expand Down
Loading

0 comments on commit ba8ff69

Please sign in to comment.