PROJECT: Trajectory


Overview

Trajectory is a lightweight management system for those who need a no-frills solution for managing students, modules, grades, classes and notes. It is built for users who prefer typing (CLI) over GUI interaction and has a GUI created with JavaFX.

Summary of contributions

  • Code contributed: Link to Project Code Dashboard

  • Main feature implemented: Notes Management

    • What it does: It allows the user to manage notes within the application.

    • Justification: This feature improves the product’s utility as users would sometimes need to take notes about important things. It serves to make Trajectory a step closer to becoming a one-stop app for target users so that they would not need to rely on several other applications to accomplish their needs.

    • Highlights: Notes saved in Trajectory can be of two types: a plain sticky note or a calendar event. Those of the latter type are exportable to CSV, which may then be imported to Google Calendar.

    • Credits: https://cs2113-ay1819s1-t16-1.github.io/main/AboutUs.html and https://github.com/nusCS2113-AY1819S1/addressbook-level4

  • Other contributions:

    • Enhancement to User-Experience:

      • Implemented Auto-complete when typing commands from the command text field (Pull request #313)

Contributions to the User Guide

Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users.

Notes Management

Add Note : note add

Adds a note to a module.
Format: note add [mc/MODULE_CODE] [tt/TITLE] [sd/START_DATE] [st/START_TIME] [ed/END_DATE] [et/END_TIME] [lc/LOCATION]

  • The START_DATE and END_DATE parameters allows the following date formats only.

    • d-M-yyyy (e.g. 2-11-2018)

    • d/M-yyyy (e.g. 2/11/2018)

    • d.M.yyyy (e.g. 2.11.2018)

    • d-MMM-yyyy (e.g. 2-Nov-2018)

    • d MMM yyyy (e.g. 2 Nov 2018)

    • d-MMM-yy (e.g. 2-Nov-18)

    • d MMM yy (e.g. 2 Nov 18)

  • The START_TIME and END_TIME parameters follows the following time format only.

    • h:m AM/PM (e.g. 4:00 PM)

- MODULE_CODE strictly follows the following:
Module code should begin with 2 or 3 uppercase letters, followed by a 4-digit number and an optional uppercase letter at the end.
- The date and time fields are case-insensitive which means the user can enter 2-nOv-2018 as date.
- If dates are specified but not the time, the system defines a default time of 12:00 AM for START_DATE and 11:59 PM for END_DATE.
- Specifying an END_DATE or any time parameters requires the START_DATE to be defined. Otherwise, the system will show an error message.
- The TITLE and LOCATION parameters allows characters up to 30 and 80 maximum respectively. Otherwise, an error message will be displayed.
- Omitting the TITLE will show a "(No title)" when the note is displayed.
- Defining the START_DATE but not the END_DATE automatically assigns the same date to it.
- Entering a START_DATE and START_TIME later than END_DATE and END_TIME is not allowed.
- Specifying the prefix but with an empty field is not allowed. (e.g. tt/ )
  • Upon entering the note add command, the system will prompt the user to type his/her note in a new window.

  • To save the note, the user can press CTRL+S. Note that saving blank text field is not allowed.

  • The user can choose to cancel anytime during the process by pressing CTRL+Q.

Examples:

  • note add
    This creates a note in Trajectory without any other information except for the note’s content itself.

  • note add mc/CS2113 tt/Lecture sd/2.11.2018 st/4:00 PM et/6:00 pm lc/LT15
    This tells the system that the note is to be saved in the CS2113 module with a title "Lecture", a start date (2 Nov 2018) and end date (2 Nov 2018) from 4PM to 6PM at LT15.

Edit note : note edit

Edits an existing note.
Format: note edit INDEX [mc/NEW_MODULE_CODE] [sd/NEW_START_DATE] [st/NEW_START_TIME] [ed/NEW_END_DATE] [et/NEW_END_TIME] [lc/NEW_LOCATION]

  • Edits the note with the specified INDEX.

  • The INDEX refers to the corresponding number of each note when note list command is invoked.

  • Upon entering the note edit command, the system will prompt the user to type his/her modifications to the note.

  • The user can complete his/her edits by pressing CTRL+S.

  • The user can choose to cancel anytime during the editing stage with CTRL+Q.

The system does not allow calling this command when the notes list is not displayed. This is to prevent accidentally editing another note.

Examples:

  • note list mc/CS1010
    A list of all notes saved in CS1010 module is displayed.
    note edit 3 tt/Changed the title lc/NUS
    The user will now be able to edit the note that corresponds to INDEX=3 in the list. The modified note will be saved with its attributes changed accordingly.

Delete note : note delete

Delete notes.
Format: note delete INDEX [MORE_INDEXES]..

  • Delete one or more notes with the specified INDEX.

  • The command allows for multiple deletion by entering multiple INDEXES separated by space.

  • Entering a range of INDEXES separated by a hyphen (e.g. 2-4) is also allowed.

  • The INDEX refers to the corresponding number of each note when note list command is invoked.

Examples:

  • note list
    A list of all notes is displayed.
    note delete 2 1 4-6
    Delete notes that are numbered #1, #2, #4, #5, and #6 from the list.

Find note : note find

Search and display existing notes using keywords.
Format: note find k/KEYWORD [k/MORE_KEYWORDS]..

  • The command searches for notes that contains ALL of the keywords.

  • It only matches with TITLE and the note’s text.

  • Multiple keywords can be accepted.

  • A minimum of one keyword is required for the command to work.

  • Keywords are case-insensitive.

  • Each keyword must consist only of a single word (e.g. "Sort", "Git-Hub") and is not separated by spaces.

Examples:

  • note find k/git k/OOP
    Lists all notes which contain both keywords "git" and "OOP".

List notes : note list

Shows a list of all saved notes.
Format: note list [mc/MODULE_CODE]

  • MODULE_CODE field is case-insensitive, hence the user can use either lowercase or uppercase.

Examples:

  • note list
    This will list all existing notes from Trajectory.

  • note list mc/CS1231
    This will list all notes saved in CS1231 module.

Export notes: note export

Converts all exportable notes to CSV.
Format: note export fn/FILE_NAME

  • This command creates a <FILE_NAME>.csv file in the local storage.

  • Directory: {Trajectory’s path}/data/CSVexport/<FILE_NAME>.csv

  • The format follows the Google Calendar’s CSV import formatting. Hence, the user can import their CSV notes to Google Calendar with this command.

  • Only notes with dates are exportable.

Contributions to the Developer Guide

Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project.

Notes data to Google Calendar feature

Feature Description:

EXPORTING NOTES TO CSV :
The user is able to export notes from this application to a CSV file that follows the formatting required for importing calendar files to Google Calendar.
The exporting process can be invoked by the user with the following command:

Command: note export fn/FILE_NAME

  • The command note export will create a file with a .csv extension on the local storage. *

  • Invoking the command above by itself will convert all exportable notes data saved in the application to CSV format.

  • [Coming in V2.0] It can be extended to perform more specific instructions. The following optional arguments may be used:

    • note export fn/FILE_NAME [fr/START_DATE to/END_DATE] The following command allows the user to export notes from a specific date range.

Implementation of exporting to CSV is provided below.
1. Assuming that exportable notes data are currently present in Trajectory, the user can invoke the note export command to begin exporting.
2. For each Note object to be exported, a corresponding CsvAdaptedNote object will be created. It is used to generate the correct formatting for the Google Calendar.
3. A CSV utility class will then be used to handle the writing to CSV. The file is saved to "/data/CSVexport" folder in the application’s directory.

The following sequence diagram shows the note exporting process:

NoteExportSequenceDiagram

Use case: Add Note

Precondition(s)

  • Module must exist in data file.

Guarantees :

  • NIL

MSS :

  1. Teacher requests to add a note.

  2. System prompts the teacher to enter his/her note.

  3. Teacher types the note.

  4. System adds the note to the module and displays a message that it is successfully added.

    Use case ends.

Extensions :

  • 1a. Teacher enters an invalid command.

    • 1a1. System displays the list of valid commands.

      Use case resumes at step 1.

  • 1b. The module code specified does not exist in Trajectory.

    • 1b1. System informs user that module does not exist.

      Use case resumes at step 1.

  • 3a. The teacher decides to cancel.

    Use case ends.

Use case: Edit Note

Precondition(s) :

  • Note must exist in data file.

  • Module must exist in data file.

Guarantees :

  • NIL

MSS :

  1. Teacher requests to list all notes.

  2. System displays the complete numbered list of notes.

  3. Teacher requests to edit a specific note in the list.

  4. System prompts the teacher to enter the modifications.

  5. Teacher can now modify the text.

  6. System saves the modified note and displays a message for the successful modification.

    Use case ends.

Extensions :

  • 1a. Teacher gives an invalid command.

    • 1a1. System displays the list of valid commands.

      Use case resumes at step 1.

  • 2a. There are no saved entries of notes.

    • 2a1. System displays a message that no entries are found.

      Use case ends.

  • 3a. The given index is invalid.

    • 3a1. System informs the user that the input is invalid.

      Use case resumes at step 2.

  • 3b. The module code specified does not exist in Trajectory.

    • 3b1. System informs user that module does not exist.

      Use case resumes at step 3.

  • 5a. The teacher decides to cancel.

    • 5a1. System cancels the editing process.

      Use case ends.

Use case: Delete Notes

Precondition(s) :

  • Note must exist in data file.

Guarantees :

  • NIL

MSS :

  1. Teacher requests to list all notes.

  2. System displays the complete numbered list of notes.

  3. Teacher requests to delete one or more notes in the list.

  4. System deletes the note(s) and displays a message for successful deletion.

    Use case ends.

Extensions :

  • 1a. Teacher enters an invalid command.

    • 1a1. System displays the list of valid commands.

      Use case resumes at step 1.

  • 2a. There are no saved entries of notes in the module.

    • 2a1. System displays a message that no entries are found.

      Use case ends.

  • 3a. Teacher enters an invalid command.

    • 3a1. System displays the list of valid commands.

      Use case resumes at step 3.

  • 3b. The given index is invalid.

    • 3b1. System informs the user that the input is invalid.

      Use case resumes at step 2.

Use case: Find Notes

Precondition(s) :

  • Notes must exist in data file.

Guarantees :

  • NIL

MSS :

  1. Teacher requests to find notes which contains a set of keywords.

  2. System displays the complete numbered list of notes found that contains the keyword(s).

    Use case ends.

Extensions :

  • 1a. Teacher enters an invalid command.

    • 1a1. System displays the list of valid commands.

      Use case resumes at step 1.

  • 2b. There are no entries found that contains the keyword(s).

    • 2b1. System displays a message that no entries are found.

      Use case ends.

Use case: Export Notes

Precondition(s) :

  • Notes must exist in data file.

  • Notes must contain a start date and end date.

Guarantees :

  • NIL

MSS :

  1. Teacher requests to export notes.

  2. System informs the user the number of notes exported.

    Use case ends.

Extensions :

  • 1a. Teacher enters an invalid command.

    • 1a1. System displays the list of valid commands.

      Use case resumes at step 1.

  • 2b. There are no notes that can be exported.

    • 2b1. System displays a message that no entries are found.

      Use case ends.