Skip to content

Commit 94f50ff

Browse files
authored
Merge pull request #223 from Annazx/update-ug
Update User Guide
2 parents 2a99d3b + 7d0a772 commit 94f50ff

1 file changed

Lines changed: 53 additions & 18 deletions

File tree

docs/UserGuide.md

Lines changed: 53 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Optimized for a Command Line Interface (CLI), CareContacts is ideal for fast typ
1414
<page-nav-print />
1515

1616
--------------------------------------------------------------------------------------------------------------------
17+
<div style="page-break-after: always;"></div>
1718

1819
## Quick start
1920

@@ -44,6 +45,7 @@ Optimized for a Command Line Interface (CLI), CareContacts is ideal for fast typ
4445
1. Refer to the [Features](#features) below for details of each command.
4546

4647
--------------------------------------------------------------------------------------------------------------------
48+
<div style="page-break-after: always;"></div>
4749

4850
## Features
4951

@@ -71,6 +73,8 @@ Optimized for a Command Line Interface (CLI), CareContacts is ideal for fast typ
7173
* 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.
7274
</box>
7375

76+
<div style="page-break-after: always;"></div>
77+
7478
### Viewing help : `help`
7579

7680
Shows a help window with a small set of essential commands to help new users get started quickly.
@@ -81,12 +85,11 @@ This help window is not a complete reference of all available commands.
8185
Some commands (e.g., edit, import, etc.) are not included.
8286
For the full list of features and commands, refer to the User Guide.
8387

84-
Format: help
88+
Format: `help`
8589

8690
![help message](images/helpWindow.png)
8791

88-
Format: `help`
89-
92+
<div style="page-break-after: always;"></div>
9093

9194
### Adding a person: `add`
9295

@@ -103,23 +106,38 @@ Examples:
103106
* `add n/James Cook a/12 ad/Blk 132 Edgedale Plains, #15-96 pn/Madison Cook pc/87654321 pe/maddie@gmail.com`
104107
* `add n/Mary Chew a/7 ad/Blk 123 Bukit Merah Lane, #12-23 pn/Augusta Chew pc/12345678 pe/augusta@email.com t/allergies t/basketball`
105108

106-
### Duplicate name detection
109+
<div markdown="block" class="alert alert-info">
110+
111+
### Duplicate Name Detection
107112

108-
If a student whose name matches an existing name after normalization is added, the system will display a warning and show a list of similar names. However, the student will still be added.
113+
When adding a student, the system checks for possible duplicates based on the student's **name and age**.
109114

110-
A name is considered a match after normalization if the name is the same after:
115+
#### Exact Duplicates (Blocked)
116+
A student will **not be added** if both of the following match exactly:
117+
- Name (after ignoring leading and trailing spaces)
118+
- Age
111119

112-
* Differences in capitalization are ignored
113-
* Extra spaces are removed
120+
#### Potential Duplicates (Warning Only)
121+
The system will display a message **warning** the user of a potential duplicate and show a list of possible duplicates if the student names are the same **after normalization**.
114122

115-
For example, `John Doe` and `john doe ` are treated as the same name.
123+
#### Name Normalization Rules
124+
Names are considered the same after normalization if:
125+
- Differences in capitalization are ignored
126+
- Reducing multiple spaces between words to a single space
116127

117-
Limitations:
128+
Example:
129+
- `John Doe` and `john doe ` are treated as the same name
118130

119-
This check is limited and may miss some similar names
120-
For example:
121-
* `Justine Ong` vs `Justin Ong` will not trigger a warning
122-
* `Annabelle` vs `Anna Belle` will not trigger a warning
131+
#### ⚠️ Limitations
132+
This duplicate detection is limited and may miss some similar names.
133+
134+
Examples that will **NOT** trigger a warning:
135+
- `Justine Ong` vs `Justin Ong`
136+
- `Annabelle` vs `Anna Belle`
137+
138+
</div>
139+
140+
<div style="page-break-after: always;"></div>
123141

124142
### Listing all persons : `list`
125143

@@ -133,6 +151,8 @@ Format: `list [n/] | [a/] | [pn/] | [pc/] | [pe/]`
133151
* Alphabetical sort is applied to `n/`, `pn/` and `pe/`.
134152
* Numeric sort in ascending order is applied to `a/` and `pc/`.
135153

154+
<div style="page-break-after: always;"></div>
155+
136156
### Editing a person : `edit`
137157

138158
Edits an existing person in the address book.
@@ -150,6 +170,8 @@ Examples:
150170
* `edit 2 n/Betsy Crower t/` Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags.
151171
* `edit 3 pc/91234567 pe/johndoe@example.com` Edits the phone number and email address of the 3rd person's parent to be `91234567` and `johndoe@example.com` respectively.
152172

173+
<div style="page-break-after: always;"></div>
174+
153175
### Locating persons by name: `find`
154176

155177
Filter students based on matching keywords to specified fields.
@@ -180,6 +202,8 @@ Examples:
180202
![result for 'find alex david'](images/findAlexDavidResult.png)
181203
* `find n/Alice pn/Tan a/12` returns all students named `Alice`, and students whose parent's name contains `Tan`, and students who are exactly 12 years old.
182204

205+
<div style="page-break-after: always;"></div>
206+
183207
### Deleting a student : `delete`
184208

185209
Deletes the specified student from the address book.
@@ -198,6 +222,8 @@ Examples:
198222
* `list` followed by `delete 2` deletes the 2nd person in the address book.
199223
* `find Betsy` followed by `delete 1` deletes the 1st person in the results of the `find` command.
200224

225+
<div style="page-break-after: always;"></div>
226+
201227
### Adding or removing a remark from a student : `remark`
202228

203229
Adds a remark to the specified student from CareContacts.
@@ -216,6 +242,7 @@ Examples:
216242
* `remark 1 r/enjoys sports d/allergic to shellfish c/1C b/very energetic`
217243
adds the following remarks to the student at index 1
218244

245+
<div style="page-break-after: always;"></div>
219246
<a id="importing-students"></a>
220247

221248
### Importing students : `import`
@@ -247,22 +274,30 @@ Examples:
247274
* `import data/contacts.csv`
248275
* `import "data/term 2/students.csv"`
249276

277+
<div style="page-break-after: always;"></div>
278+
250279
### Clearing all entries : `clear`
251280

252281
Clears all entries from the address book.
253282

254283
Format: `clear`
255284

285+
<div style="page-break-after: always;"></div>
286+
256287
### Exiting the program : `exit`
257288

258289
Exits the program.
259290

260291
Format: `exit`
261292

293+
<div style="page-break-after: always;"></div>
294+
262295
### Saving the data
263296

264297
CareContacts data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually.
265298

299+
<div style="page-break-after: always;"></div>
300+
266301
### Importing the data
267302

268303
Use the `import` command to load students from a CSV file:
@@ -271,21 +306,21 @@ Use the `import` command to load students from a CSV file:
271306

272307
Refer to [Importing students : `import`](#importing-students) for the required CSV format.
273308

309+
<div style="page-break-after: always;"></div>
310+
274311
### Editing the data file
275312

276313
CareContacts 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.
277314

315+
<div style="page-break-after: always;"></div>
316+
278317
<box type="warning" seamless>
279318

280319
**Caution:**
281320
If your changes to the data file makes its format invalid, CareContacts 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.<br>
282321
Furthermore, certain edits can cause the CareContacts to behave in unexpected ways (e.g., if a value entered is outside the acceptable range). Therefore, edit the data file only if you are confident that you can update it correctly.
283322
</box>
284323

285-
### Archiving data files `[coming in v2.0]`
286-
287-
_Details coming soon ..._
288-
289324
--------------------------------------------------------------------------------------------------------------------
290325

291326
## FAQ

0 commit comments

Comments
 (0)