User Guide
Table of Contents
- Introduction
- Quick start
- Definitions
- Labels
- Features
-
Commands
- Command summary
- Prefix summary
- Components of Warenager
- Viewing help :
help
- Adding new stock:
add
- Listing of stock:
list
- Deleting of stock:
delete
- Find stocks from inventory:
find
- Find exact stocks from inventory:
findexact
- Update inventory:
update
- Adding notes to stock:
note
- Deleting note(s) from stock:
notedelete
- Viewing details of a stock:
stockview
- Generating statistics:
stats
- Bookmarking stocks in the list:
bookmark
- Unbookmarking stocks in the list:
unbookmark
- Sorting inventory:
sort
- Command Suggestion
- Generating a CSV file that contains all stocks:
print
- Clearing all data in Warenager:
clear
- Toggling tabs:
tab
- Saving data
- Exiting Warenager:
exit
- FAQ
Introduction
Warenager’s User Guide
This user guide introduces our inventory management application, Warenager, and provides support for the usage of its functionalities. For quick reference, we have provided a summarised table of commands and their usage formats.
About Warenager
Warenager is an inventory management application to help warehouse managers of small scale companies keep track of stocks in their warehouse. It optimizes inventory management tasks for warehouse managers including but not exhaustive of updating, searching and sorting stocks via Command Line Interface (CLI), while still having the benefits of a Graphical User Interface (GUI).
Quick start
To get started using Warenager,
-
Ensure you have Java
11
or above installed in your Computer.Installing Java 11
If you have not done Java programming before or have not used CLI-based applications programmed with Java like Warenager, then you probably do not have Java
11
installed in your computer.
You can install Java11
here. -
Download the latest
Warenager.jar
from here. -
Copy the jar file you have just downloaded to the folder you want to use as the home folder for your Warenager.
-
Double-click the jar file to start the application.
The commands available in the current version of Warenager are: add, delete, update, find, findexact, note, notedelete, stockview, stats, sort, print, bookmark, unbookmark, list, tab, help, clear, and exit. Refer to the Commands section to for details of each command.
Definitions
Terms used in Warenager are defined here. If your term is not stated here, google the term to understand more.
Term | Definition |
---|---|
Command Line Interface (CLI) | A command-line interface processes commands to a computer program in the form of lines of text. |
Graphical User Interface (GUI) | The graphical user interface is a form of user interface that allows users to interact with electronic devices through graphical icons. |
Field | Represents the Name, Serial Number, Quantity, Location stored, Source, Note of the stock in inventory. |
Prefixes | The field code that are entered during user input, so that Warenager will know what to do. e.g. q/ , n/ , s/ , sn/ . |
Parameters | Parameters are additional fields to key in during user input and provided after a prefix. e.g. <name> in n/<name> . |
CSV File | Comma-Separated Values File. It contains data separated by commas. |
JSON File | JavaScript Object Notation File. Data interchange format file that uses human-readable text to store and transmit data objects consisting of attribute–value pairs. |
Labels
Label | Meaning |
---|---|
Cautionary advice/Precautions | |
Useful notes/summaries for sections. |
Features
Brief summary of features:
Note: Stocks possess these fields: Name, Serial Number, Source, Quantity, Location etc.
(These stock details are presented in a drop down window)
- Adding stocks: Unique serial number is generated based on the stock item and source company
- Deleting stocks
- Updating stock fields
-
Searching for stocks by
- name of stock
- serial number
- source of stock
- location stored in warehouse
- Adding / Deleting optional notes to stocks
- Viewing all details of a stock
-
Bookmarking stocks: e.g. often used stocks, search bookmark
- Print to generate CSV file for printing of stock list
- Clear to clear all existing data in Warenager
- Tab to toggle between tabs in Warenager
- Listing all stocks in Warenager
- Suggesting valid command formats when an invalid command is entered
- Sorting all stocks according to the field and order specified by the user
- Storage into CSV and JSON files
- Upon start up of the Warenager application, stocks are by default displayed according to the order
in
stockbook.json
Commands
This section provides support for the commands required to perform desired actions on Warenager.
Note for command input format:
-
Words enclosed in
<>
are the input parameters to be supplied by the user.
For example, inn/<name>
,name
is a parameter which can be used asn/Pork Belly
. -
Prefixes not enclosed with anything is compulsory, must be provided by the user, and duplicate is not allowed.
For example, inlist lt/<list type>
, thelt/<list type>
must be provided and no duplicate is allowed.
list
andlist lt/all lt/bookmark
are invalid command formats, butlist lt/all
is valid. -
Prefixes enclosed with
[]
is optional, can be omitted by the user, and duplicate is not allowed.
For example, inupdate sn/<serial number> [n/<name>]
, then/<name>
can be omitted.
update sn/Fairprice1 n/Apple
andupdate sn/Fairprice1
are both valid command formats,
butupdate sn/Fairprice1 n/Apple n/Banana
is not a valid command format. -
Prefixes with
...
trailing after them are allowed to be duplicated.
For example, indelete sn/<serial number> [sn/<serial number>]...
, thesn/<serial number>
must be provided at least once and duplicates are allowed.
delete sn/Fairprice1
anddelete sn/Fairprice1 sn/Ntuc1
are both valid command formats, butdelete
is not a valid command format. -
Multiple prefixes combined with
|
means only one of them can be provided at a single command.
For example, inupdate sn/<serial number> [iq/<increment value> | nq/<new quantity>]
, at most one ofiq/<increment value>
ornq/<new quantity>
may be provided.
update sn/Fairprice1 iq/+10 nq/100
is an invalid command format, butupdate sn/Fairprice1 iq/+10
,update sn/Fairprice1 nq/100
,update sn/Fairprice1
are all valid command formats. -
Multiple prefixes enclosed with
{ }
means that at least one of the prefixes within the{ }
must be present in the command.
For example, infind { [n/<name>] [s/<source>] [l/<location>] [q/<quantity>] }
, at least one ofn/<name>
,s/<source>
,l/<location>
andq/<quantity>
must be provided in the command.
find sn/Fairprice1 n/banana
is a valid command, butfind
andfind sn/Fairprice1 sn/ntuc
are invalid commands. -
Prefixes given can be in any order.
For example,update sn/Fairprice1 n/Apple
andupdate n/Apple sn/Fairprice1
are both valid and behave exactly the same. -
All 15 valid prefixes along with their default parameter description that are used in Warenager are
n/<name>, s/<source>, q/<quantity>, lq/<low quantity>, l/<location>, lt/<list type>, sn/<serial number>, nq/<new quantity>, iq/<increment value>, nt/<note>, ni/<note index>, st/<statistics type>, by/<field>, o/<order>, fn/<file name>
. -
All parameters for prefixes are case-insensitive, with the exception of
nt/
prefix.
For example,bookmark sn/Fairprice1
andbookmark sn/FAIRPRICE1
are exactly the same.
Warning for invalid prefixes
Unexpected behaviors might occur if any prefix besides the 15 valid prefixes recognized by Warenager is supplied by the user.
In general, Warenager will not be able to parse any prefix besides the 15 valid prefixes above and will recognize the
invalid prefix as a parameter instead.
For example, in delete sn/Fairprice1 x/Random
, Fairprice1 x/Random
will be recognized as the <serial number>
.
If a recognized prefix is supplied to a command which does not require this field, Warenager will not be able to parse this command
and will show you an error message.
For example, print fn/stocks ni/0
is not a valid command as ni/0
is not required in the print
command.
Warning for invalid command input
If an invalid command is entered with incorrect prefixes that results in Warenager not able to perform the desired action, Warenager will return to the Data tab which shows the entire stock book list. You can then correct the command input and enter to perform the desired action.
Command summary
Summary of the commands required to perform certain actions is listed in this table:
Action | Format, Examples |
---|---|
Add |
add n/<name> s/<source> q/<quantity> l/<location> [lq/<low quantity>] e.g. add n/Banana cake s/Fairprice q/100 l/Food section
|
List |
list lt/<list type> e.g. list lt/bookmark
|
Delete |
delete sn/<serial number> [sn/<serial number>]... e.g. delete sn/Fairprice1
|
Find |
find { [n/<name>] [sn/<serial number>] [s/<source>] [l/<location>] } e.g. find n/banana sn/SHENGSIONG
|
FindExact |
findexact { [n/<name>] [sn/<serial number>] [s/<source>] [l/<location>] } e.g. findexact n/banana sn/SHENGSIONG
|
Note |
note sn/<serial number> nt/<note> e.g. note sn/shengsiong1 nt/chicken will expire soon
|
NoteDelete |
notedelete sn/<serial number> ni/<note index> e.g. notedelete sn/ntuc1 ni/1
|
StockView |
stockview sn/<serial number> e.g. stockview sn/ntuc1
|
Update |
update sn/<serial number> [sn/<serial number>]... [iq/<increment value> | nq/<new quantity>] [n/<name>] [l/<location>] [lq/<low quantity>] e.g. update sn/Ntuc1 iq/+50 n/heineken
|
Statistics |
stats st/<statistics type> e.g. stats st/source-qd-ntuc
|
print fn/<file name> e.g. print fn/stocks
|
|
Sort |
sort o/<order> by/<field> e.g. sort o/descending by/quantity
|
Bookmark |
bookmark sn/<serial number> [sn/<serial number>]... e.g. bookmark sn/China3
|
Unbookmark |
unbookmark sn/<serial number> [sn/<serial number>]... e.g. unbookmark sn/China3
|
Help | help |
Clear | clear |
Tab | tab |
Exit | exit |
Prefix summary
Summary of the prefixes known to Warenager is listed in this table:
Prefix | Parameter | Parameter Description |
---|---|---|
n/ | <name> |
The name of the stock. It is a string and only alphanumeric characters are allowed. It must not be blank and it must not consists of only whitespaces. |
s/ | <source> |
The source of the stock. It is a string and any valid ASCII characters are allowed. It must not be blank and it must not consists of only whitespaces. |
q/ | <quantity> |
The quantity of the stock. It is a number. Only numbers between 0 and 2,147,483,647 inclusive are allowed. |
lq/ | <low quantity> |
The threshold of low quantity of a certain stock. It is a number. Only numbers between 0 and 2,147,483,647 inclusive are allowed. |
l/ | <location> |
The location of the stock in the warehouse. It is a string and any valid ASCII characters are allowed. It must not be blank and it must not consists of only whitespaces. |
lt/ | <list type> |
The type of the list user want to view. It is a string and only the following values are known to Warenager. all , bookmark , low . |
sn/ | <serial number> |
The serial number of the stock. It is a string and any valid ASCII characters are allowed. It must not be blank and it must not consists of only whitespaces. It must always be ended by a number. |
nq/ | <new quantity> |
The new quantity of the stock. It is a number. Only numbers between 0 and 2,147,483,647 are allowed. |
iq/ | <increment value> |
The quantity value the user wants to add to the stock. It is a number. Both negative and positive numbers are allowed. |
nt/ | <note> |
The note the user wants to add. It is a string and any valid ASCII characters are allowed. It must not be blank and it must not consists of only whitespaces. |
ni/ | <note index> |
The note number the user wants to remove. It is a number and it must not be negative. |
st/ | <statistics type> |
The statistics type the user wants to be shown. It is a string and only the following values are known to Warenager. source , source-qd-<existing source> where <existing source> is a valid source currently inside Warenager. |
by/ | <field> |
The field the user wants to be sorted. It is a string and only the following values are known to Warenager. name , quantity , serialnumber , source , location . |
o/ | <order> |
The order the user wants to be sorted. It is a string and only the following values are known to Warenager. ascending , descending . |
fn/ | <file name> |
The file name the stocks will be printed at. It is a string and only alphanumeric characters are allowed. It must not be blank and it must not consists of only whitespaces. |
Components of Warenager
Tabs: Displays the different tabs of the application.
Stock Table: Displays all stocks in your inventory.
Result Display: Displays the result of your command.
Command Box: Place to input your commands.
Viewing help : help
Displays the list of command instructions for features in Warenager and how to use the command.
Format
help
Expected Help Window
Adding new stock: add
Adds a new stock into the inventory. A unique serial number for the new stock will be generated by the program.
Note for low quantity field:
The low quantity field is the amount where you deem the stock to be low in quantity. Stocks that are highlighted in red are stocks that have quantities less than or equal to the low quantity field. The optional field low quantity will be set to 0 if not present in the input.
You will not be able to add a stock into the stock book if it already exist in the stock book. In Warenager, two stocks are the
same if they have the same serial number
, or the same name
and source
.
Format
add n/<name> s/<source> q/<quantity> l/<location> [lq/<low quantity>]
Examples
add n/Orange s/Shengshiong q/1300 l/Fruits section
add n/Sprite s/Ntuc q/1000 l/Drinks section lq/5000
Below is a guided example for adding stocks:
Step 1. Let’s add stock with the name orange
, source of stock shengshiong
,
quantity of 1300
and location fruits section
. The fields are not case-sensitive.
Start by entering the command add n/orange s/shengshiong q/1300 l/fruits section
in the command box.
Before input:
After input:
You have now added the stock successfully into the stock book. The stock will be added to the bottom of the stock table as shown above.
Below are some cases where add
command does not work:
You should see an error message describing what went wrong and the correct format for the add
command.
Stocks that exist in Warenager cannot be added. Using the same input in the step 1,
add n/orange s/shengshiong q/1300 l/fruits section
, you should expect the following:
Invalid add command formats will also result in an error.
For example, the input adds n/orange s/shengshiong q/1300 l/fruits section
will lead in an error as shown below
as the keyword add
is misspelt.
The input add n/orange q/1300 l/fruits section
will lead in an error as shown below as the compulsory fields with s/
is missing.
The input add n/orange.big s/shengshiong q/1300 l/fruits section
will lead in an error as shown below as the name contains a symbol and thus is invalid. This is
also true for inputs with no name like add n/ s/shengshiong q/1300 l/fruits section
.
The add n/apple s/shengshiong q/1300 l/fruits section ni/0
will lead in an error as shown below even though we have supplied all the required
prefixes. This is because the prefix ni/
is not allowed in add commands, and it is not just limited to ni/
. In add
commands, only the prefix /n
, /s
, /q
, /l
, /lq
are allowed.
Listing of stock: list
Lists all the stock(s) in the inventory.
Format
list lt/<list type>
The valid list types that can be provided and the respective list that it shows are
list type | What the list shows |
---|---|
bookmark | All the stocks in the inventory that is bookmarked. |
low | All the stocks in the inventory that is low in quantity. |
all | All the stocks in the inventory. |
Below is a guided example for deleting stocks:
Step 1. Let’s list out all the bookmarked stocks using the command list lt/bookmark
.
Before input:
After input:
Step 2. You can then list out all the stocks that are low in quantity using the command list lt/low
.
Before input:
After input:
Step 3. Lastly, listing out all the stocks using the command list lt/all
.
Before input:
After input:
Deleting of stock: delete
Deletes the stock(s) using the stock’s serial number from the inventory. Multiple stocks can be deleted simultaneously.
Format
delete sn/<serial number> [sn/<serial number>]...
Examples
delete sn/courts1 sn/courts2
Below is a guided example for deleting stocks:
Step 1. Before you start any deletion, you might want to use the command list lt/all
to list all
the stocks you have in Warenager.
Step 2. Let’s delete the stock with serial number COURTS2
. The fields are not case-sensitive.
A valid delete input would be delete sn/courts2
.
Before input:
After input:
Step 3. Multiple stocks can also be deleted at the same time. Let’s delete 2 stocks with serial numbers COURTS3
and COURTS4
. It can be done by chaining the serial numbers when deleting.
A valid delete input would be delete sn/courts3 sn/courts4
.
Before input:
After input:
Stocks that do not exist in Warenager cannot be deleted. Using the same input in the previous step,
delete sn/courts3 sn/courts
, you should expect the following:
Invalid delete command formats will also result in an error.
For example, the input delet sn/courts3 sn/courts4
will lead in an error as shown below
as the keyword delete
is misspelt.
The input delete
will lead in an error as shown below as the compulsory fields with sn/
is missing.
The input delete sn/serial
will lead in an error as shown below as the serial number is invalid. This is
also true for inputs with no serial numbers like delete sn/
.
The delete sn/courts1 q/20
will lead in an error as shown below even though the serial number courts1
is found. This is because the prefix q/
is not allowed, and it is not just limited to q/
. In delete
commands, only the prefix /sn
is allowed.
Find stocks from inventory: find
Displays a list of stocks found in the inventory that contains all keywords specified in ANY one of fields searched.
Format
find { [n/<name>] [sn/<serial number>] [s/<source>] [l/<location>] }
Search criteria
-
Only stocks that contain all the search keywords for a field will be displayed.
e.g.find n/ChickenNuggets
will not match stock with Name: Chick.
e.g.find n/ChickenNuggets abcdef
will not match stock with Name: ChickenNuggets. -
Search is case-insensitive. e.g.
find n/ashLey
will match stock with Name: Ashley. -
Any stock with any field that contains all the search keywords in any of the fields searched will be displayed.
Examples
Stock | Details |
---|---|
Stock 1 | Name: Banana Serial Number: NTUC1111 Source: Ntuc Quantity: 5 Location in warehouse: Fruits section |
Stock 2 | Name: Chicken Serial Number: SHENGSIONG1111 Source: Shengsiong Quantity: 100 Location in warehouse: Poultry section |
find n/banana sn/SHENGSIONG
will match both Stock 1 and Stock 2
find l/section
will match both Stock 1 and Stock 2.
find n/chicken l/poultry
will match only Stock 2.
find s/ntuc l/singapore
will match only Stock 1.
Below is a guided example for finding stocks:
The links provided are for reference if you do not know how to use the respective commands mentioned.
Step 1. Start by adding 3 stocks to your stock list.
add n/apple juice s/ntuc l/fruits section a q/100
add n/banana bun s/ntuc l/fruits section b q/200
add n/pineapple tart s/cold storage l/fruits section c q/300
The 3 stocks added should appear in your Data
tab as shown in the image below.
Let’s find the stock with name that contains apple
or source that contains cold
.
Step 2. Type the command find n/apple s/cold
into the command box and enter. The result display should show
the keywords you searched for and how many stocks were found.
In this case, the two stocks with names apple juice
and pineapple tart
would be found.
After input:
You have successfully used the find
command.
Let’s add an additional field into the search.
Step 3. Type the command find n/apple s/cold l/unknown
in the command box and enter.
The same two stocks as in Step 2 should be found as they still match n/apple
.
After input:
You are now done with the guided tutorial for find
.
Below are some cases where find
command does not work:
You will see an error message describing what went wrong
and the correct command format for the find
command.
Continuing from the steps from the guided example above, let’s try finding by entering nothing as a keyword.
Type find n/
into the command box and enter. You will see that no stocks will be found.
After input:
Let’s try finding with an invalid prefix: nt/
for the find
command.
Type find nt/apple
into the command box and enter.
After input:
Let’s try finding with a duplicate valid prefix for the find
command.
Type find n/apple n/pineapple
into the command box and enter.
After input:
Find exact stocks from inventory: findexact
Displays a list of stocks found in the inventory that contains all keywords specified in ALL fields searched.
The difference between the find
and findexact
command is that with the find
command, stocks that
match any of the fields searched will be displayed while for findexact
, stocks must match all the of the fields
searched to be displayed.
For example, for find n/apple s/cold
, stock details just need to match n/apple
or s/cold
to be displayed.
For findexact n/apple s/cold
, stock details have to match both n/apple
and s/cold
to be displayed.
Format
findexact { [n/<name>] [sn/<serial number>] [s/<source>] [l/<location>] }
Search criteria
-
Only stocks that contain all the search keywords for all fields will be displayed.
e.g.findexact n/ChickenNuggets s/ntuc
will not match stock with Name: Chick, Source: ntuc.
e.g.findexact n/Chicken sn/1111
will match stock with Name: ChickenNuggets, SerialNumber: 1111.
e.g.findexact n/ChickenNuggets abcdef l/section b
will not match stock with Name: ChickenNuggets, Location: section b. -
Search is case-insensitive. e.g.
findexact n/ashLey s/nTuC
will match stock with Name: Ashley, Source: ntuc. -
Any stock with fields containing all the search keywords in all the fields searched will be displayed.
Examples
Stock | Details |
---|---|
Stock 1 | Name: Banana Serial Number: NTUC1111 Source: Ntuc Quantity: 5 Location in warehouse: Fruits section |
Stock 2 | Name: Chicken Serial Number: SHENGSIONG1111 Source: Shengsiong Quantity: 100 Location in warehouse: Poultry section |
findexact n/banana sn/SHENGSIONG
will not match Stock 1 and Stock 2.
findexact l/section
will match both Stock 1 and Stock 2.
findexact n/chicken l/section
will match only Stock 2.
findexact n/banana s/ntuc l/singapore
will not match Stock 1 and Stock 2.
Below is a guided example for finding stocks using findexact:
The links provided are for reference if you do not know how to use the respective commands mentioned.
If you are continuing from the above find
command tutorial, you may skip step 1.
Step 1. Start by adding 3 stocks to your stock list.
add n/apple juice s/ntuc l/fruits section a q/100
add n/banana bun s/ntuc l/fruits section b q/200
add n/pineapple tart s/cold storage l/fruits section c q/300
The 3 stocks added should appear in your Data
tab as shown in the image below.
Let’s find the stock with name that contains apple
and source that contains cold
.
Step 2. Type the command findexact n/apple s/cold
into the command box and enter. The result display should show
the keywords you searched for and how many stocks were found.
In this case, only one stock, with the name pineapple tart
, would be found.
After input:
You have successfully used the findexact
command.
Let’s add an additional field into the search.
Step 3. Type the command findexact n/apple s/cold l/unknown
and enter.
No stock should be found as there is no stock with the location unknown.
After input:
You are now done with the guided tutorial for findexact
.
Cases where the findexact
command does not work are the same as those in
the warning section in the find
command section,
with the replacement of the find
command with the findexact
command.
Update inventory: update
Updates the details of the desired stock(s), requires the serial number of stock(s).
Format
update sn/<serial number> [sn/<serial number]... [iq/<increment value> | nq/<new quantity>] [n/<name>] [l/<location>] [lq/<low quantity>]
Updating nothing
Warenager recognizes updating nothing as a valid update command.
For example, assuming stock with serial number FAIRPRICE1
exist, update sn/fairprice1
will be recognized as a valid command and executed.
Even though it essentially does nothing.
In case one of serial numbers is invalid
If more than one serial number is passed and at least one of them is wrong (not found in the inventory list), then the command
will not update anything and shows an error message.
Values to be updated are case-insensitive.
Below is a guided example for updating stocks:
Step 1. Before you start any updating activity, make sure to use the command list lt/all
to list all
the stocks you have in Warenager. The list shown below will be the basis reference for this guided example.
Step 2. Let’s update the stock with serial number NTUC1
. Let’s update the name to Apple
and the low quantity to 100
. Remember that the fields are case-insensitive.
A valid update input would be update sn/ntuc1 n/apple lq/100
.
Before input:
After input:
Step 3. Multiple stocks can also be updated at the same time. Let’s update 2 stocks with serial numbers FAIRPRICE1
and FAIRPRICE3
. It can be done by chaining the serial numbers when updating.
Let’s update the low quantity to 200
and the location to Discount section
A valid update input would be update sn/fairprice1 sn/fairprice3 lq/200 l/discount section
.
Before input:
After input:
Nonexistent stocks
Stocks that do not exist in Warenager cannot be updated. Using the update input update sn/fairprice4 n/peach
,
you should expect the following error:
Invalid command format
Invalid update command format will also result in an error. Using the update input updat sn/fairprice3 n/peach
,
you should expect the following error because the keyword update
is misspelt:
Missing compulsory prefixes
Missing the compulsory prefix sn/<serial number>
will result in an error. Using the update input update n/KitKat
,
you should expect the following error:
Invalid prefixes
Providing invalid prefixes for update, even though it is a valid prefix in other commands, will result in
an error. Using the update input update sn/fairprice1 fn/StockBook
, you should expect the following
error since fn/<file name>
is invalid in update:
Adding notes to stock: note
Adds a note to the stock specified, displayed in the notes column for that stock.
Multiple notes can be added to the stock and each note will be indexed.
Format
note sn/<serial number> nt/<note>
Example
note sn/SHENG SIONG1 nt/chicken will expire soon
Below is a guided example for adding notes to stocks:
If you already have stocks in your stock book, you may also skip Step 1.
Just make sure that the serial number of the stock you are adding the note to is correctly entered.
Use the list lt/all
command to show all the stocks in the stock book in the Data
tab.
Step 1. Start with adding these 3 stocks in your
stock book in your Data
tab as shown in the image below.
Let’s add a note to stock with name Apple juice.
Step 2. Type note sn/ntuc1 nt/buy on wednesday
into the command box and enter. You will see the note
added to the stock with name Apple juice at note index 1 in the Notes column.
After input:
Let’s add different note to the same stock as in Step 2.
Step 3. Type note sn/ntuc1 nt/another note for the SAME stock!
into the command box and enter.
You will see the note added to the stock with name Apple juice at note index 2 in the Notes column.
After input:
Let’s add a note to a different stock from that in Steps 1 and 2.
Step 4. Type note sn/COLD STORAGE1 nt/3 pineapple tarts JUST arrived
into the command box and enter.
You will see the note added to the stock with name Pineapple tart at note index 1 in the Notes column.
After input:
You are now done with the guided tutorial for note
.
Below are some cases where note
command does not work:
You should see an error message describing what went wrong and the correct format for the note
command.
Continuing from the steps from the guided example above,
Let’s try entering nothing as a note.
Type note sn/ntuc1 nt/
into the command box and enter.
After input:
Let’s try adding a note to an unknown serial number.
Type note sn/unknown1 nt/note
in the command box and enter.
After input:
Let’s try adding a note but with an invalid prefix: n/
for the note
command.
Type note sn/ntuc1 nt/valid note n/invalid
into the command box.
After input:
Let’s try adding a note but with a duplicate valid prefix for the note
command.
Type note sn/ntuc1 nt/first note nt/second note
into the command box and enter.
After input:
Deleting note(s) from stock: notedelete
Deletes a note, specified by the note’s index, from the stock specified by its serial number.
Note index must be an integer. To delete ALL notes from a stock, note index to specify is 0.
Format
notedelete sn/<serial number> ni/<note index>
Example
notedelete sn/ntuc1 ni/1
Below is a guided example for deleting notes from stocks:
You may skip Step 1 and use the stocks that have notes already in your stockbook.
Make sure that the serial number of the stock and the note index of the note you are deleting
from the stock is correctly entered. Note that deleting notes is an irreversible action and you will have to
manually add the note back using the note
command, if you deleted the note.
Use the list lt/all
command to show all the stocks in the stock book in the Data
tab.
Step 1. Start with these stocks in your stock book in your Data
tab as shown in the image below.
Let’s delete a note from the stock with name Pineapple tart.
Step 2. Type notedelete sn/cold storage1 ni/2
into the command box and enter.
You will see that the note at note index 2, pineapple tarts for CNY
of the stock with serial number coldstorage1
has been deleted.
After input:
You have successfully used the notedelete
command.
Let’s try deleting all the notes from the stock with serial number ntuc1
with one command.
Step 3. Type notedelete sn/ntuc1 ni/0
into the command box and enter.
You will see that all the notes of the stock with serial number ntuc1
has been deleted.
After input:
You are now done with the guided tutorial for notedelete
.
Below are some cases where notedelete
command does not work:
You should see an error message describing what went wrong and the correct format for the notedelete
command.
Continuing from the steps from the guided example above, Let’s try deleting a note from an unknown serial number.
Type notedelete sn/unknown1 ni/1
in the command box and enter.
After input:
Let’s try deleting a note but with an invalid prefix: n/
for the notedelete
command.
Type notedelete sn/cold storage1 ni/1 n/invalid
into the command box.
After input:
Let’s try deleting a note but with a duplicate valid prefix for the notedelete
command.
Type notedelete sn/cold storage1 ni/1 ni/2
into the command box and enter.
After input:
Let’s try deleting a note with an invalid note index. You will see that the note index for the stock could not be found.
Type notedelete sn/cold storage1 ni/10
into the command box and enter.
After input:
Let’s try deleting a note from a stock without notes. You will see that you cannot delete a note as the stock does not have notes.
Type notedelete sn/ntuc1 ni/1
into the command box and enter.
After input:
Viewing details of a stock: stockview
Shows the details of the stock, specified by its serial number, in the Stock View
tab.
Details of the stock that are shown:
- Name
- Serial Number
- Quantity left
- Low quantity threshold
- Location stored in warehouse
- Notes
Format
stockview sn/<serial number>
Example
stockview sn/ntuc1
Below is a guided example for viewing a stock:
The links provided are for reference if you do not know how to use the respective commands mentioned.
Let’s see what the Stock View
tab looks like first before using the stockview
command.
Step 0. When you start up Warenager, click into the Stock View
tab and it should
look as shown in the image below.
Clicking into the Stock View
tab:
If you already have stocks in your stockbook, you may skip Step 1.
Make sure that the serial number of the stock you want to view is correctly entered.
Use the list lt/all
command to show all the stocks in the stock book in the Data
tab.
Step 1. Start with these stocks in your stock book in your Data
tab as shown in the image below.
Let’s view the stock with serial number COLD STORAGE1
.
Step 2. Type stockview sn/cold storage1
into the command box and enter.
You will be brought to the Stock View
tab with the stock details shown as in the image below.
After input:
You have successfully used the stockview
command.
Let’s try updating the stock that you have just viewed. You may skip this Step 3 and just read through what will happen if you do not want to update your stock.
Step 3. Type update sn/cold storage1 n/pineapple tart 2
into the command box and enter.
You will be brought back to the Data
tab with the stock’s name updated. Click back to
the Stock View
tab and you will see that the information for the stock that was viewed
has been updated.
After input:
Clicking back to the Stock View
tab:
The Stock View
tab live updates when the details of the stock that is being
viewed has been updated.
Let’s try deleting the stock that you have just viewed. You may skip this Step 4 and just read through what will happen if you do not want to delete your stock.
Step 4. Type delete sn/cold storage1
into the command box and enter.
You should be brought back to the Data
tab with the stock deleted. Click back to the
Stock View
tab and you should see that the Stock View
tab has been emptied as the stock
is no longer in your stock book.
After input:
Clicking back to the Stock View
tab:
The Stock View
tab empties when the stock that is being viewed is deleted.
You are now done with the guided tutorial for stockview
.
Below are some cases where stockview
command does not work:
You should see an error message describing what went wrong and the correct format for the stockview
command.
Continuing from the steps from the guided example above, Let’s try deleting a note from an unknown serial number.
Type stockview sn/unknown1
in the command box and enter.
After input:
Let’s try viewing a stock but with an invalid prefix: n/
for the stockview
command.
Type stockview sn/ntuc1 n/invalid
into the command box and enter.
After input:
Let’s try viewing a stock but with a duplicate valid serial number prefix.
Type stockview sn/ntuc1 sn/ntuc2
into the command box and enter.
After input:
Generating statistics: stats
Generates a statistical view in a pie chart depicting the target fields.
Format
stats st/<statistics type>
The valid statistics types that can be provided and what the respective statistics describes are:
Statistics type | What the statistics describes |
---|---|
source | Distribution of source companies. |
source-qd- | Distribution of stocks for the target source company. |
Examples
stats st/source
stats st/source-qd-abc ("abc" is an existing source company)
Below is a guided example for displaying statistics:
Step 1. Start Warenager. Suppose you want to display source statistics. After the input, you should notice that
the title in the statistics window as highlighted corresponds to the type of statistics shown.
The valid statistics input would be stats st/source
.
Before input:
After input:
Step 2. Now suppose you want to display source statistics for the source company courts
. After the input, you
should notice that the title in the statistics window as highlighted now corresponds to the source company courts
.
The valid statistics input would be stats st/source-qd-courts
.
Before input:
After input:
If Warenager is first started up, you should expect the following in the Statistics tab, and this is intended:
Bookmarking stocks in the list: bookmark
Bookmarks the desired stock(s). Bookmarking a stock pushes the stock to the top of the stock list.
Format
bookmark sn/<serial number> [sn/<serial number>]...
Below is a guided example for viewing a stock:
Step 1. Let’s say you want to bookmark the stock with serial number giant1
. You can bookmark the stock by
using the command bookmark sn/giant1
. Below shows the desired outcome.
Before input:
After input:
Step 2. Let’s say you want to bookmark multiple stocks with serial numbers fairprice1
and ntuc1
.
You can bookmark the stock by using the command bookmark sn/fairprice1 sn/ntuc1
. Below shows the desired outcome.
Before input:
After input:
Nonexistent Stocks
Stocks that do not exist in Warenager cannot be bookmarked. Using the update input bookmark sn/fairprice4
,
you should expect the following error:
Bookmarked Stocks
Bookmarking a bookmarked stock will also result in an error. Using the bookmark input bookmark sn/cold storage1
,
you should expect the following error:
Unbookmarking stocks in the list: unbookmark
Removes bookmark from the desired stock(s).
Format
unbookmark sn/<serial number> [sn/<serial number>]...
Below is a guided example for viewing a stock:
Step 1. Let’s say you want to unbookmark the stock with serial number giant1
. You can unbookmark the stock by
using the command unbookmark sn/giant1
. Below shows the desired outcome.
Before input:
After input:
Step 2. Let’s say you want to unbookmark multiple stocks with serial numbers giant1
and cold storage1
.
You can unbookmark the stock by using the command unbookmark sn/giant1 sn/cold storage1
.
Below shows the desired outcome.
Before input:
After input:
Nonexistent Stocks
Stocks that do not exist in Warenager cannot be unbookmarked. Using the update input unbookmark sn/fairprice4
,
you should expect the following error:
Not Bookmarked Stocks
Unbookmarking a stock that is not bookmarked will also result in an error.
Using the bookmark input unbookmark sn/fairprice1
, you should expect the following error:
Sorting inventory: sort
Sort the inventory by a specific field and order.
Format
sort o/<order> by/<field>
Regarding order and field to be sorted
- The order can only be one of the following:
-
ascending
- sorts the inventory in ascending order -
descending
- sorts the inventory in descending order
-
- The field can only be one of the following:
-
name
- sorts the inventory by name -
source
- sorts the inventory by source -
quantity
- sorts the inventory by quantity -
location
- sorts the inventory by location -
serialnumber
- sorts the inventory by serial number
-
Regarding comparison between stocks
For sorting by name
, source
, location
, and serialnumber
, Warenager will compare fields by
their lexicographical order. For example, in sort o/ascending by/name
, the stock with name 100
will be listed above the stock with name 2
since 100
is lexicographically smaller than 2
.
For sorting by quantity
, Warenager will compare quantity by mathematical integer ordering.
For example, in sort o/ascending by/quantity
, the stock with quantity 100
will be listed below
the stock with quantity 2
, since 100
is greater than 2
.
Below is a guided example for sorting stocks:
Step 1. The list shown below will be the basis reference for this guided example.
Step 2. In the picture above, the stock is sorted by serial number in ascending order.
Suppose that you now want to view the stocks by name in ascending order instead.
A valid sort input would be sort o/ascending by/name
.
Before input:
After input:
Step 3. It is also possible to sort in descending order.
Suppose that you now want to view the stocks by quantity in descending order.
A valid sort input would be sort o/descending by/quantity
.
Before input:
After input:
Invalid command format
Invalid sort command format will result in an error. Using the sort input sor o/ascending by/source
,
you should expect the following error because the keyword sort
is misspelt:
Missing compulsory prefixes
Missing any of the compulsory prefixes o/<order>
and by/<field>
will result in an error.
Using the sort input sort o/ascending
, you should expect the following error:
Invalid prefixes
Providing invalid prefixes for sort, even though it is a valid prefix in other commands, will result in
an error. Using the sort input sort o/descending by/serialnumber iq/+50
, you should expect the following
error since iq/<increment value>
is invalid in sort:
Command Suggestion
Sometimes user will type in wrong commands. Warenager will help such user by suggesting the correct format of the command if the command word is valid. If the command word is invalid, then Warenager will try to predict and suggest the closest command to whatever the user has typed.
When will suggestion appear?
The suggestion will only be made if the command format is invalid or unknown. If the command is valid, but there are errors such as serial number not found when executing commands, then Warenager will not suggest anything to the user and instead displays an error message.
What prefixes and parameters will be suggested?
The suggestion feature will always suggest a valid command format.
Therefore, when giving a certain suggestion, Warenager will throw out every prefix that are not valid for that particular command, even though the prefixes were provided by the user.
Furthermore, for every valid prefixes (both compulsory and optional) that the user has entered, Warenager will check if the parameter supplied for each of those valid prefixes are also valid. For parameters that are deemed to be invalid, Warenager will display the parameter’s default description.
An exception for the previous rule above is when the prefix’s parameter value is fixed by Warenager. The only prefixes
that fit this category are lt/
since there are only three valid fixed values, st/
since there are only
two valid fixed value types. by/
since there are only five valid fixed values, and o/
since there are only
two valid orders. For these prefixes, if the parameters are deemed to be invalid, Warenager will display
a valid value closest (by minimum edit distance) to the current user input.
Lastly, for every compulsory prefixes that is required for the suggested command, but were not supplied by the user, Warenager will add them to the suggestion message along with their parameter’s default description.
Every optional prefix that is valid for the suggested command if not entered by the user will not be suggested by Warenager.
For example, consider the case where user has entered an invalid command
ad n/apple s/ q/1000 sn/fairprice1
The command Warenager will then suggest will be
add n/apple s/<source> q/1000 l/<location>
Explanation:
- Warenager will first try to predict the intended command word. Warenager will conclude that
the command word intended was
add
. - Warenager will now check for compulsory prefixes with respect to the infered command
add
. The first prefix isn/
and its parameterapple
. It is valid and hence the suggestion message generated isn/apple
. - The second prefix is
s/
and its parameter is empty. The parameter is not valid and hence the suggestion message generated iss/<source>
. - The third prefix is
q/
and its parameter is1000
. It is valid and hence the suggestion message generated isq/1000
. - The fourth prefix is
sn/fairprice1
which is not a valid prefix with respect toadd
command word. Therefore it is discarded. - Lastly, Warenager will notice that the compulsory prefix
l/
is missing and hence the suggestion message generated isl/<location>
. - The prefix
lq/
is not generated since it is an optional prefix and not supplied by the user.
Another example when the user entered an invalid list command
list lt/unbookmark
The command Warenager will then suggest will be
list lt/bookmark
Explanation:
- Since the command word is a valid command word, Warenager will conclude that
the command word intended was
list
. - Warenager will now check for compulsory prefixes with respect to the infered command
list
. The only compulsory prefix islt/
and its parameter value is supplied by the user, but the parameter value is unrecognized by Warenager. Since the prefixlt/
parameter value is fixed by Warenager, Warenager will compute the closest valid value tounbookmark
and the closest valid value isbookmark
. Hence, the suggestion message generated islt/bookmark
.
Accuracy and correctness of suggestion
In short, the suggestion feature will always suggest a correct and valid command format, but it cannot guarantee that the suggested command will run without execution errors.
Warenager uses a certain heuristic (minimum edit distance) to predict the intended command. Since it is a heuristic, and therefore a method to predict, it may not be 100% accurate and bound to make some mistakes.
More information about the heuristic used and thus how Warenager will predict the intended command can be found at Warenager’s Developer Guide.
Below is a guided example for command suggestion:
Step 1. The list shown below will be the basis reference for this guided example.
Step 2. Suppose now you want to add a new stock with the following description:
- name: eggplant
- source: fairprice
- quantity: 500
- low quantity: 100
- location: vegetable section
A valid input would be add n/eggplant s/fairprice q/500 l/vegetable section lq/100
.
But you make a mistake and instead entered ad n/eggplant sn/fairprice q/500 l/vegetable section lq/100
Before input:
After input:
Step 3. As shown above, the suggestion add n/eggplant s/<source> q/500 l/vegetable section lq/100
is generated.
Now you can amend our input according to the suggested format.
You now enter a valid input add n/eggplant s/fairprice q/500 l/vegetable section lq/100
.
Before input:
After input:
As shown above, the stock has been successfully added.
Generating a CSV file that contains all stocks: print
Generates a CSV file that contains all stocks.
CSV file will be named according to the input, and the file name
can only contain alphanumeric characters. You may want to sort the stocks using sort
command
to sort the stock in their preferred order as mentioned earlier before converting it into the CSV file. The CSV file is saved
to [root directory]/data/userInput.csv
after successfully executing the command.
Format
print fn/<file name>
Examples
print fn/stocks
Below is a guided example for creating CSV file:
Step 1. Let’s create a CSV file with a file name of stocks
. Start by typing print fn/stocks
in the command box.
Step 2. After successfully executing the command, proceed to the folder which
contains Warenager. Click on the data
folder circled in red.
Step 3. Open stocks.csv
folder circled in red with excel.
Step 4. The stocks in your inventory will be listed according the to format shown below. The file also includes
the latest update time for the stocks.csv
.
Step 5. The columns and rows in the csv file will not be formatted to show the full text in a cell. You will need to resize the columns and row of the excel sheet to see the full text of a cell as shown below.
Warning before executing print command
print
writes over a CSV file of the same file name and is an irreversible process.
Do backup the data if might be needed again.
Also note that you will not be able to generate a CSV file of file name stocks
if
you have a CSV file with a file name of stocks
currently opened in your browser.
Clearing all data in Warenager: clear
Clears all the existing data in Warenager.
Format
clear
Warning for clearing data
clear
is an irreversible process. Do backup the data it if might be needed again.
Below is the expected outcome for clearing Warenager:
Before input:
After input:
Toggling tabs: tab
Toggles between the tabs in Warenager.
Format
tab
Below is a guided example for toggling tabs:
In this example, Warenager is started up for the first time. Observe that you are always in the data tab after each startup.
Step 1. Now input the command word tab
and hit enter. This should bring you to the next tab,
which is the Statistics tab.
Before input:
After input:
Step 2. Now input the command word tab
again and hit enter. This should bring you to the next tab,
which is the Stock view tab.
After input:
Step 3. Now input the command word tab
again and hit enter. This should bring you back to the Data tab.
After input:
Note that the above example used is a new Warenager session. If you have already used the stats
command
input at least once in your current Warenager session, you should see the latest piechart viewed when you
are in Statistics tab.
Similarly, if you used the stockview
command input at least once in your current Warenager session,
you should see an existing table describing the latest stock viewed.
Saving data
Data (all stocks in inventory in JSON) is automatically saved to
[root directory]/data/stockbook.json
when any of these commands are executed:
- add
- delete
- note
- notedelete
- update
- clear
The set of used serial number sources is automatically saved to
[root directory]/data/serialnumbers.json
when any of these commands is executed:
- add
Exiting Warenager: exit
Terminates the program.
Format
exit
FAQ
Q: Can I use Warenager on any OS?
A: Yes. Warenager is supported by Windows, Mac and Linux.
Q: Can I use Warenager on another device?
A: Yes. Simply transfer the JSON data files under /data
and copy over to the same directory /data
in the Warenager of your
other device.