View on GitHub

tp

User Guide


Introduction

image info

Fridget is a desktop app built to be used via Command Line Interface (CLI). Fridget is an easier way for you to keep track of the items in your fridge. It is convenient to add, remove, and find items stored in your fridge. Fridget also reminds you when items are nearing expiry.

If you want to start taking charge of your fridge and stop wasting your food, Fridget is for you.

Use Fridget today.

This guide is meant for you to quickly get started with Fridget so you can stop worrying about expired food and start enjoying life.


Index

  1. Legend
  2. Quick Start
  3. Features
  4. Command Syntax
  5. Things to Note

Legend

add ITEM_NAME /EXPIRY_DATE - Texts inside this box refers to either input text by the user or output from Fridget in the terminal. It could also refer to file names like Fridget.jar.

ITEM_NAME or EXPIRY_DATE - Texts which have been capitalized refer to parameters which the user should type in. For example:

A command like add ITEM_NAME /EXPIRY_DATE would actually be typed by the user as add burger /2021-11-11.

:bulb: - This icon refers to tips that may help you make the best out of Fridget.

:exclamation: - This icon refers to warnings to help you avoid mistakes when using Fridget.


Quick Start

  1. Ensure that you have Java 11 or above installed on your computer.
  2. Download the latest Fridget.jar from here.
  3. Copy the file into the folder you want to store Fridget’s data.
  4. Launch the terminal in that same folder on your computer. You can refer to this website on how to launch the terminal on your specific OS (Windows/Mac/Linux).
  5. Type in java -jar Fridget.jar into the terminal to launch the app.
  6. Type your command in the command box and press Enter to execute it.
    • Some example commands you can try:
      • help: lists all commands and input format.
      • reset: prompts the user to confirm clearing all data.
      • exit: close the app.
  7. Congratulations! You should be good to go!

:bulb: You can type java -version into your terminal to check your version of java.

This guide has been arranged according to the features offered by Fridget. You can see the list of features in the Features section below.


Features

Feature Command Format
Add an item add ITEM_NAME /EXPIRY_DATE
Remove an item remove ITEM_NAME
Update the quantity of an item update ITEM_NAME
Get help help
Reset all items reset
Reset shopping list shopreset
List all items list -OPTIONAL_SORT_TYPE
List items in shopping list shoplist
Find an item find KEYWORD
List expiring items expiring
See notifications notifs
Exit Fridget exit

Command Syntax

As you use this guide, you may see some commands with specific punctuation or parameters. This guide explains what they mean, and how you should use them.

For simplicity’s sake, the number 2147483647 shall be referred to henceforth as INT_MAX.

Command Option Description
ITEM_NAME The ITEM_NAME can be any series of characters or digits of less than length INT_MAX. Additionally, ITEM_NAME should not include the following terms: ;,/, or |.

More explanation can be found here.
EXPIRY_DATE The EXPIRY_DATE must be of the format YYYY-MM-DD.
OPTIONAL_SORT_TYPE We recommend that you insert a - before OPTIONAL_SORT_TYPE. However, we do accommodate inputs without a - in front. Additionally, we also accept uppercase inputs.
KEYWORD This KEYWORD can be the exact same as the name of the item you are trying to remove. You can also input a KEYWORD that is contained within the item you are trying to remove.
Y|N Some commands may prompt you to type a Y to signify that you would like to proceed with the command. Do take note that these commands will also take y as consent.

Add an item into Fridget: add

Use this command to add your items into Fridget.

Format: add ITEM_NAME /EXPIRY_DATE

Constraints:

:exclamation: The EXPIRY_DATE must be in the YYYY-MM-DD format.

:exclamation: The EXPIRY_DATE should not be earlier than the current day.

Example of usage:

If you are adding an item not in Fridget:

USER INPUT: add burger /2021-11-11
__________________________________________
What quantity of [burger | 2021-11-11] would you like to add?
__________________________________________
USER INPUT: 1
__________________________________________
You have successfully added:
    burger | Qty: 1 | 11 Nov 2021
__________________________________________

If you are adding an item already in Fridget:

USER INPUT: add burger /2021-11-11
__________________________________________
What quantity of [burger | 2021-11-11] would you like to add?
__________________________________________
USER INPUT: 9
__________________________________________
You have successfully increased the quantity of:
    burger | Qty: 1->10 | 11 Nov 2021
__________________________________________

For advanced users:

If you want to add multiple items at the same time, separate each item with a semicolon: ;.

For example:

