Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
seanieyap committed Mar 20, 2019
2 parents 320e5ae + de93ef3 commit 266f244
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 39 deletions.
69 changes: 31 additions & 38 deletions docs/UserGuide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -73,39 +73,32 @@ This section displays the current implemented features as well as features that
Unlike other commercial calendar/scheduling/planner software, PlanMySem makes use of a tagging system to manage slots.
Using tags to tag slots will make tasks easier for you in the future. Tasks such as viewing, deleting and editing slots will be more efficient and performed quicker.
Using tags to tag slots will make tasks easier for you in the future. Performing tasks such as viewing, deleting and editing slots will be more efficient.
Recommended uses for tags:
1. Tag modules. e.g. "CS2113T", "CS2101".
2. Tag type of lesson. e.g. "Lecture", "Tutorial", "Lab".
3. Tag type of activities. e.g. "Sports", "Seminar", "Talk"
4. Tag difficulty of task. e.g. "Tough", "Simple", "Trivial"
3. Tag type of activities. e.g. "Sports", "Seminar", "Talk".
4. Tag difficulty of task. e.g. "Tough", "Simple", "Trivial".
*Recursion System*
Recursion facilitate quick addition of multiple slots, similar to Microsoft Outlook's series of appointments.
Recursion facilitates quick addition of multiple slots, similar to Microsoft Outlook's series of appointments.
In NUS, academic semesters are split into weeks of several types. Recursion allows you to add slots to these types of weeks with ease through the use of the `r/` parameter.
*Parameters*
Parameters in _PlanMySem_ are designed to be, short and easy to memorise. Once you are familarised with them, they should be intuitive to use.
The table of parameters and their descriptions (Table 1) below is useful for your reference as you jump right into grasping the system.
In NUS, academic semesters are split into weeks of several types. Recursion allows you to add slots to these types of weeks with ease through the use of the `r/`(recursion) parameter.
*Command Format*
* Words in UPPER_CASE are the parameters to be supplied by the user. E.g. in `t/TAG`, `TAG` is a parameter which can be used as the name of the tag.
* Items in square brackets are optional. e.g in `add [l/LOCATION]`, `LOCATION` is a parameter that may be omited.
* Items with `…` after them can be used multiple times including zero times e.g. `[t/TAG]…` can be used as (i.e. 0 times), `t/lab`, `t/lecture`, `t/tutorial` etc.
* Parameters can be in any order e.g. if the command specifies `st/START_TIME et/END_TIME d/DATE`, then both `et/09:00 st/08:00 d/2-13-2019` and `et/09:00 d/2-13-2019 st/08:00` is also acceptable.
* Items in square brackets are optional. e.g in `add [l/LOCATION]`, `LOCATION` is a parameter that may be omitted.
* Items with `…` after them can be used multiple times including zero times e.g. `[t/TAG]…` can be used 0 times, or as `t/lab`, `t/lecture`, `t/tutorial` etc.
* Parameters can be in any order e.g. if the command specifies `st/START_TIME et/END_TIME d/DATE`, then both `et/09:00 st/08:00 d/2-13-2019` and `et/09:00 d/2-13-2019 st/08:00` are acceptable.
*Command Format*
*Parameters*
* Words in UPPER_CASE are the parameters to be supplied by the user. E.g. in `t/TAG`, `TAG` is a parameter which can be used as the name of the tag.
* Items in square brackets are optional. e.g in `add [l/LOCATION]`, `LOCATION` is a parameter that may be omited.
* Items with `…` after them can be used multiple times including zero times e.g. `[t/TAG]…` can be used as (i.e. 0 times), `t/lab`, `t/lecture`, `t/tutorial` etc.
* Parameters can be in any order e.g. if the command specifies `st/START_TIME et/END_TIME d/DATE`, then both `et/09:00 st/08:00 d/2-13-2019` and `et/09:00 d/2-13-2019 st/08:00` is also acceptable.
Parameters in _PlanMySem_ are designed to be, short and easy to memorise. Once you are familarised with them, they should be intuitive to use.
The table of parameters and their descriptions (Table 1) below is useful for your reference as you jump right into grasping the system.
*Command Format*
Expand Down Expand Up @@ -165,7 +158,7 @@ image::Help_Command_Output.png[width="790"]

=== Adding Slots : `add` / `a`

Add _slots_ to the planner. +
Add _slot(s)_ to the planner. +
Format: `add n/NAME d/DATE_OR_DAY_OF_WEEK st/START_TIME et/END_TIME_OR_DURATION +
[l/LOCATION] [des/DESCRIPTION] [r/normal] [r/recess] [r/reading] [r/exam] [r/past] [t/TAG]...`

Expand Down Expand Up @@ -194,7 +187,7 @@ You may add single _slots_ by omitting the recurrence parameter.

=== Editing Slots: `edit` / `e`

Edit _slots_.
Edit _slot(s)_.

