Skip to content

Commit

Permalink
Revert "Change name of some commands and update UG"
Browse files Browse the repository at this point in the history
  • Loading branch information
ShuTingY committed Oct 31, 2019
1 parent ebcbb43 commit 43d2ac4
Show file tree
Hide file tree
Showing 55 changed files with 233 additions and 251 deletions.
184 changes: 83 additions & 101 deletions docs/UserGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,26 +47,26 @@ This section contains the features and their respective commands
* Items with `…`​ after them can be inserted zero or more times e.g. `[c>CATEGORY]...` can be used as `{nbsp}` (i.e. 0 times), `c>math`, `c>math c>school` etc.
* Parameters can be in any order e.g. if the command specifies `q>QUESTION a>ANSWER`, `a>ANSWER q>QUESTION` is also acceptable.
====
//tag:flashcard[]

=== Add new flashcard: `add [q>QUESTION] [q>ANSWER] [c>CATEGORY]...`

This command allows to you to add a new flashcard with question and answer. +
This command allow to you to add a new flashcard with specific question and answer. +
`add q>What is CS2103T a>Software engineering`

You may also include the category for the flashcard. +
You may also specified the category of the flashcard. +
`add q>What is CS2103T a>Software engineering c>CS2103T`

To add:

. Type `add q>What is the use of checksum ? a>To detect "error"` and press **Enter**.
. Type `add` followed by the question and answer and press **Enter** to execute it.
+
image::AddStep1.png[width="600"]

. The result box will display the message: _"New flashCard added: What is the use of checksum ? Answer: To detect "error""_
. The result box will display the message: _"New flashCard added: What is the use of checksum ? Answer: To detect "error" Categories: "_
+
image::AddStep2.png[width="600"]

. And you can check the new flashcard has been added to bottom of the flashcard list.
. And you can check whether the new flashcard has been added to the flashcard list.
+
image::AddStep3.png[width="600"]

Expand All @@ -77,18 +77,20 @@ display list with 1 or multiple fields +
e.g: +

* `edit 7 c>CS2105`
* `edit 1 a>lambda c>science`
* `edit 1 q> 11 * 11 a> 121 c> math`

To edit:

. Type `edit 7c>CS2105` and press *Enter*.
. Type `edit` followed by the index and the content to edit, then press *Enter* to execute it.
+
image::EditStep1.png[width="600"]

. The result box will display the message: _"Edited FlashCard: What is the use of checksum ? Answer: To detect "error" Categories: [CS2105]"_.
+
image::EditStep2.png[width="600"]

. And you can see that the 7th flashcard has been edited on the flashcard list.
. And you can check whether the flashcard has been edited on the flashcard list.
+
image::EditStep3.png[width="600"]

Expand All @@ -97,11 +99,12 @@ image::EditStep3.png[width="600"]
This command allows you the delete a
particular flashcard with the index
show on the flashcard list. e.g.
`delete 7`
`delete 1`

To delete:

. Type `delete 7` and press *Enter*.
. Type `delete` with the corresponding index displayed on the
flashcard list and press *Enter* to execute it.
+
image::DeleteStep1.png[width="600"]

Expand All @@ -119,7 +122,7 @@ This command allows you to delete all the flashcard in the storage.

To clear:

. Type `clear' and press *Enter*.
. Type `clear' and press *Enter* to execute it.
+
image::ClearStep1.png[width="600"]

Expand All @@ -129,95 +132,84 @@ And you will see that all lists turn empty.
image::ClearStep2.png[width="600"]


=== List of category : `list [category]`
=== Search of flashcards: `find`

This command allows you to list all flashcards under one or multiple categories.
Multiple keywords are separated by a single space.
This section will show you different ways to find flashcards that matches the keyword(s).

to list category:
==== Search for flashcards that either the question or the answer matches the keyword(s): "find [keyword(s)]

. Type `list CS2105` and press *Enter*.
+
image::ListcatStep1.png[width="600"]
This command allows you to find a list of flashcards with the question or answer matching the keyword(s).
Multiple keywords are separated by a single space.

. The result box will show message: _"1 flashcard is listed!"_ .
+
image::ListCatStep2.png[width="600"]
To find:

. And the flashcard list is updated.
. Type `find` followed by the keywords and press *Enter* to execute it.
+
image::ListCatStep3.png[width="600"]
image::FindStep1.png[width="600"]

=== List all flashcards: `listall`
. The result box will show message: _"4 flash cards listed!"_ and the flashcard list will show the matched flashcards
+
image::FindStep2.png[width="600"]

This command allows you to lists all the flashcards in the storage.
==== Search for flashcard with question matching the keyword(s) only: `findq [keyword(s)]`

To listall:
This command allows you to find a list of flashcards with the question matching the keyword(s).
Multiple keywords are separated by a single space.

. Type `listall` and press *Enter*.
+
image::ListAllStep1.png[width="600"]
to find question:

. The result box will show message: _"Listed all Flash Cards"_.
. Type `findq` follow by the keywords and press *Enter* to execute it.
+
image::ListAllStep2.png[width="600"]
image::FindqStep1.png[width="600"]

. And the flashcard list will show all the flashcards. You can move your mouse
to the flashcard list and scroll up and down to view the flashcards.
. The result box will show message: _"2 flash cards listed!"_ and the flashcard list will show the matched flashcards
+
image::ListAllStep3.png[width="600"]

=== Search for flashcards: `search`
image::FindqStep2.png[width="600"]

The section will show you 3 methods to search for flashcards. Keywords are case-insensitive.
==== Search for flashcard with answer matching the keyword(s) only: `finda [keyword(s)]`

==== Either the question or the answer matches the keyword(s): "find [keyword(s)]

This command allows you to search for flashcards with the question or answer matching the keyword(s).
This command allows you to find a list of flashcards with the answer matching the keyword(s).
Multiple keywords are separated by a single space.

To search:
to find answer:

. Type `search pointer` and press *Enter*.
. Type `finda` follow by the keywords and press *Enter* to execute it.
+
image::SearchStep1.png[width="600"]
image::FindaStep1.png[width="600"]

. The result box will show message: _"2 flash cards listed!"_ and the flashcard list will show the matching flashcards
. The result box will show message: _"1 flash cards listed!"_ and the flashcard list will show the matched flashcards
+
image::SearchStep2.png[width="600"]
image::FindaStep2.png[width="600"].

==== Question matching the keyword(s) only: `searchqn [keyword(s)]`
==== Search for category/categories : `findcat [keyword(s)]`

This command allows you to search for flashcards with the question matching the keyword(s).
list all the flashcards under the specific category that matching the keyword(s).
Multiple keywords are separated by a single space.

to search question:
to find category:

. Type `searchqn C` and press *Enter*.
. Type `findcat` follow by the keywords and press *Enter* to execute it.
+
image::SearchqStep1.png[width="600"]
image::FindcatStep1.png[width="600"]

. The result box will show message: _"2 flash cards listed!"_ and the flashcard list will show the matching flashcards
. The result box will show message: _""_ and the flashcard list will show the matched flashcards
+
image::SearchqStep2.png[width="600"]
image::FindcatStep2.png[width="600"].

==== Answer matching the keyword(s) only: `searchans [keyword(s)]`

This command allows you to search for flashcards with the answer matching the keyword(s).
Multiple keywords are separated by a single space.
=== List all flashcards: `list`

to search for answer:
This command allows you to lists all the flashcards in the storage.

. Type `searchans name` and press *Enter*.
+
image::SearchaStep1.png[width="600"]
To list:

. The result box will show message: _"1 flash cards listed!"_ and the flashcard list will show the matching flashcards
. Type `list` and press *Enter* to execute it.
+
image::SearchaStep2.png[width="600"].
image::ListStep1.png[width="600"]


//end::flashcard[]
. The result box will show message: _"Listed all Flash Cards"_ and the flashcard list will show all the flashcards.
+
image::ListStep2.png[width="600"]

=== Start flashcard test: `start`

Expand All @@ -227,10 +219,6 @@ Starts the flashcard test (assuming you are in the category ‘folder’)
Starts the flashcard test from any specific category
`start [category]`

=== Stop flashcard test: `end`

`end`

=== Set a reminder for a specific category of flashcards. [coming in v1.3]

`remind Math 04/11 1030`
Expand All @@ -246,19 +234,19 @@ You can refer to the example below:

Key the above mentioned into the command box

image::deadline-entry.png[width="600"]
image::deadline-entry.png[][width="600"]

After which, the result box will show the success message. The new deadline will now be shown at the right side-bar.

image::deadline-entered.png[width="600"]
image::deadline-entered.png[][width="600"]

=== Remove deadline from list: `remove [index]`

Removes a specific deadline into the deadline list. The list on the right-side pane will no longer have the deadline.

`remove 2`

****
]=
]****
* Removes the deadline at the specified `INDEX` from the list. The index refers to the index number shown in the displayed deadline list on the right-sde pane. The index *must be a positive integer* 1, 2, 3, ...
****
Expand Down Expand Up @@ -299,17 +287,24 @@ Opened help window.
+
image::HelpWindow.png[width="600"]
//tag: flashcard2[]
=== Search flashcards: `search [keywords]`
`search process`
=== Stop test: `end`
`end`
=== Exit: `exit`
This command allows you to exit the application.
To exit:
. Type `exit` and press *Enter*.
. Type `exit` and press *Enter* to execute it.
. The application window will close by itself.
//end::flashcard2[]
=== View overall statistics: `stats`
Expand All @@ -318,7 +313,7 @@ This command allow to you to view the number of good, hard and easy flashcards c
To view statistics:
. Type `stats` and press **Enter**.
. Type `stats` and press **Enter** to execute it.
+
image::StatsCommand.png[width="600"]
Expand All @@ -331,31 +326,15 @@ Displays the number of GOOD, HARD & EASY FlashCards
image::BarChart.png[width="600"]
//tag:theme[]
=== Change color themes: `theme [THEMENAME]`

