By: Team W11-04
Since: Feb 2019
Licence: MIT
- 1. Introduction
- 2. Quick Start
- 3. Features
- 3.1. Book Commands
- 3.2. Review Commands
- 3.3. System Commands
- 3.3.1. Viewing help :
help
- 3.3.2. Listing entered commands :
history
- 3.3.3. Undoing previous command :
undo
- 3.3.4. Redoing the previously undone command :
redo
- 3.3.5. Providing statistics of all the books read :
summary
- 3.3.6. Clearing all entries :
clear
- 3.3.7. Exiting the program :
exit
- 3.3.8. Saving the data
- 3.3.1. Viewing help :
- 4. FAQ
- 5. Command Summary
1. Introduction
BookSquirrel is for those who want to keep a record of books they’ve read. More importantly, BookSquirrel 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). If you can type fast, BookSquirrel can get your book management tasks done faster than traditional GUI apps. Interested? Jump to the Section 2, “Quick Start” to get started. Enjoy!
2. Quick Start
-
Ensure you have Java version
9
or later installed in your Computer. -
Download the latest
bookSquirrel.jar
here. -
Copy the file to the folder you want to use as the home folder for your application.
-
Double-click the file to start the app. The main window should appear in a few seconds, as shown in the screenshot below.
-
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:
-
addBook
n/Alice in Wonderland a/Lewis Carroll m/5 t/fantasy t/fairy tale
: adds a book namedAlice in Wonderland
to the record. The book is written byLewis Carroll
, with a rating of 5, and labeled with tagsfairy tale
andfantasy
. -
exit
: exits the app
-
-
Refer to Section 3, “Features” for details of each command.
3. Features
Command Format
-
The total length of user input should not exceed 500 characters (space included).
-
Words in
UPPER_CASE
are the parameters to be supplied by the user e.g. inaddBook n/NAME
,NAME
is a parameter which can be used asaddBook n/Book
. -
Words in
UPPER_CASE
without brackets are the parameters that should only be supplied once e.g. inaddBook n/NAME
,NAME
is a parameter which should only appear once in user input,addBook n/John Doe n/Alice
is not allowed. -
Items in square brackets are optional (can be supplied once or not at all) e.g
n/NAME [a/AUTHOR]
can be used asn/Alice in Wonderland a/Jack
or asn/Alice in Wonderland
. -
Items with
…
after them can be used multiple times including zero times e.g.[t/TAG]…
can be used ast/fantasy
,t/fantasy t/textbook
etc. -
Parameters can be in any order e.g. if the command specifies
n/NAME a/AUTHOR
,a/AUTHOR n/NAME
is also acceptable. -
Book name, review title and review content should only contain alphanumeric characters, space,
*
,,
,.
,?
,'
,(
,)
and&
. -
Author and tag should only contain alphanumeric characters and spaces.
-
The Book name and author should not exceed 50 characters (space included).
-
Review title should not exceed 50 characters (space included).
-
Review content should not exceed 400 characters (space included).
-
Rating should be an integer from 0 to 10 inclusive and the input should be 1 or 2 digit number.
-
Tags should not exceed 20 characters (space included).
3.1. Book Commands
3.1.1. Adding a book: addBook
Adds a book to the Bookshelf
Format: addBook n/BOOKNAME a/author m/RATING [t/TAG]…
Examples:
-
addBook n/Alice in Wonderland a/Lewis Carroll m/5 t/fantasy t/fairy tale
Adds a book named Alice in Wonderland to the record. The book is written by Lewis Carroll, rated 5 stars, and labeled with tags ‘fantasy’ and ‘fairy tale’.
Figure 1. Result display after successful execution of addBook n/Alice in Wonderland a/Lewis Carroll m/5 t/fantasy t/fairy tale
.
3.1.2. Editing book entry : editBook
Edits an existing book entry (eg. edit the book name, rating, author or tag).
Format: editBook INDEX [n/BOOKNAME] [a/AUTHOR] [m/RATING] [t/TAG]…
Examples:
-
editBook 1 n/Alice in Wonderland a/some author t/some tag
Change the name, author, tag of the first book to Alice in Wonderland, some author, some tag.
Figure 2.1 Result display before the the execution of editBook 1 n/Alice in Wonderland a/some author t/some tag
.
Figure 2.2 Result display after the the execution of editBook 1 n/Alice in Wonderland a/some author t/some tag
.
-
editBook 2 t/
Clear all the existing tags of the second book in the result list.
3.1.3. Deleting a book : deleteBook
Deletes the specified book from the Bookshelf.
Format: deleteBook INDEX
Examples:
-
listBook n/Computer Security
deleteBook 1
Deletes the 1st book in the results of the listBook command.
Figure 3.1 Result display before the the execution of deleteBook 1
.
Figure 3.1 Result display after the the execution of deleteBook 1
.
3.1.4. Listing book entries : listBook
Shows a list of all book entries, with the specified keywords of bookname, author, tag and rating.
Format: listBook [n/BOOKNAME] [a/AUTHOR] [t/TAG] [m/RATING]
Examples:
-
listBook t/textbook m/5
Books with the rating 5 or the tag textbook will be displayed. -
listBook n/CS2104T t/textbook
Books whose name contains the keyword CS2104T or tags include textbook will be displayed. -
listBook m/5 m/6
Books whose rating is 5 or 6 wil be displayed. -
listBook n/Madame n/Prejudice m/6 m/8
Madame Bovary and Pride and Prejudice will be displayed
3.1.5. Sort books command : sortBook
sort booklist in specify order.
Format: sortBook st/TYPE… [o/ORDER] [o1/ORDER] [o2/ORDER] [o3/ORDER]
Examples:
-
sortBook st/name
sort bookList by book name in ascending order. -
sortBook st/rating st/name o1/des
sort bookList by the rating of the book in descending order and if they having the same rating it will sort them by book name in ascending order. -
sortBook st/author st/rating o/des o2/asc
sort bookList by the author in descending order and if they having the same rating it will sort them by rating in des order. (o/des overwrite o2/asc) -
sortBook st/rating st/author st/name o1/des o3/asc
sort bookList by rating in descending order and since the o2 order is not specified, if the same rating it will consider author as ascending order.
3.2. Review Commands
3.2.1. Adding a book review: addReview
Adds a book review to a certain book in the Bookshelf
Format: addReview n/BOOKNAME rt/REVIEW TITLE r/REVIEW MESSAGE
Examples:
-
addReview n/Alice in Wonderland rt/An interesting child book r/While Lewis Carroll purists will scoff at the aging of his curious young protagonist, most movie audiences will enjoy this colorful world.
-
addReview n/Structure and Interpretation of Computer Programs rt/Computing Bible r/A very difficult book:(
3.2.2. Deleting a book review: deleteReview
Deletes the review of the specified index number from the review list.
Format: deleteReview INDEX
Example:
-
deleteReview 1
3.2.3. Listing all book reviews: listAllReviews
Lists all the reviews in the BookShelf.
Format: listAllReviews
3.2.4. Listing book reviews of a certain book : listReview
Lists the reviews of the book identified by the index number used in the displayed Bookshelf.
Format: listReview INDEX
Example:
-
listReview 1
3.2.5. Selecting an review: selectReview
Selects a review.
Format: selectReview INDEX
Example:
-
selectReview 1
3.3. System Commands
3.3.1. Viewing help : help
Offer a guide of all possible commands.
Format: help
3.3.2. Listing entered commands : history
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. |
3.3.3. Undoing previous command : undo
Restores the records to the state before the previous undoable command was executed.
Format: undo
Undoable commands: those commands that modify the records content ( |
Examples:
-
listBook n/Alice
deleteBook 1
undo
(reverses thedeleteBook 1
command) -
sortBook st/rating
undo
(reverses thesortBook st/rating
command) -
listBook a/James
undo
Theundo
command fails as there are no undoable commands executed previously. -
deleteBook 1
clear
undo
(reverses theclear
command)
undo
(reverses thedeleteBook 1
command)
3.3.4. Redoing the previously undone command : redo
Reverses the most recent undo
command.
Format: redo
Examples:
-
deleteBook 1
undo
(reverses thedeleteBook 1
command)
redo
(reapplies thedeleteBook 1
command) -
deleteBook 1
redo
Theredo
command fails as there are noundo
commands executed previously.
3.3.5. Providing statistics of all the books read : summary
Generate a summary of all the books read so far.
Format: summary
Examples:
-
summary
An example of a summaryYou’ve read 9 books. You prefer books by Erika Leonard, as you’ve read: Fifty Shades of Grey, Fifty Shades Darker. Book(s) receive a rating of 10 from you: To Kill a Mocking Bird. You prefer books that you labeled as fantasy(including The Hunger Games, Life of Pi).
3.3.6. Clearing all entries : clear
Clears all entries from the bookshelf.
Format: clear
3.3.7. Exiting the program : exit
Exits the program.
Format: exit
3.3.8. Saving the data
Book review data are saved in the hard disk automatically after any command that changes the data.
There is no need to save manually.
4. FAQ
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 BookSquirrel folder.
5. Command Summary
5.1. Book Commands
-
AddBook
addBook n/BOOKNAME a/author m/RATING(0-10) [t/TAG]…
e.g.addBook n/Alice in Wonderland a/Lewis Carroll m/5 t/fantasy t/textbook
-
EditBook :
editBook INDEX [n/BOOKNAME] [a/AUTHOR] [m/RATING]…
e.g.editBook 1 n/Alice in Wonderland a/some author
-
DeleteBook :
deleteBook INDEX
e.g.deleteBook 4
-
ListBook :
listBook [n/NAME] [t/TAG] [m/RATING] [a/Author]
e.g.listBook t/textbook m/5
-
sortBook :
sortBook st/TYPE o/ORDER
e.g.sortBook st/AUTHOR o/ASC
5.2. Review Commands
-
AddReview
addReview n/BOOKNAME r/review
e.g.addReview n/Alice in Wonderland r/While Lewis Carroll purists will scoff at the aging of his curious young protagonist, most movie audiences will enjoy this colorful world.
-
DeleteReview :
deleteReview INDEX
eg.deleteReview 1
-
ListAllReviews :
listAllReviews
e.g.listAllReviews
-
ListReview :
listReview INDEX
e.g.listReview 1
-
SelectReview :
selectReview INDEX
e.g.selectReview 1
5.3. System Commands
-
Help :
help
-
History :
history
-
Undo :
undo
-
Redo :
redo
-
Summary :
summary
-
Clear :
clear
-
Exit :
exit