1. Edit _slot(s)_ which contains certain _tag_(s). +
Format: `edit t/TAG... [nn/NEW_NAME] [nst/NEW_START_TIME] [net/NEW_END_TIME|DURATION] [nl/NEW_LOCATION] [nd/NEW_DESCRIPTION] [nt/NEW_TAG]...`
Expand All @@ -203,8 +196,8 @@ Format: `edit INDEX [nn/NEW_NAME] [nd/NEW_DATE] [nst/NEW_START_TIME] [net/NEW_EN

[WARNING]
====
You are not able to edit a slot's date when selecting via _tags_.
To edit a _slot_'s date, you may use the `list` or `find` command and select specific _slots_ via index.
You are not able to edit a slot's date when editing via _tags_.
To edit a _slot_'s date, you may use the `list` or `find` command and edit specific _slot(s)_ via index.
====

Examples:
Expand Down Expand Up @@ -311,14 +304,15 @@ View planner for the first of March.
View planner for week 7 of the academic calendar.
* `view week recess` +
View planner for recess week of the academic calendar.
* `view month March` +
View planner for the month of March.
* `view all` +
View all the details in the planner.
* `view month` +
View planner for the months of the current academic semester.

[#img-view]
.[.underline]#Output after entering `view month`#
image::Ui.png[width="790"]

* `view all` +
View all the details in the planner.
{zwsp}

{zwsp}
Expand Down Expand Up @@ -352,7 +346,7 @@ Format: `redo`

{zwsp}

=== Clear all data : clear
=== Clear all data : `clear`

Clear all data stored on the planner. +
Format: `clear`
Expand Down Expand Up @@ -388,25 +382,22 @@ There is no need to save manually.

=== Encrypting/decrypting data files

Planner data is automatically encrypted before saving. You do not need to encrypt the data manually.

Planner data is automatically decrypted after loading. You do not need to decrypt the data manually.
Planner data is automatically encrypted before saving and decrypted before loading. You do not need to encrypt or decrypt he data manually.
{zwsp}

{zwsp}

// tag::importICS[]
=== Importing .ics formatted files `[coming in v2.0]`

You can import an .ics file into the planner.
// end::importICS[]
Format: `import FILENAME`
{zwsp}

{zwsp}

=== Exporting .ics formatted files: `export`

You can export the planner as an .ics file.
You can export the planner as a .ics file.

[#img-export]
.[.underline]#Output after entering `export`#
Expand All @@ -419,7 +410,7 @@ image::Export_Command_Output_1.png[width="420"]
[NOTE]
====
The exported file is named "PlanMySem.ics" and is saved in the main directory.
Double-clicking the .ics file will import the planner data into your personal calendar app. +
The .ics file can be imported into other calendar apps that support .ics files such as Google Calendar. +
[#img-exportFile]
.[.underline]#Location of PlanMySem.ics file#
Expand All @@ -435,6 +426,8 @@ These are plain text files that include calendar event details like a descriptio

{zwsp}



== FAQ

*Q*: How do I transfer my data to another Computer? +
Expand All @@ -455,12 +448,12 @@ This will overwrite the empty data file it creates with the file that contains t
e.g. `add n/CS2113T Tutorial d/mon st/08:00 et/09:00 des/Topic: Sequence Diagram t/CS2113T t/Tutorial` +
* *List Slot(s)* : `list n/NAME` +
eg. `list n/CS2113T`
* *Edit Slot* : +
* *Edit Slot* : `edit` +
1. Via tags: `edit t/TAG... [nn/NEW_NAME] [nst/NEW_START_TIME] [net/NEW_END_TIME|DURATION] [nl/NEW_LOCATION] [nd/NEW_DESCRIPTION] [nt/NEW_TAG]...` +
e.g. `edit t/CS2113T t/Tutorial nl/COM2 04-01`
2. Via `list` command: `edit INDEX [nn/NEW_NAME] [nd/NEW_DATE] [nst/NEW_START_TIME] [net/NEW_END_TIME|DURATION] [nl/NEW_LOCATION] [nd/NEW_DESCRIPTION] [nt/NEW_TAG]...` +
e.g. `edit 1 des/Topic: Sequence Diagram`
* *Delete Slot* : +
* *Delete Slot* : `delete` +
1. Via tags: `delete t/TAG…​` +
eg. `delete t/CS2113T t/Tutorial`
2. Via `list` command: `delete INDEX` +
Expand All @@ -475,5 +468,5 @@ e.g.`view month`
* *Redo previously undone command* : `redo`
* *Clear all data* : `clear`
* *Exit the program* : `exit`
* *Import .ics files into planner* : `import`
* *Export .ics files from planner* : `export`
* *Export .ics file* : `export`
* *Import .ics file* : `import FILENAME`
40 changes: 40 additions & 0 deletions src/planmysem/storage/KeyStorage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package planmysem.storage;

import java.io.FileOutputStream;
import java.io.IOException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;

import javax.crypto.SecretKey;

/**
* Manages key storage and load.
*/
public class KeyStorage {

private char[] pwdArray = "password".toCharArray();

KeyStorage(String password) {
this.pwdArray = password.toCharArray();
}

/**
* Saves the secret key.
*/
private void save(SecretKey key) throws KeyStoreException, IOException, NoSuchAlgorithmException,
CertificateException {
//Initialize keystore.
KeyStore ks = KeyStore.getInstance("JKS");

//Save key.
KeyStore.SecretKeyEntry secret = new KeyStore.SecretKeyEntry(key);
KeyStore.ProtectionParameter password = new KeyStore.PasswordProtection(pwdArray);
ks.setEntry("db-encryption-secret", secret, password);

try (FileOutputStream fos = new FileOutputStream("newKeyStoreFileName.jks")) {
ks.store(fos, pwdArray);
}
}
}
2 changes: 1 addition & 1 deletion src/planmysem/ui/DarkTheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
.text-area {
-fx-background-color: black;
-fx-control-inner-background: black;
-fx-font-family: "Lucida Console";
-fx-font-family: "Monospace";
-fx-font-size: 10pt;
-fx-padding: 5 5 5 5;
}

0 comments on commit 266f244

Please sign in to comment.