Community libraries are a testament to the goodwill of the community, but what is stopping bad actors from taking advantage of your library?
Welcome to MyBookshelf, a desktop application for Community Library Managers like you!
MyBookshelf is here to provide you with a framework to better manage library user contacts, books, and borrowing activity.
MyBookshelf provides you with a contact list to help keep track of library users, a library to keep track of your books and a novel Merit Score system to help manage library users' ability to borrow books.
This application is tailored for fast typists, optimised for use via a Command Line Interface (CLI) while not compromising on the benefits of a Graphical User Interface (GUI).
If you need help with running MyBookshelf, this user guide is designed to help you with:
Ensure that you have Java 11
or above installed in your computer.
Java 11
, you are recommended to download it from here Download the latest mybookshelf.jar
from here.
Copy and paste the file to you will use as the home folder for the MyBookshelf app.
mybookshelf.jar
and paste it to the folder you will use as the home folder for the MyBookshelf app.
Access the command prompt.
cd
into the folder you placed mybookshelf.jar
file in, and enter the following command to run the application.
java -jar mybookshelf.jar
A window similar to the one below should appear in a few seconds. Notice that the app initialises with some sample data.
Type the command into the command box and press Enter to execute it. e.g. typing help
and pressing Enter will open the help window.
You can refer to Glossary for the definition of some words used and Command Summary for a quick overview of the commands. Refer to the Features below for more details of each command.
Ensure that you have Java 11
or above installed in your computer.
Java 11
, you are recommended to download from here Download the latest mybookshelf.jar
from here.
Copy and paste the file to you will use as the home folder for the MyBookshelf app.
mybookshelf.jar
and paste it to the folder you will use as the home folder for the MyBookshelf app.
Access the terminal.
cd
into the folder you placed mybookshelf.jar
file in, and enter the following command to run the application.
java -jar mybookshelf.jar
A window similar to the one below should appear in a few seconds. Notice that the app initialises with some sample data.
Type the command into the command box and press Enter to execute it. E.g. typing help
and pressing Enter will open the help window.
You can refer to Glossary for the definition of some words used and Command Summary for a quick overview of the commands. Refer to the Features below for more details of each command.
File
and Help
tabs.Words in UPPER_CASE
are the parameters to be supplied by the user.
e.g. in add n/NAME
, NAME
is a parameter which can be used as add n/John Doe
.
Items in square brackets are optional.
e.g n/NAME [t/TAG]
can be used as n/John Doe t/friend
or as n/John Doe
.
Items with …
after them can be used multiple times including zero times.
e.g. [t/TAG]…
can be used as (i.e. 0 times),
t/friend
(i.e. 1 times), t/friend t/family t/TAGS ...
(i.e. multiple times).
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.
Extraneous parameters for commands that do not take in parameters (such as help
, list
, exit
and clear
) will be ignored.
e.g. if the command specifies help 123
, it will be interpreted as help
.
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.
NAME
: The name of the library user to be added.
/
, -
and ,
in names.NAME
is case-sensitive.
PHONE_NUMBER
: The phone number of the library user.
EMAIL
: The email address of the library user.
local-part@domain
.local-part
contains alphanumeric characters and some special characters such as +
, _
, .
and -
.local-part
may not start or end with any special characters.local-part
must be followed with an @
.domain
is made up of one or more domain label
.
domain label
is separated by a .
.domain label
must be at least 2 characters long.domain label
must start and end with alphanumeric characters.domain label
contains alphanumeric characters, separated only by -
, if any.
ADDRESS
: The home address of the library user.
TAG
: To associate library users with extra information.
INDEX
: The number associated with the position of each library user in the current displayed Contact List.
INDEX
in the contact list.KEYWORD
: The part of the word you are searching for.
KEYWORD
is case-insensitive.
BOOKTITLE
: The title of the book.
BOOKTITLE
is case-sensitive.
THRESHOLD
: The merit score limit set for each library user.
help
Shows a message explaining how to access the help page.
Format: help
add
Adds a new library user to the contact list. Parameters are populated with the library user's personal information.
Format: add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…
Tip: A user can have any number of tags (including 0).
Note: User with name identical to another user is deemed as a duplicate (case-sensitive), even when other information is different.
Example:
add n/Kokoro Tsurumaki p/980101296 e/kokoro@bandori.com a/311, Hanasakigawa Ave 2, #08-08
list
Displays a list of all library users in the contact list.
Format: list
edit
Edits an existing library user's personal information from the contact list.
Format: edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]…
INDEX
. This index refers to the index number of the target library user in the contact list.t/
without specifying any tags after it.Example:
edit 2 n/Mashiro Kurata
edits the name of the 2nd person to be Mashiro Kurata
.
Before edit:
Edit:
find
Finds library users whose names matches any of the given keywords.
Format: find KEYWORD [MORE_KEYWORDS]
KEYWORD
) is case-insensitive. E.g hans
will match Hans
.Hans Bo
will match Bo Hans
.Han
will not match Hans
.OR
search).
E.g. Hans Bo
will return Hans Gruber
, Bo Yang
Example:
delete
Deletes the specified library user from the contact list through its index.
Format: delete INDEX
INDEX
.Warning: delete
removes all the target user's data, including their merit score and borrowing book list.
Examples:
list
followed by delete 2
deletes the 2nd user in the contact list.
find kokoro mashiro
followed by delete 2
deletes the 2nd user in the results of the find
command.
Before delete:
Delete:
addbook
Adds a book to the library's book list.
Format: addbook b/BOOKTITLE
BOOKTITLE
to the library and stores it.Example:
addbook b/Tales of Kokoro
will add a book titled "Tales of Kokoro" into the library.delbook
Removes a book from the library's book list.
Format: delbook b/BOOKTITLE
BOOKTITLE
from the library.Warning: To avoid accidental deletion, delbook
only removes the first book which matches BOOKTITLE
, even there are multiple books with identical BOOKTITLE
.
Example:
delbook b/Tales of Kokoro
will remove a book titled "Tales of Kokoro" from the library.borrow
Library user borrows a book. A book is removed from the library's book list and added to the library user's book list.
Format: borrow INDEX b/BOOKTITLE
INDEX
in the contact list borrows a book titled BOOKTITLE
.Example:
borrow 1 b/Tales of Kokoro
will record the user index 1 borrowing a book titled "Tales of Kokoro".return
Library user returns a book. A book is removed from the library user's book list and added to the library's book list.
Format: return INDEX b/BOOKTITLE
INDEX
in the contact list returns a book titled BOOKTITLE
.Example:
return 1 b/Tales of Kokoro
returns a book titled "Tales of Kokoro" from the user at index 1.donate
Library user donates a book. A book is added to the library's book list.
Format: donate INDEX b/BOOKTITLE
INDEX
in the contact list donates a book titled BOOKTITLE
.Note: This differs from addbook
as this command also increases the merit score of the associated library user.
Example:
donate 1 b/Tales of Kokoro
will record user index 1 donating a book titled "Tales of Kokoro".limit
Sets the limit of the library such that only users with a merit score more than or equal to the set limit can borrow.
Format: limit [THRESHOLD]
THRESHOLD
.THRESHOLD
is not allowed to borrow from the library.THRESHOLD
is optional. Typing limit
without THRESHOLD
will display the currently set threshold.Examples:
limit
will display the current merit score limit.limit -10
will set the merit score limit of the library to -10.clear
Clears all entries of library users from the contact list.
Format: clear
Note: clear
only supports clearing all users in the contact list. To clear all books from the library, refer to the tutorial on clearing the library.
exit
Exits the program.
Format: exit
MyBookshelf offers an automated data saving feature.
This ensures that any modifications to your library's records will be preserved on your hard disk without necessitating manual intervention.
This functionality simplifies your workflow by automatically saving your progress, enabling seamless continuation from your last session upon reopening the application.
MyBookshelf also focuses on data integrity, guaranteeing that only accurate records are maintained within the system.
Invalid data for available books will be automatically discarded and will not be saved.
User data in MyBookshelf is saved automatically as a JSON file at [JAR file location]/data/addressbook.json
.
Library book data in MyBookshelf is saved automatically as a .txt file at [JAR file location]/data/library.txt
.
Experienced users are welcome to make changes to the data directly by editing these data files.
Warning:
If your changes to the data file makes its format invalid, MyBookshelf will discard all saved data and start with an empty data file at the next run.
Hence, it is recommended to have a backup of the file ready before editing it.
Furthermore, certain edits can cause the MyBookshelf 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.
limit
command to set the threshold.edit
can only be used to change the library user's personal information. This includes his/her name, phone number, email address, home address and tags. (Not merit score and user's book list).add
and edit
command DOES NOT support the direct adding and/or editing of merit score or user's book list.add
, delete
, edit
, clear
and find
commands are for managing users, while addbook
, delbook
, borrow
, donate
and return
commands are for managing books.BOOKTITLE
is case-sensitive to allow books of similar titles to be differentiated.BOOKTITLE
(expect that it cannot be empty), we cannot guarantee the performance when books with titles in other languages are inserted.delbook
deletes one book at a time to prevent accidental deletion of all entries with the same book title.findbook
command has not been implemented yet and would make indexing specific books in a large book list unfeasible.delete
to remove the library user's book list. This allows for more flexibility in managing the library. If books are returned, the library manager can use the return
command to account for the books before deleting the person.You might see something similar to the image below when the command does not run successfully.
Error message received: Book title cannot be empty!
BOOKTITLE
.BOOKTITLE
so it consists at least one non-white space character.Error message received: Multiple values specified for the following single-valued field(s): b/
BOOKTITLE
containing " b/". (Note the white space before "b"). In this case, BOOKTITLE
is interpreted to be "Please b/ careful".
b/
is the prefix of Book
, MyBookshelf restricts commands with BOOKTITLE
containing " b/".BOOKTITLE
(e.g. Please b careful) or;BOOKTITLE
(e.g. Please ./b careful).Error message received: Book title cannot be empty!
BOOKTITLE
.BOOKTITLE
so it consists at least one non-white space character.Error message received: Multiple values specified for the following single-valued field(s): b/
BOOKTITLE
containing " b/" (note the white space before "b"). In this case, BOOKTITLE
is interpreted to be "Please b/ careful".
b/
is the prefix of Book
, MyBookshelf restricts commands with BOOKTITLE
containing " b/".BOOKTITLE
(e.g. Please b careful) or;BOOKTITLE
(e.g. Please ./b careful).Error message received: Book: BOOKTITLE is not available in the library.
BOOKTITLE
.
BOOKTITLE
of the book you want to delete/borrow and run the command with correct BOOKTITLE
.BOOKTITLE
that does not match any of the BOOKTITLE
(s) in the library.
BOOKTITLE
exists in the library.Tags names should be alphanumeric.
Error message received: The person index provided is invalid.
INDEX
of the library user and run the command with correct INDEX
.INDEX
exists in the library user contact list.Other error message received:
Book title cannot be empty!
or Multiple values specified for the following single-valued field(s): b/
Error message received: The person index provided is invalid.
INDEX
of the library user and run the command with correct INDEX
.Error message received: User has insufficient Merit Score.
limit
command.Other error message received:
Book title cannot be empty!
or Multiple values specified for the following single-valued field(s): b/
or Book: BOOKTITLE is not available in the library.
Error message received: The person index provided is invalid.
INDEX
of the library user and run the command with correct INDEX
.Error message received: Person is currently not borrowing any books!
INDEX
of the library user and run the command with correct INDEX
.Error message received: Person does not have this book borrowed currently!
INDEX
of the library user and run the command with correct INDEX
.BOOKTITLE
of the book the user wants to return and run the command with correct BOOKTITLE
.Other error message received:
Book title cannot be empty!
or Multiple values specified for the following single-valued field(s): b/
clear
clearlib
command to clear all books currently in your library.clear
command to clearuser
to clear all the data of library users.clearall
command to clear both library book and library user data.findbook
commandfindbook
command will allow the library manager quickly check for the existence of a specific book in the library.undo
and redo
commandsundo
command, your experience will be enhanced as these mistakes can be reverted with a simple yet effective command.redo
command further improves your experience by allowing users to effortlessly revert back to undone actions, refining the process.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 MyBookshelf home folder.
Q: How do I manually change the merit score of a library user that I have added?
A: Please read the tutorial section on increasing and decreasing merit score.
Q: Can I clear both the contact list and the library at the same time?
A: Unfortunately, MyBookshelf currently cannot clear both the contact list and the library at the same time. You can use the clear
command to clear the contact list and refer to this section to clear the library.
MyBookshelf is always a Work-In-Progress as we are constantly refining our application for your needs. Listed below are some of our planned enhancements as well as current limitations, to keep you abreast of the current state of our application.
preferences.json
file created by the application before running the application again..com
, .net
and .org
. Refer to the Developer Guide for more information.-2147483648 to 2147483647
is used for INDEX
and THRESHOLD
, the wrong error message is displayed. Will be fixed in the future. Refer to the Developer Guide for more information.INDEX
and THRESHOLD
do not have a limit to the number of characters. Refer to the Developer Guide for more information.clear
command only clears the library user data. The usage pertaining to this command will be made clearer with the implementation of future features. Refer to the Future Features section above for more information.With the current features, there is no direct command to manually increase the merit score of a library user.
You can use the following steps below to indirectly increase the merit score of an individual library user:
donate
.delbook
.Example: You want to increase the merit score of the third library user by 2.
donate 3 b/placeholder book
.donate 3 b/placeholder book
.delbook b/placeholder book
.delbook b/placeholder book
.With the current features, there is no direct command to manually decrease the merit score of a library user.
Warning: Due to current limitations, following this method will force the library user's book list to change.
You can use the following steps below to indirectly increase the merit score of an individual library user:
addbook
.borrow
.Example: You want to decrease the merit score of the second library user by 2.
addbook b/~~~ignore book~~~
.addbook b/~~~ignore book~~~
.borrow 2 b/~~~ignore book~~~
.borrow 2 b/~~~ignore book~~~
.Tips: Since these placeholder books will stay in the library user's book list, you should name your placeholder books with names that can be easily differentiated and ignored.
Keeping the placeholder books titled the same and using characters that can be sorted to the bottom alphabetically (use larger values in this chart) can also help.
Using this method will not alter the library user's book list. Please read the above section on Editing Data Files before proceeding.
[JAR file location]/data/addressbook.json
.The current clear
command is designed to clear the contact list only but there is no command to clear books from the library.
The safest method to clear the library would be to individually delete each book from the library using the delbook
command.
You can quickly delete books from the library by directly editing the data file. Please read the above section on Editing Data Files before proceeding.
[JAR file location]/data/library.txt
.Warning: In this version of MyBookshelf, you can put in an invalid input into the library.txt
file (E.g. non-number for merit score/whitespace for book title) and the data file will be treated as corrupted, causing the program to start up with an empty library.
While this is a method you can also use to clear the library, we highly advise against purposefully corrupting your own data files as you will reset the limit you have set for your library.
We also cannot guarantee that this will not cause unexpected behaviour in other parts of MyBookshelf and this may not work for future versions of MyBookshelf.
Action | Format, Examples |
---|---|
Add | add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]… e.g., add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 t/goodDonater t/sponsor |
Clear | clear |
Delete | delete INDEX e.g., delete 3 |
Edit | edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]… e.g., edit 2 n/James Lee e/jameslee@example.com |
Find | find KEYWORD [MORE_KEYWORDS] e.g., find James Jake |
List | list |
Help | help |
AddBook | addbook b/BOOKTITLE e.g., addbook b/Tales of Kokoro |
DelBook | delbook b/BOOKTITLE e.g., delbook b/Tales of Kokoro |
Borrow | borrow INDEX b/BOOKTITLE e.g., borrow 1 b/Tales of Kokoro |
Return | return INDEX b/BOOKTITLE e.g., return 1 b/Tales of Kokoro |
Donate | donate INDEX b/BOOKTITLE e.g., donate 1 b/Tales of Kokoro |
Limit | limit [THRESHOLD] e.g. limit 0 |
CLI: Command-Line Interface, a tool you employ to communicate with your operating system via your keyboard.
GUI: Graphical User Interface, a graphical interface where users engage with visual elements like icons, buttons, and menus.
JSON: JavaScript Object Notation, a text format for storing and transporting data.
Parameter: Data that users input into commands.
Alphanumeric: A character that is either a letter or a number.
Library User: The people that are saved into the contact list of MyBookshelf. Sometimes referred to as "borrowers" or "person".
Library Manager: Community Library Managers (CLM) are the people using the MyBookshelf application. CLMs are responsible for adding, storing, and updating the entire library database via MyBookshelf.
Contact List: Refers to the list of library users currently stored in the MyBookshelf application. It appears in the left column of the User Interface.
Book: Identified by its BOOKTITLE
. Appears in both the User's Book List
and the Library Book List
.
User's Book List: Refers to the list of Book
(s) currently borrowed by an individual library user.
Library Book List: Refers to the list of available Book
(s) currently stored in the MyBookshelf application. It appears in the right column of the User Interface. Sometimes referred to as "available books" or simply "library".
Command: Instructions given to the application to perform specific tasks.
Merit Score: A score associated with each Library User
. This score provides an estimate of the number of books a library user can borrow.
Limit: Refers to limit set for the library and is synonymous with THRESHOLD
, where library users are only allowed to borrow books when their merit score is greater or equal than the limit that has been set.
Threshold: The minimum merit score required for a library user to borrow books from the library.
Data Saving: The automated feature of the application that preserves modifications to the library's records by saving them on the hard disk.