USER INPUT: add burger /2021-11-11; chicken /2023-11-11
__________________________________________
What quantity of [burger | 2021-11-11] would you like to add?
__________________________________________
USER INPUT: 1
__________________________________________
You have successfully increased the quantity of:
    burger | Qty: 10->11 | 11 Nov 2021
__________________________________________
What quantity of [chicken | 2023-11-11] would you like to add?
__________________________________________
USER INPUT: 1
__________________________________________
You have successfully added:
    chicken | Qty: 1 | 11 Nov 2023
__________________________________________

Remove an item from Fridget: remove

Use this command to remove items from Fridget.

Format: remove ITEM_NAME

:exclamation: The ITEM_NAME should be the same as the name of the item you are trying to remove.

:exclamation: The ITEM_NAME can also be a part of the name of the item.

Example of usage:

If there is only one item with a name exactly the same as ITEM_NAME:

USER INPUT: remove burger
__________________________________________
There are 11 items, how many would like to remove?
__________________________________________
USER INPUT: 1
__________________________________________
You have successfully removed:
    burger | Qty: 1 | 11 Nov 2021
__________________________________________

If there is only one item with a similar spelling (different capitalization / has more letters) to ITEM_NAME:

USER INPUT: remove Burger
__________________________________________
Did you mean: burger? [Y/N]
__________________________________________
USER INPUT: y
__________________________________________
There are 10 items, how many would like to remove?
__________________________________________
USER INPUT: 1
__________________________________________
You have successfully removed:
burger | Qty: 1 | 11 Nov 2021
__________________________________________

If there are multiple items with the same name or has a name containing ITEM_NAME

USER INPUT: remove burger
__________________________________________
Which item would you like to be removed? Type the index of the item below.
    1. burger | Qty: 1 | 11 Nov 2021
    2. burger | Qty: 1 | 23 Sep 2021
    3. burger a | Qty: 2 | 23 Sep 2022
__________________________________________
USER INPUT: 1
__________________________________________
You have successfully removed:
    burger | Qty: 1 | 11 Nov 2021
__________________________________________

Upon removing an item, if there are no items left with the same name in the fridge:

USER INPUT: remove burger
__________________________________________
You have successfully removed:
    burger | Qty: 1 | 23 Sep 2021
__________________________________________
You have ran out of burger. Would you like to add it to your shopping list? (Y/N)
__________________________________________
USER INPUT: Y
__________________________________________
How many items would you like to buy?
__________________________________________
USER INPUT: 1
__________________________________________
You have successfully added:
    burger | Qty: 1
__________________________________________

Update the quantity of an item in Fridget: update

Use this command to update the quantity of items in Fridget.

Format: update ITEM_NAME

:exclamation: The ITEM_NAME should be the same as the name of the item you are trying to remove.

:exclamation: The ITEM_NAME can also be a part of the name of the item.

Example of usage:

If there is only one item with a name exactly the same as ITEM_NAME:

USER INPUT: update burger
__________________________________________
How many of burger do you have left?
__________________________________________
USER INPUT: 5
__________________________________________
Quantity of burger is now 5.
__________________________________________

If there is only one item with a similar spelling (different capitalization / has more letters) to ITEM_NAME:

USER INPUT: update Burger
__________________________________________
Did you mean: burger? [Y/N]
__________________________________________
USER INPUT: Y
__________________________________________
How many of burger do you have left?
__________________________________________
USER INPUT: 8
__________________________________________
Quantity of burger is now 8.
__________________________________________

If there are multiple items with the same name or has a name containing ITEM_NAME:

USER INPUT: update burger
__________________________________________
Which item would you like to overwrite quantity? Type the index of the item below.
1. cheese burger | Qty: 8 | 11 Nov 2022
2. fish burger | Qty: 80 | 12 Dec 2022
3. fish burger | Qty: 30 | 13 Dec 2023
If you've changed your mind, simply type 'quit'.
__________________________________________
USER INPUT: 2
__________________________________________
How many of fish burger do you have left?
__________________________________________
USER INPUT: 32
__________________________________________
Quantity of burger is now 32.
__________________________________________

If the intended value to be update is zero:

USER INPUT: update burger
__________________________________________
How many of burger do you have left?
__________________________________________
USER INPUT: 0
__________________________________________
You have input "0". This will remove all 32 burger from your list. 
Do you still wish to proceed? [Y/N]
__________________________________________
USER INPUT: Y
__________________________________________
You have successfully removed:
    burger | Qty: 32 | 12 Dec 2022
