By: CS2103JAN2018-F12-B2
Since: Feb 2018
Licence: MIT
- 1. Introduction
- 2. Quick Start
- 3. Features
- 3.1. Viewing help :
help
- 3.2. Adding a person:
add
- 3.3. Listing all persons :
list
- 3.4. Filtering all persons according to BMI Classification :
bmi
- 3.5. Editing a person :
edit
- 3.6. Locating persons by name:
find
- 3.7. Deleting a person :
delete
- 3.8. Selecting a person :
select
- 3.9. Show Google Calendar :
calendar
- 3.10. Add event to Google Calendar :
addEvent
- 3.11. Show Calories a person requires :
Calories
- 3.12. Scheduling appointments with clients
[coming in v2.0]
- 3.13. Cancelling appointments with clients
[coming in v2.0]
- 3.14. Sharing workouts with clients
[coming in v2.0]
- 3.15. Obtaining feedback from clients
[coming in v2.0]
- 3.16. Listing entered commands :
history
- 3.17. Undoing previous command :
undo
- 3.18. Redoing the previously undone command :
redo
- 3.19. Clearing all entries :
clear
- 3.20. Exiting the program :
exit
- 3.21. Saving the data
- 3.22. Encrypting data files
[coming in v2.0]
- 3.1. Viewing help :
- 4. FAQ
- 5. Command Summary
Personal Trainer Pro (PTP) is for those who prefer to use a desktop app for managing clients. More importantly, PTP is optimized for those who prefer to work with a Command Line Interface (CLI) while still having the benefits of a Graphical User Interface (GUI). Personal Trainers can make use of the application to manage their clients, schedule appointments, and view their clients' progress. If you can type fast, PTP can get your client management tasks done faster than traditional GUI apps. Interested? Jump to the Section 2, “Quick Start” to get started. Enjoy!
-
Ensure you have Java version
1.8.0_60
or later installed in your Computer.ℹ️Having any Java 8 version is not enough.
This app will not work with earlier versions of Java 8. -
Download the latest
PTP.jar
here. -
Copy the file to the folder you want to use as the home folder for your Address Book.
-
Double-click the file to start the app. The GUI should appear in a few seconds.
-
Type the command in the command box and press Enter to execute it.
e.g. typinghelp
and pressing Enter will open the help window. -
Some example commands you can try:
-
list
: lists all clients -
add
n/John Doe p/98765432 e/[email protected] a/John street, block 123, #01-01 h/169.0 w/55.5 g/M age/22
: adds a contact namedJohn Doe
to the Personal Trainer Pro application. -
delete
3
: deletes the 3rd contact shown in the current list -
exit
: exits the app
-
-
Refer to Section 3, “Features” for details of each command.
Command Format
-
Words in
UPPER_CASE
are the parameters to be supplied by the user e.g. inadd n/NAME
,NAME
is a parameter which can be used asadd n/John Doe
. -
Items in square brackets are optional e.g
n/NAME [t/TAG]
can be used asn/John Doe t/friend
or asn/John Doe
. -
Items with
…
after them can be used multiple times including zero times e.g.[t/TAG]…
can be used ast/friend
,t/friend t/family
etc. -
Parameters can be in any order e.g. if the command specifies
n/NAME p/PHONE_NUMBER
,p/PHONE_NUMBER n/NAME
is also acceptable.
Adds a person to the address book
Format: add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS h/HEIGHT w/WEIGHT g/GENDER age/AGE al/ACTIVITYLEVEL [t/TAG]…
💡
|
A person can have any number of tags (including 0) |
Examples:
-
`add n/John Doe p/98765432 e/[email protected] a/John street, block 123, #01-01 h/173.0 w/55.5 g/M age/22 al/1.2 `
-
add n/Betsy Crowe t/friend e/[email protected] a/Newgate Prison p/1234567 h/169.0 w/66.7 g/f age/21 al/1.9 t/criminal
Shows a list of all persons in the PTP application.
Format: list
Alias: l
Shows a filtered list of all persons in the PTP application whose BMI classification matches the given search query.
Format: bmi KEYWORD [MORE_KEYWORDS]
Keywords (any of the below):
-
Underweight
(BMI < 18.5) -
Acceptable
(18.5 ≤ BMI ≤ 24.9) -
Overweight
(25 ≤ BMI ≤ 29.9) -
Obese
(BMI ≥ 30)
Examples:
-
bmi overweight
-
bmi overweight underweight obese
Edits an existing person in the address book.
Format: edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [h/HEIGHT] [w/WEIGHT] [g/GENDER] [age/AGE] [al/ACTIVITYLEVEL] [t/TAG]…
Alias: e
-
Edits the person at the specified
INDEX
. The index refers to the index number shown in the last person listing. 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.
Examples:
-
edit 1 p/91234567 e/[email protected]
Edits the phone number and email address of the 1st person to be91234567
and[email protected]
respectively. -
e 2 n/Betsy Crower t/
Edits the name of the 2nd person to beBetsy Crower
and clears all existing tags.
Finds persons whose names contain any of the given keywords.
Format: find KEYWORD [MORE_KEYWORDS]
Alias: f
-
The search is case insensitive. e.g
hans
will matchHans
-
The order of the keywords does not matter. e.g.
Hans Bo
will matchBo Hans
-
Only the name is searched.
-
Only full words will be matched e.g.
Han
will not matchHans
-
Persons matching at least one keyword will be returned (i.e.
OR
search). e.g.Hans Bo
will returnHans Gruber
,Bo Yang
Examples:
-
find John
Returnsjohn
andJohn Doe
-
f Betsy Tim John
Returns any person having namesBetsy
,Tim
, orJohn
Deletes the specified person from the address book.
Format: delete INDEX
Alias: d
-
Deletes the person at the specified
INDEX
. -
The index refers to the index number shown in the most recent listing.
-
The index must be a positive integer 1, 2, 3, …
Examples:
-
list
delete 2
Deletes the 2nd person in the address book. -
find Betsy
d 1
Deletes the 1st person in the results of thefind
command.
Selects the person identified by the index number used in the last person listing.
Format: select INDEX
Alias: s
-
Selects the person and loads the Google search page the person at the specified
INDEX
. -
The index refers to the index number shown in the most recent listing.
-
The index must be a positive integer
1, 2, 3, …
Examples:
-
list
select 2
Selects the 2nd person in the address book. -
find Betsy
s 1
Selects the 1st person in the results of thefind
command.
Shows the User’s Google Calendar within the Personal Trainer Pro Application.
Format: calendar
-
Loads the Google Calendar login page.
-
Users have to login the first time. After that, Google Calendar will be displayed upon 'calendar' command.
-
Users will need to re-login if they close and reopen the PTP app.
Examples:
-
calendar
Adds an event to the Google Calendar on the signed-in Google account within the Personal Trainer Pro Application.
Format: addEvent n/EVENT_NAME sd/EVENT_START_DATE st/EVENT_START_TIME ed/EVENT_END_DATE et/EVENT_END_TIME
-
Adds an event to the Google Calendar on the signed-in Google account via Command Line Interface.
-
Upon first use of the 'addEvent' command, users will be prompted via a new browser window to authorize access to PTP app to manage their calendars.
-
Select the account logged in to Google Calendar and click 'allow'.
-
The event will then be added to the user’s Google Calendar.
-
Refresh the calendar to show the newly added event by using the 'calendar' command.
💡
|
Once logged in to Google Calendar, be sure to tick your calendar in the left panel under 'My Calendars' to allow added events to be shown. |
Examples:
-
addEvent n/Weights Training sd/2017-11-30 st/11:30 ed/2017-11-30 et/13:30
Selects the person identified by the index number and shows the amount of calories needed to increase or decrease in weight.
Format: Calories INDEX
Alias: cal
-
Selects the person and loads the Calories calculator page the person at the specified
INDEX
. -
The index refers to the index number shown in the most recent listing.
-
The index must be a positive integer
1, 2, 3, …
Examples:
-
list
Calories 2
Shows the calories of the 2nd person in the address book. -
find Betsy
cal 1
Shows the calories of the 1st person in the results of thefind
command.
Lists all the commands that you have entered in reverse chronological order.
Format: history
ℹ️
|
Pressing the ↑ and ↓ arrows will display the previous and next input respectively in the command box. |
Restores the address book to the state before the previous undoable command was executed.
Format: undo
ℹ️
|
Undoable commands: those commands that modify the address book’s content ( |
Examples:
-
delete 1
list
undo
(reverses thedelete 1
command) -
select 1
list
undo
Theundo
command fails as there are no undoable commands executed previously. -
delete 1
clear
undo
(reverses theclear
command)
undo
(reverses thedelete 1
command)
Reverses the most recent undo
command.
Format: redo
Examples:
-
delete 1
undo
(reverses thedelete 1
command)
redo
(reapplies thedelete 1
command) -
delete 1
redo
Theredo
command fails as there are noundo
commands executed previously. -
delete 1
clear
undo
(reverses theclear
command)
undo
(reverses thedelete 1
command)
redo
(reapplies thedelete 1
command)
redo
(reapplies theclear
command)
Personal Trainer Pro data are saved in the hard disk automatically after any command that changes the data.
There is no need to save manually.
Q: How do I transfer my data to another Computer?
A: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous Address Book folder.
-
Add
add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS h/HEIGHT w/WEIGHT g/GENDER age/AGE al/ACTIVITYLEVEL [t/TAG]…
e.g.add n/James Ho p/22224444 e/[email protected] a/123, Clementi Rd, 1234665 h/169.0 w/55.5 g/M age/22 al/1.9 t/friend t/colleague
-
Clear :
clear
-
Delete :
delete INDEX
e.g.delete 3
-
Edit :
edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [h/HEIGHT] [w/WEIGHT] [g/GENDER] [age/AGE] [al/ACTIVITYLEVEL] [t/TAG]…
e.g.edit 2 n/James Lee e/[email protected]
-
Find :
find KEYWORD [MORE_KEYWORDS]
e.g.find James Jake
-
List :
list
-
Filter :
bmi KEYWORD [MORE_KEYWORDS]
e.g.bmi overweight underweight
-
Help :
help
-
Select :
select INDEX
e.g.select 2
-
Calories :
calories INDEX
e.g.calories 2
-
Calendar :
calendar
-
addEvent :
addEvent n/EVENT_NAME sd/EVENT_START_DATE st/EVENT_START_TIME ed/EVENT_END_DATE et/EVENT_END_TIME
e.g.addEvent n/Weights Training sd/2017-11-30 st/11:30 ed/2017-11-30 et/13:30
-
History :
history
-
Undo :
undo
-
Redo :
redo