From e49245344296420f488be9441615fc18dfce303f Mon Sep 17 00:00:00 2001 From: Lingxi Xing Date: Thu, 5 Oct 2023 11:59:30 +0800 Subject: [PATCH] chore: Move changes to UG --- docs/UserGuide.md | 146 ++++++++++++++++++++++++++-------------------- 1 file changed, 83 insertions(+), 63 deletions(-) diff --git a/docs/UserGuide.md b/docs/UserGuide.md index 57437026c7b..15058263a5f 100644 --- a/docs/UserGuide.md +++ b/docs/UserGuide.md @@ -63,111 +63,131 @@ AddressBook Level 3 (AB3) is a **desktop app for managing contacts, optimized fo * If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple lines as space characters surrounding line-breaks may be omitted when copied over to the application. -### Viewing help : `help` +### 1. Viewing help: `help` -Shows a message explaning how to access the help page. +You can access the help page at any time, ensuring that you will never be lost. -![help message](images/helpMessage.png) +Format: -Format: `help` +``` +help +``` +Examples: -### Adding a person: `add` +- `help` -Adds a person to the address book. +Output: -Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…​` +- Opens a window with a link to our user guide. + + ![help message](images/output/help_success.png) + +
+ +### 7. Clearing all person entries: `deleteAllPerson` -
:bulb: **Tip:** -A person can have any number of tags (including 0) -
+ +{% include admonition.html type="danger" title="Potentially Dangerous Operation!" body=" +AddressBook will discard all Person data and start with an empty data file at the next run.
" %} + +Clears all contacts in your contact list. + +Format: + +``` +deleteAllPerson +``` Examples: -* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01` -* `add n/Betsy Crowe t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567 t/criminal` -### Listing all persons : `list` +- `deleteAllPerson` + - Deletes all persons in your contact list. + +Output: -Shows a list of all persons in the address book. +- All persons in the contact list are deleted. -Format: `list` + ![deleteAllPerson success](images/deleteAllPerson_success.png) -### Editing a person : `edit` +
-Edits an existing person in the address book. +### 10. Editing a task: `editTask` -Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]…​` +You can edit the details of a task in your task list. -* Edits the person at the specified `INDEX`. The index refers to the index number shown in the displayed person list. The index **must be a positive integer** 1, 2, 3, …​ -* At least one of the optional fields must be provided. -* Existing values will be updated to the input values. -* When editing tags, the existing tags of the person will be removed i.e adding of tags is not cumulative. -* You can remove all the person’s tags by typing `t/` without - specifying any tags after it. +Format: + +``` +editTask INDEX [t/TITLE] [n/NOTE] +``` + +- Edits the task at the specified `INDEX`. +- The index refers to the index number shown in the task list currently displayed. +- Specify a new title with the `t/` prefix. This field is **optional**. +- Specify a new note with the `n/` prefix. This field is **optional**. Examples: -* `edit 1 p/91234567 e/johndoe@example.com` Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively. -* `edit 2 n/Betsy Crower t/` Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags. -### Locating persons by name: `find` +- `editTask 1 t/Call Caterer` + - Edits the title of the 1st task to be `Call Caterer`. +- `editTask 2 t/Book room n/By Friday` + - Edits the title of the 2nd task to be `Book room` and the note to be `By Friday`. +- `editTask` + - Negative example as the index is not specified. -Finds persons whose names contain any of the given keywords. +Output: -Format: `find KEYWORD [MORE_KEYWORDS]` +- Title of task 1 is edited to `Call Caterer`. -* The search is case-insensitive. e.g `hans` will match `Hans` -* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans` -* Only the name is searched. -* Only full words will be matched e.g. `Han` will not match `Hans` -* Persons matching at least one keyword will be returned (i.e. `OR` search). - e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang` + ![editTask_success](images/output/editTask_success1.png) -Examples: -* `find John` returns `john` and `John Doe` -* `find alex david` returns `Alex Yeoh`, `David Li`
- ![result for 'find alex david'](images/findAlexDavidResult.png) +- Title of task 2 is edited to `Book room` and note is edited to `By Friday`. -### Deleting a person : `delete` + ![editTask_success](images/output/editTask_success2.png) -Deletes the specified person from the address book. +Errors: -Format: `delete INDEX` +- Index is not specified. -* Deletes the person at the specified `INDEX`. -* The index refers to the index number shown in the displayed person list. -* The index **must be a positive integer** 1, 2, 3, …​ + ![editTask_error](images/error/editTask_error.png) -Examples: -* `list` followed by `delete 2` deletes the 2nd person in the address book. -* `find Betsy` followed by `delete 1` deletes the 1st person in the results of the `find` command. +
-### Clearing all entries : `clear` +### 12. Deleting a task entry: `deleteTask` -Clears all entries from the address book. +{% include admonition.html type="danger" title="Potentially Dangerous Operation!" body="This action is irreversible." %} -Format: `clear` +You can remove a task from your task list. -### Exiting the program : `exit` +Format: -Exits the program. +`deleteTask INDEX` -Format: `exit` +- Deletes the task at the specified `INDEX`. +- The index refers to the index number shown in the task list currently displayed. -### Saving the data +Examples: -AddressBook data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually. +- `deleteTask 2` + - Deletes the 2nd task in the task list. +- `findTask Call` followed by `deleteTask 1` + - Deletes the 1st task in the results of the `findTask` command. -### Editing the data file +Output: -AddressBook data are saved automatically as a JSON file `[JAR file location]/data/addressbook.json`. Advanced users are welcome to update data directly by editing that data file. +- Deletes task 2. -
:exclamation: **Caution:** -If your changes to the data file makes its format invalid, AddressBook will discard all data and start with an empty data file at the next run. Hence, it is recommended to take a backup of the file before editing it. -
+ ![deleteTask_success](images/output/deleteTask_success1.png) + +Errors: + +- Index specified is not available in the task list. + + ![deleteTask_error](images/error/deleteTask_error1.png) -### Archiving data files `[coming in v2.0]` -_Details coming soon ..._ +
--------------------------------------------------------------------------------------------------------------------