Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated starter tutorial and list, find command to standardised description #407

Merged
merged 12 commits into from
Apr 9, 2023
238 changes: 134 additions & 104 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,25 +59,34 @@ Now it's time to **CONQUER** the semester!

### Prerequisite

> Make sure you have Java `11` installed on your computer by typing `java --version` from your terminal.\
> If not, please download it from the [Oracle website](https://www.oracle.com/sg/java/technologies/javase/jdk11-archive-downloads.html).
Make sure you have Java `11` installed on your computer by typing `java --version` from your terminal. The output should be something similar to:

```java
openjdk 11.0.18 2023-01-17 LTS
OpenJDK Runtime Environment Zulu11.62+17-CA (build 11.0.18+10-LTS)
OpenJDK 64-Bit Server VM Zulu11.62+17-CA (build 11.0.18+10-LTS, mixed mode)
```

If not, please download it from the [Oracle website](https://www.oracle.com/sg/java/technologies/javase/jdk11-archive-downloads.html).

### Installation and Setup

1. Download the latest version of [leTracker.jar](https://github.com/AY2223S2-CS2103-F10-2/tp/releases).
1. Download the latest version of [letracker.jar](https://github.com/AY2223S2-CS2103-F10-2/tp/releases).

2. Open your terminal and navigate to the directory of the downloaded jar file.

3. Run the jar file by `java -jar leTracker.jar`.
3. Run the jar file by `java -jar letracker.jar`.

### User Interface and Getting Started

<img src="images/GettingAround.png" width="1024" />

1. Type anything in the command box, using the :arrow_up: and :arrow_down: arrows to toggle through the texts you have typed.
1. Type any input in the command box.

2. Press `Enter` to execute a command.\
For example, typing "help" and pressing `Enter` will open the help window.
For example, typing `help` and pressing `Enter` will open the help window.

3. Use :arrow_up: and :arrow_down: arrow keys to scroll through previous commands that were executed successfully.

### A Brief Guide to Navigation

Expand All @@ -97,38 +106,42 @@ For more information on **navigation**, please view the [navigation section](#na

### Tutorials and Examples

Scenario 1 - Tracking a new module CS2103:

1. To add a module, run `add CS2103 /name Software Engineering`.
1. To give it a tag of `BestModule`, run `tag CS2103 /tags BestModule`.
1. To add a lecture, run `add Week 1 /mod CS2103`.
1. To add a video, run `add Vid 1 /mod CS2103 /lec Week 1`.
1. To add a timestamp, run `edit Vid 1 /mod CS2103 /lec Week 1 /timestamp 10:20:15`.
1. To view the list with this video, run `list /mod CS2103 /lec Week 1`.
1. To delete the module, run `delete CS2103`.

Scenario 2 - Navigating, finding & archiving data:

1. To navigate into module `CS2040S`, run `nav CS2040S`.
1. To find a lecture named `Week 1`, run `find Week 1`.
1. To find a video named `Vid 1` in `Week 1` lecture, run `find Vid 1 /lec Week 1`.
1. To navigate back to root context, run `nav` or `navb`.
1. To export all data, run `export data.json`.
1. To clear all data, run `clear`.
1. To import data, run `import data.json`.

Scenario 3 - Tracking videos:

1. To view lectures in module `ST2334`, run `list /mod ST2334`.
1. To delete a video `Vid 3` in lecture `Topic 1` in module `ST2334`, run `delete Vid 3 /mod ST2334 /lec Topic 1`
1. To navigate into lecture `Topic 2` in module `ST2334`, run `nav /mod ST2334 /lec Topic 2`.
1. To unmark a video `Vid 1` in lecture `Topic 2` in module `ST2334` as unwatched, run `unmark Vid 1`
1. To change the video name to `video 1`, run `edit Vid 1 /name video 1`
1. To delete this lecture, run `delete Topic 2 /mod ST2334`
1. To exit the app, run `exit`.

:clap: That covers all the main commands. Refer to the [Command Manual](#command-manual) section for details of each command.\
Feel free to play around with the sample data to familiarise yourself with the commands. Once you are comfortable, execute `clear` to delete all data and start from scratch, challenge yourself without using the `import` command :wink:
:information_source: Both scenarios achieve the same results, the difference lies in the context system used. You may try on either one of the scenario. If you are familiar with [navigation](#navigation), try out `Scenario 2` to be more comfortable with the syntax. If not, try out `Scenario 1` to gain a better understanding of how [navigation](#navigation) works.

Scenario 1 - Using [Navigation](#navigation)

1. To add a module, execute `add CS2103 /name Software Engineering`.
1. To add a tag of `BestModule`, execute `tag CS2103 /tags BestModule`.
1. To navigate into module `CS2103`, execute `nav CS2103`.
1. To add a lecture, execute `add Week 1`.
1. To navigate into lecture `Week 1`, execute `nav Week 1`.
1. To add a video, execute `add Vid 1`.
1. To add a timestamp, execute `edit Vid 1 /timestamp 10:20:15`.
1. To mark video as watched, execute `mark Vid 1`.
1. To change video name to `video 1`, execute `edit Vid 1 /name video 1`.
1. To delete a video, execute `delete video 1`.
1. To navigate back into module `CS2103` and list it's lectures, execute `navb`.
1. To add a tag of `Intro`, execute `edit Week 1 /tags Intro`.
1. To remove a tag of `Intro`, execute `untag Week 1 /tags Intro`
1. To navigate back to root context and list all modules, execute `nav` or `navb`.

Scenario 2 - Not using [Navigation](#navigation)

1. To add a module, execute `add CS2103 /name Software Engineering`.
1. To add a tag of `BestModule`, execute `tag CS2103 /tags BestModule`.
1. To add a lecture, execute `add Week 1 /mod CS2103`.
1. To add a video, execute `add Vid 1 /mod CS2103 /lec Week 1`.
1. To add a timestamp, execute `edit Vid 1 /mod CS2103 /lec Week 1 /timestamp 10:20:15`.
1. To list videos, execute `list /mod CS2103 /lec Week 1`.
1. To mark video as watched, execute `mark Vid 1 /mod CS2103 /lec Week 1`.
1. To change video name to `video 1`, execute `edit Vid 1 /mod CS2103 /lec Week 1 /name video 1`.
1. To delete a video, execute `delete video 1 /mod CS2103 /lec Week 1`.
1. To list lectures, execute `list /mod CS2103`.
1. To add a tag of `Intro`, execute `edit Week 1 /mod CS2103 /tags Intro`.
1. To remove a tag of `Intro`, execute `untag Week 1 /mod CS2103 /tags Intro`
1. To list all modules, execute `list`.

:clap: That covers all the main commands. Refer to the [Command Manual](#command-manual) section for details of each command. Feel free to play around with the sample data to familiarise yourself with the commands. Once you are comfortable, execute `clear` to delete all data and start from scratch.

---

Expand Down Expand Up @@ -287,7 +300,9 @@ The following can be performed at **any** [current working context](#current-wor
To make it easier to specify a lecture context which shares the same module code as your current working context, the `/mod` prefix can be injected when only the `/lec` prefix is specified.

- e.g. <img src="images/LectureContext.png" height="20" /> List videos of lecture "Week 5" of module "CS2040S".

> `list /lec Week 5` -> `list /mod CS2040S /lec Week 5`

- Note that the lecture week is different from the current working context and that only the `/mod` prefix has been injected into the command input.

---
Expand Down Expand Up @@ -342,52 +357,56 @@ Navigates backwards to a higher context unless already at root context.

### List

> Items are listed in an alphabetical order sorted by `module_code` for `Module`, `lecture_name` for `Lecture` and `video_name` for `Video`.
:information_source: Items are listed in an alphabetical order sorted by `module_code` for `Module`, `lecture_name` for `Lecture` and `video_name` for `Video`.

#### List Modules

> `list`

<img src="images/RootContext.png" height="20" />
has to be appended at the end of the command if you are not in the root context.

<img src="images/ModContext.png" height="20" />
<img src="images/LectureContext.png" height="20" />
When in a module or lecture context, the navigation system will inject the `/mod` and `/lec` arguments transforming the user's command into the command specified in [List Lectures](#list-lectures) or [List Videos](#list-videos)

(refer to [Navigation](#navigation) for more information)
When in a module or lecture context, the navigation system will inject the `/mod` and `/lec` arguments transforming the user's command into the command specified in [List Lectures](#list-lectures) or [List Videos](#list-videos) (refer to [Navigation Injection](#navigation-injection) for more information).

#### List Lectures

> `list /mod {module_code}`

Lists all lectures belonging to a specified module code

- <span style="color:#e46c0a">`module_code`</span> : The code of the module that contains the lecture specified in `lecture_name`
- Must belong to an existing module in Le Tracker (:exclamation:Module code matching is case sensitive)
- Might be automatically specified by the navigation system (refer to [Navigation](#navigation) for more information)
Lists all lectures of a module.

Examples:
- [<span style="color:#e46c0a">`module_code`</span>](#module-code-format) : The code of the module to list the lectures from.
- Must belong to an existing module in Le Tracker

- `list /mod CS2040S` lists lectures belonging to CS2040S
<details open>
<summary>Example</summary>
<ul>
<li>
<code>list /mod CS2040S</code><br/>
lists lectures belonging to CS2040S
</li>
</ul>
</details>

#### List Videos

> `list /mod {module_code} /lec {lecture_name}`

Lists all videos belonging to a specified lecture name of a specified module code

- <span style="color:#e46c0a">`module_code`</span> : The code of the module that contains the lecture specified in `lecture_name`
- Must belong to an existing module in Le Tracker (:exclamation:Module code matching is case sensitive)
- Might be automatically specified by the navigation system (refer to [Navigation](#navigation) for more information)
- <span style="color:#e46c0a">`lecture_name`</span> : The name of the lecture
- Must be unique among the names of the lectures belonging to the module specified in `module_code` (:exclamation:Uniqueness is case sensitive)
- Refer to [Argument Formats](#argument-formats) for the "Lecture Name" format
- Might be automatically specified by the navigation system (refer to [Navigation](#navigation) for more information)
Lists all videos of a lecture in a module.

Examples:
- [<span style="color:#e46c0a">`module_code`</span>](#module-code-format) :
The code of the module that contains the lecture specified in `lecture_name`
- Must belong to an existing module in Le Tracker
- [<span style="color:#e46c0a">`lecture_name`</span>](#lecture-name-format) : The name of the lecture
- Must belong to an existing lecture in the specified `module_code`

- `list /mod CS2040 /lec Week 1`
<details open>
<summary>Example</summary>
<ul>
<li>
<code>list /mod CS2040 /lec Week 1</code><br/>
lists videos in lecture Week 1 belonging to CS2040S
</li>
</ul>
</details>

### Add

Expand Down Expand Up @@ -570,6 +589,7 @@ When in a module or lecture context, the `/mod` argument will be injected if onl
> `delete {module_code_1}[, {module_code_2}[, {module_code_3}[, ...]]]`

Deletes the specified module(s) and all its embodied content from the application

- <span style="color:#e46c0a">`module_code_1`, `module_code_2`, `module_code_3`, ...</span>: The codes of modules to be deleted
- Refer to [Argument Formats](#argument-formats) for the "Module Code" format
- Must exist in Le Tracker
Expand All @@ -584,7 +604,6 @@ Examples:
![LectureContext](images/LectureContext.png)
When in a module or lecture context, the navigation system will automatically inject the `/mod` and/or `/lec` arguments, transforming the user's command into the command specified in [Delete Lecture](#delete-lecture) or [Delete Video](#delete-video) (refer to [Navigation Injection](#navigation-injection) for more information)


#### Delete Lecture

> `delete {lecture_name_1}[, {lecture_name_2}[, {lecture_name_3}[, ...]]] /mod {module_code}`
Expand Down Expand Up @@ -636,7 +655,6 @@ Marks video(s) as **watched** in lecture of its specified module

Marks video(s) as **unwatched** in a lecture of its specified module.


- <span style="color:#e46c0a">`video_name_1`, `video_name_2`, `video_name_3`, ...</span>: The Names of Videos to be marked
- Refer to [Argument Formats](#argument-formats) for the "Video Name" format
- Must exist in the Lecture of `lecture_name` in the Module of `module_code`
Expand Down Expand Up @@ -794,8 +812,9 @@ Examples:

### Find

:exclamation: This is a case insensitive search and matches a target that starts with the search term.
:exclamation: This is a case insensitive search and matches a target that starts with the search term.\
E.g:

|Type|Data|Keyword|Matched|
|-|-|-|-|
|ModuleCode|[CS2040S, CS2103, ST2334, MA2001]|cs21|[CS2103]|
Expand All @@ -808,60 +827,72 @@ E.g:

Find all modules whose code starts with any of the keyword(s).

images/RootContext.png)
has to be appended at the end of the command if you are not in the root context.
- <span style="color:#e46c0a">`/byTag`</span> : If specified, the list filters for modules whose tag list contains any tag that starts with any of the keyword(s)

<img src="images/ModContext.png" height="20" />
<img src="images/LectureContext.png" height="20" />
When in a module or lecture context, the navigation system will inject the `/mod` and `/lec` arguments transforming the user's command into the command specified in [Find Lectures in a Module](#find-lectures-in-a-module) or [Find Videos in a Lecture](#find-videos-in-a-lecture) (refer to [Navigation](#navigation) for more information)

(refer to [Navigation](#navigation) for more information)
When in a module or lecture context, the navigation system will inject the `/mod` and `/lec` arguments transforming the user's command into the command specified in [Find Lectures](#find-lectures) or [Find Videos](#find-videos) (refer to [Navigation Injection](#navigation-injection) for more information).

:exclamation: If `/byTag` is specified, the list filters for modules whose tag list contains any tag that starts with any of the keyword(s)

Examples:

Assuming a Module `CS2040S` has tags `["heavy", 'math']`,

- `find heav /byTag` will show module `CS2040S` in the list.
<details open>
<summary>Example</summary>
<ul>
<li>
Assuming only a module <code>CS2040S</code> has tags <code>["heavy", "math"]</code>,<br/>
<code>find heav /byTag</code><br/>
will list modules [CS2040S].
</li>
</ul>
</details>

#### Find Lectures

> `find {keywords} /mod {module_code} [/byTag]`

Find all lectures in a specified module whose name starts with any of the keyword(s)
Find all lectures in a specified module whose name starts with any of the keyword(s).

- <span style="color:#e46c0a">`module_code`</span> : The code of the module that contains the lecture specified in `lecture_name`
- Must belong to an existing module in Le Tracker (:exclamation:Module code matching is case sensitive)
- Might be automatically specified by the navigation system (refer to [Navigation](#navigation) for more information)

:exclamation: If `/byTag` is specified, the list filters for lectures in a specifed module whose tag list contains any tag that starts with any of the keyword(s)

Examples:
- <span style="color:#e46c0a">`/byTag`</span> : If specified, the list filters for lectures in a specifed module whose tag list contains any tag that starts with any of the keyword(s)
- [<span style="color:#e46c0a">`module_code`</span>](#module-code-format) : The code of the module that contains the lecture specified in `lecture_name`
- Must belong to an existing module in Le Tracker

- `find week 1, week 2 /mod CS2040S`
- `find intro, array /mod CS2040S /byTag`
<details open>
<summary>Example</summary>
<ul>
<li>
<code>find week 1, week 2 /mod CS2040S</code><br/>
will list lectures ["Week 1", "Week 2"] of module "CS2040S".
</li>
<li>
<code>find intro, array /mod CS2040S /byTag</code><br/>
will list lectures belonging to module "CS2040S" with tags containing "intro" or "array".
</li>
</ul>
</details>

#### Find Videos

> `find {keywords} /mod {module_code} /lec {lecture_name} [/byTag]`

Find all videos in a specified lecture in a specified module whose name starts with any of the keyword(s)

- <span style="color:#e46c0a">`module_code`</span> : The code of the module that contains the lecture specified in `lecture_name`
- Must belong to an existing module in Le Tracker (:exclamation:Module code matching is case sensitive)
- Might be automatically specified by the navigation system (refer to [Navigation](#navigation) for more information)
- <span style="color:#e46c0a">`lecture_name`</span> : The name of the lecture
- Must be unique among the names of the lectures belonging to the module specified in `module_code` (:exclamation:Uniqueness is case sensitive)
- Refer to [Argument Formats](#argument-formats) for the "Lecture Name" format
- Might be automatically specified by the navigation system (refer to [Navigation](#navigation) for more information)

:exclamation: If `/byTag` is specified, the list filters for videos in a specified lecture in a specified module whose tag list contains any tag that starts with any of the keyword(s)
Find all videos in a specified lecture in a specified module whose name starts with any of the keyword(s).

Examples:
- <span style="color:#e46c0a">`/byTag`</span> : If specified, the list filters for videos in a specified lecture in a specified module whose tag list contains any tag that starts with any of the keyword(s)
- [<span style="color:#e46c0a">`module_code`</span>](#module-code-format) : The code of the module that contains the lecture specified in `lecture_name`
- Must belong to an existing module in Le Tracker
- [<span style="color:#e46c0a">`lecture_name`</span>](#lecture-name-format) : The name of the lecture
- Must belong to an existing lecture in the specified `module_code`

- `find vid1, vid2 /mod CS2040S /lec Week 2`
- `find content /mod CS2040S /lec Week 2 /byTag`
<details open>
<summary>Example</summary>
<ul>
<li>
<code>find vid1, vid2 /mod CS2040S /lec Week 2</code><br/>
will list videos ["Vid1", "Vid2"] in lecture Week 2 of module "CS2040S".
</li>
<li>
<code>find content /mod CS2040S /lec Week 2 /byTag</code><br/>
will list videos belonging to lecture "Week 2" of module "CS2040S" with tags containing "content".
</li>
</ul>
</details>

### Clear all Modules

Expand Down Expand Up @@ -913,7 +944,7 @@ Import modules progress from a JSON-format file to the current tracker.
file location}/data`)
- The file specified in `file_path` must exist. (:exclamation:If only the file's name is specified, the file must
exist in the default saving directory at `{JAR file location}/data`)
- <span style="color:#e46c0a">`/mod {module_1}[, {module_2}[, {module_3}, ...]] `</span> : If specified, Le Tracker will only import progress
- <span style="color:#e46c0a">`/mod {module_1}[, {module_2}[, {module_3}, ...]]`</span> : If specified, Le Tracker will only import progress
of these modules from the file specified in `file_path`
- If unspecified, Le Tracker will import progress of all modules in the file specified in `file_path`
- If `/overwrite` is not specified, `module_1, module_2, ...` must not exist in the current tracker
Expand All @@ -931,7 +962,6 @@ Examples:
- `import hehe.json /mod CS2040, MA2401`
- `import hihi.json /mod EG2310 /overwrite`


---

## Notes
Expand Down
Binary file added docs/images/java-11.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.