__________________________________________
You have ran out of burger. Would you like to add it to your shopping list? (Y/N)
__________________________________________
USER INPUT: Y
__________________________________________
How many items would you like to buy?
__________________________________________
USER INPUT: 2
__________________________________________
You have successfully added:
    burger | Qty: 2
__________________________________________

Get help: help

Use this command to see the list of commands from within Fridget.

Format: help

Example of usage:

USER INPUT: help
__________________________________________
List of commands available:

add ITEM_NAME /EXPIRY_DATE(format: yyyy-mm-dd) [eg. add bacon /2022-11-11]
-> Adds an item and its expiry date to the item list. Input quantity after being prompt.

find KEYWORD [eg. find bacon]
-> Find and print all item associated with keyword.

remove ITEM_NAME [eg. delete bacon]
-> Removes the item from the item list.

list -e
-> List out all the items starting with earliest expiry date.

list -r
-> List out all the items based on the order added.

list
-> List out all the items in alphabetical order.

shoplist
-> List out all the items in the shopping list in alphabetical order.

expiring
-> Prints out items that have expired or are expiring within a week.

update ITEM_NAME [eg. update egg]
-> Prompts a quantity change for the specified item name.

notifs
-> Toggle the notification on or off depending on previous state. Default mode is on.

reset
-> Deletes all the previous item entries from the reader.

shopreset
-> Deletes all the previous item entries in the shopping list.

exit
-> Exits the program.

For more information about each command please visit our User Guide.
Link: https://ay2122s1-cs2113t-w12-4.github.io/tp/UserGuide.html
__________________________________________

Reset all items: reset

Use this command to reset all the items in your fridge.

Format: reset

Example of usage:

If you decide to not reset in the end:

USER INPUT: reset
__________________________________________
Are you sure you want to reset everything in the fridge? (Y/N)
__________________________________________
USER INPUT: N
__________________________________________
Shutting down the command...
__________________________________________

If you are sure you want to reset:

USER INPUT: reset
__________________________________________
Are you sure you want to reset everything in the fridge? (Y/N)
__________________________________________
USER INPUT: Y
__________________________________________
Item list has been reset successfully.
__________________________________________

Reset all items in shopping list: shopreset

Use this command to reset all the items in your shopping list.

Format: shopreset

Example of usage:

If you decide to not reset in the end:

USER INPUT: shopreset
__________________________________________
Are you sure you want to reset everything in the shopping list? (Y/N)
__________________________________________
USER INPUT: N
__________________________________________
Shutting down the command...
__________________________________________

If you are sure you want to reset:

USER INPUT: shopreset
__________________________________________
Are you sure you want to reset everything in the shopping list? (Y/N)
__________________________________________
USER INPUT: Y
__________________________________________
Shopping list has been reset successfully.
__________________________________________

List all items in Fridget: list

This commands lists all items in Fridget, in the order that you prefer.

Format: list -OPTIONAL_SORT_TYPE

Example of usage:

If you want to list items in alphabetical order:

USER INPUT: list
__________________________________________
List sorted by item name:
    1. fish Cake | Qty: 2 | 12 Dec 2020
    2. frozen duck | Qty: 1 | 10 Oct 2022
    3. Yoghurt cake | Qty: 1 | 15 Oct 2021
__________________________________________

If you want to list items in ascending order of expiry dates:

USER INPUT: list -e
__________________________________________
List sorted by expiry date:
    1. fish Cake | Qty: 2 | 12 Dec 2020
    2. Yoghurt cake | Qty: 1 | 15 Oct 2021
    3. frozen duck | Qty: 1 | 10 Oct 2022
__________________________________________

If you want to list items in order of how recently they were added:

USER INPUT: list -r
__________________________________________
List sorted by earliest added:
    1. fish Cake | Qty: 2 | 12 Dec 2020
    2. Yoghurt cake | Qty: 1 | 15 Oct 2021
    3. frozen duck | Qty: 1 | 10 Oct 2022
__________________________________________

List items in shopping list: shoplist

Use this command to list all the items in your shopping list.

Format: shoplist

Example of usage:

USER INPUT: shoplist
__________________________________________
List sorted by item name:
    1. Burger | Qty: 1
    2. Chicken | Qty: 3
    3. Fish | Qty: 2
__________________________________________

Find items stored in Fridget: find

Use this command to easily find an item in Fridget by name.

Format: find KEYWORD

:exclamation: The KEYWORD should be the same as the name of the item you are trying to remove.