This command allows you to change the theme of the app.
Follow are the current available themes
=== Cycle through color themes: `theme` [coming in v2.0]
* dark
* light
* pink
* blue
* hacker
* nus
`theme`
To change theme:

. Type "theme hacker" and press *Enter*
+
image::ThemeStep1.png[width="600"]

. The result box will show the message: _"Theme changed to hackerTheme"_ and the theme will be changed.
+
image::ThemeStep2.png[width="600"]
=== Exiting the program : `exit`
//end::theme[]
Exits the program. +
`exit`
=== Saving the data
Expand Down Expand Up @@ -408,20 +387,23 @@ e.g. `deadline t>Math Test d>01/10/2019`
e.g. `delete 10`
* Export all flashcards under a specific category, to a specific filepath - `export c>CATEGORY p>FILE_PATH` +
e.g. `export c>CS2105 p>C:\Users\User\Documents\cheat_sheet.docx`
* Search of flashcards - `find`
** find [keyword(s)]
** findq [keyword(s)]
** finda [keyword(s)]
** findcat [keyword(s)]
* Get full list of commands - `help` +
e.g. `help`
* List all flashcards - list
* List all flashcards under a specific category - `list [category]` +
e.g. `list Math`
* List all flashcards - 'listall'
* Set user preference for reminders - `remind [category] DD/MM HHmm` +
e.g. `remind Math 04/10 1230`
* Remove Deadline from list - `remove [INDEX]` +
e.g. `remove 2`
* Search of flashcards - `search`
** search [keyword(s)] e.g `search c`
** searchqn [keyword(s)] e.g `searchqn pointer`
** searchans [keyword(s)] e.g `searchans name`
* Start a certain topic of flashcards - `start [keyword]` +
e.g. `start Mathematics`
* View overall statistics - `stats`
* Search specific flashcards - `search [keywords]` +
e.g. `search UML diagrams`
* Stop flashcard test - `end`
Binary file modified docs/images/AddStep1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/AddStep2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/AddStep3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/DeleteStep1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/DeleteStep2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/DeleteStep3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/EditStep1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/EditStep2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/EditStep3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/FindStep1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/FindStep2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/FindcatStep1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/FindcatStep2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/FindqStep1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/FindqStep2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/ListAllStep1.png
Binary file not shown.
Binary file removed docs/images/ListAllStep2.png
Binary file not shown.
Binary file removed docs/images/ListAllStep3.png
Binary file not shown.
Binary file removed docs/images/ListCatStep1.png
Binary file not shown.
Binary file removed docs/images/ListCatStep2.png
Binary file not shown.
Binary file added docs/images/ListStep1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/ListStep2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/images/ListcatStep3.png
Binary file not shown.
Binary file removed docs/images/SearchStep1.png
Binary file not shown.
Binary file removed docs/images/SearchStep2.png
Binary file not shown.
Binary file removed docs/images/SearchaStep1.png
Diff not rendered.
Binary file removed docs/images/SearchaStep2.png
Diff not rendered.
Binary file removed docs/images/SearchqStep1.png
Diff not rendered.
Binary file removed docs/images/SearchqStep2.png
Diff not rendered.
Binary file removed docs/images/ThemeStep1.png
Diff not rendered.
Binary file removed docs/images/ThemeStep2.png
Diff not rendered.
Empty file removed docs/team/shutingy.adoc
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
* Finds and lists all flashcards in address book whose question contains any of the argument keywords.
* Keyword matching is case insensitive.
*/
public class SearchAnswerCommand extends Command {
public class FindAnswerCommand extends Command {

public static final String COMMAND_WORD = "searchans";
public static final String COMMAND_WORD = "finda";

public static final String MESSAGE_USAGE = COMMAND_WORD + ": Searches all flashcards whose answers contain any of "
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Finds all flashcards whose answers contain any 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";

private final AnswerContainsAnyKeywordsPredicate predicate;

public SearchAnswerCommand(AnswerContainsAnyKeywordsPredicate predicate) {
public FindAnswerCommand(AnswerContainsAnyKeywordsPredicate predicate) {
this.predicate = predicate;
}

Expand All @@ -40,7 +40,7 @@ public CommandResult execute(Model model) {
@Override
public boolean equals(Object other) {
return other == this // short circuit if same object
|| (other instanceof SearchAnswerCommand // instanceof handles nulls
&& predicate.equals(((SearchAnswerCommand) other).predicate)); // state check
|| (other instanceof FindAnswerCommand // instanceof handles nulls
&& predicate.equals(((FindAnswerCommand) other).predicate)); // state check
}
}

0 comments on commit 43d2ac4

Please sign in to comment.