Skip to content

Commit

Permalink
chore: Move changes to UG
Browse files Browse the repository at this point in the history
  • Loading branch information
HugeNoob committed Oct 5, 2023
1 parent fd020ba commit e492453
Showing 1 changed file with 83 additions and 63 deletions.
146 changes: 83 additions & 63 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
</div>

### 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)

<div style="page-break-after: always;"></div>

### 7. Clearing all person entries: `deleteAllPerson`

<div markdown="span" class="alert alert-primary">:bulb: **Tip:**
A person can have any number of tags (including 0)
</div>

{% include admonition.html type="danger" title="Potentially Dangerous Operation!" body="
AddressBook will discard <b>all</b> Person data and start with an empty data file at the next run.<br>" %}

Clears all contacts in your contact list.

Format:

```
deleteAllPerson
```

Examples:
* `add n/John Doe p/98765432 e/[email protected] a/John street, block 123, #01-01`
* `add n/Betsy Crowe t/friend e/[email protected] 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`
<div style="page-break-after: always;"></div>

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/[email protected]` Edits the phone number and email address of the 1st person to be `91234567` and `[email protected]` 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`<br>
![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.
<div style="page-break-after: always;"></div>

### 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.

<div markdown="span" class="alert alert-warning">: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.
</div>
![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 ..._
<div style="page-break-after: always;"></div>

--------------------------------------------------------------------------------------------------------------------

Expand Down

0 comments on commit e492453

Please sign in to comment.