:exclamation: The KEYWORD can also be a part of the name of the item.

Example of usage:

USER INPUT: find burger
__________________________________________
These are the matching items:
    1. burger | Qty: 1 | 23 Sep 2030
__________________________________________
USER INPUT: find apple
__________________________________________
No matching item found!
__________________________________________

List all items expiring soon: expiring

Use this command to get a list of all expiring items.

:bulb: Only items expiring within 7 days will be shown. Expired items will be shown too.

Format: expiring

Example of usage:

USER INPUT: expiring
__________________________________________
Expiring/Expired Items:
    1. fish Cake | Qty: 2 | 12 Dec 2020
    2. Yoghurt cake | Qty: 1 | 15 Oct 2021
__________________________________________

See notifications: notifs

Use this command to toggle notifications on or off. There are a total of 2 reminders, health and expiry.

:bulb: Notifications are scheduled by default to be displayed every 4 hours, if turned on.

Format: notifs

Example of usage:

USER INPUT: notifs
__________________________________________
Turning notification off!
__________________________________________
USER INPUT: notifs
__________________________________________
Turning notification on!
__________________________________________

Example of health reminder notice:

 ___________________________________________________
|                      HEALTH!                      |
|===================================================|
|      ___            _         __        ______    |
|     / _ \___ __ _  (_)__  ___/ /__ ____/ / / /    |
|    / , _/ -_)  ' \/ / _ \/ _  / -_) __/_/_/_/     |
|   /_/|_|\__/_/_/_/_/_//_/\_,_/\__/_/ (_|_|_)      |
|   ---------------------------------------------   |
|                                                   |
|    "If you don't take time to take care of your   |
|    health now, you're gonna have to make time     |
|    for feeling sick and tired later."             |
|                                                   |
|            Always remember to eat more            |
|              Fruits and Vegetables!               |
|___________________________________________________|

Example of expiry reminder notice:

__________________________________________
 ___________________________________________________
|                      EXPIRY!                      |
|===================================================|
|      ___            _         __        ______    |
|     / _ \___ __ _  (_)__  ___/ /__ ____/ / / /    |
|    / , _/ -_)  ' \/ / _ \/ _  / -_) __/_/_/_/     |
|   /_/|_|\__/_/_/_/_/_//_/\_,_/\__/_/ (_|_|_)      |
|___________________________________________________|
 >> Items expired! Please discard ASAP:
     1. apple | Qty: 1 | 01 Nov 2021
     2. chicken | Qty: 1 | 03 Nov 2021
 --------------------------------------------------- 
 >> Please use them before they expire:
     1. bacon | Qty: 1 | 11 Nov 2021
|___________________________________________________|
__________________________________________

Stop Fridget: exit

Use this command when you are done using Fridget. Fridget will help you to remember everything you did.

Format: exit

Example of usage:

USER INPUT: exit
__________________________________________
We'll help you remember everything you told us :)
See you again!~~
__________________________________________

Things to Note

:bulb: Details about how the shopping list works


:exclamation: For commands help, expiring, reset, shopreset, shoplist, list, and notifs, adding a space and random text behind will still trigger the command.

Example:

USER INPUT: notifs ajsdfasf
__________________________________________
Turning notification off!
____________________________________________
USER INPUT: reset jadfgasgdka
__________________________________________
Are you sure you want to reset everything in the item list? (Y/N)
__________________________________________

:exclamation: If no item is recorded, Fridget will prompt you to use the help command.

Example:

USER INPUT: find a
__________________________________________
You currently have nothing in your fridge.
Input "help" to get started!
__________________________________________
USER INPUT: expiring
__________________________________________
You currently have nothing in your fridge.
Input "help" to get started!
__________________________________________

:exclamation: All numerical inputs are limited between 0 to 2147483647. Numbers outside this range are invalid inputs.

This is done to reduce the memory that needs to be stored per item.


:exclamation: When adding multiple items, any error will invalidate the entire input. No items will be added.

This is done so as to ensure no incorrect items are added into Fridget accidentally. In the case of error, you can copy the previous input, fix the errors, and run the command again.


:exclamation: Do not tamper with the files created in the fridgetData directory.

Please feel free to read and copy the content from the files. However, do not edit the files, as this may cause the program to load erroneously. If any item is detected to be corrupted, all items following it in savedItem.txt will be removed for the user’s safety.


Thank You

We hope you found this user guide useful in pushing Fridget to its limits!

If you find any issues, do let us know here.

All the best, and have fun!