Skip to content

Commit b572ec0

Browse files
committed
Code Finalizing
Begin code finalizing * Add copyright notice * change license to GNU GPLv2 * Integrate help files into Cataphract * Remove trailing whitespaces * Make branding uniform * Fix an issue with file reading logic where the program would attempt to read a null value
1 parent abb8e51 commit b572ec0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1341
-738
lines changed

LICENSE

Lines changed: 247 additions & 412 deletions
Large diffs are not rendered by default.

README

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
|
22
||
3-
|||||| ||||||||| |||||||| ||||||||| ||||||| ||| ||| ||||||| ||||||||| |||||| ||||||||
3+
|||||| ||||||||| |||||||| ||||||||| ||||||| ||| ||| ||||||| ||||||||| |||||| |||||||||
44
||| || ||| || || ||| ||| || || ||| |||
55
||| |||||||| ||| |||||||| |||||| |||||||| |||||| |||||||| ||| |||
66
||| ||| ||| ||| ||| ||| ||| ||| ||| || || ||| ||| ||| |||
@@ -13,13 +13,13 @@ Powered By Truncheon Core.
1313

1414
Website: https://dak404.github.io/Cataphract
1515

16-
Current Status: LVL_2-DEV -> TESTING
16+
Current Status: LVL_3-DEV -> FINALIZING
1717

1818
-----------------------------------------------------------------------------------------------
1919

2020
=== ! WARNING ! ===
2121

22-
This repository has code that is still being tested.
22+
This repository has code that is still being finalized.
2323

2424
DO NOT USE THE CODE FOR ANY PRODUCTION BUILDS!
2525

Source/Cataphract/API/Anvil.java

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* |
33
* ||
4-
* |||||| ||||||||| |||||||| ||||||||| ||||||| ||| ||| ||||||| ||||||||| |||||| ||||||||
4+
* |||||| ||||||||| |||||||| ||||||||| ||||||| ||| ||| ||||||| ||||||||| |||||| |||||||||
55
* ||| || ||| || || ||| ||| || || ||| |||
66
* ||| |||||||| ||| |||||||| |||||| |||||||| |||||| |||||||| ||| |||
77
* ||| ||| ||| ||| ||| ||| ||| ||| ||| || || ||| ||| ||| |||
@@ -13,6 +13,25 @@
1313
* Powered By Truncheon Core
1414
*/
1515

16+
/*
17+
* This file is part of the Cataphract project.
18+
* Copyright (C) 2024 DAK404 (https://github.com/DAK404)
19+
*
20+
* This program is free software; you can redistribute it and/or modify
21+
* it under the terms of the GNU General Public License as published by
22+
* the Free Software Foundation; either version 2 of the License, or
23+
* (at your option) any later version.
24+
*
25+
* This program is distributed in the hope that it will be useful,
26+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
27+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28+
* GNU General Public License for more details.
29+
*
30+
* You should have received a copy of the GNU General Public License
31+
* along with this program; if not, write to the Free Software Foundation, Inc.,
32+
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
33+
*/
34+
1635
package Cataphract.API;
1736

1837
import java.util.regex.Pattern;
@@ -73,9 +92,12 @@ public static void anvilInterpreter(String commandArray[])throws Exception
7392

7493
case 2:
7594
month = Integer.parseInt(commandArray[1]);
95+
new Calendar().printCalendar(month, year);
96+
break;
97+
98+
default:
7699
break;
77100
}
78-
new Calendar().printCalendar(month, year);
79101
}
80102
catch(NumberFormatException e)
81103
{

Source/Cataphract/API/Astaroth/Calendar.java

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* |
33
* ||
4-
* |||||| ||||||||| |||||||| ||||||||| ||||||| ||| ||| ||||||| ||||||||| |||||| ||||||||
4+
* |||||| ||||||||| |||||||| ||||||||| ||||||| ||| ||| ||||||| ||||||||| |||||| |||||||||
55
* ||| || ||| || || ||| ||| || || ||| |||
66
* ||| |||||||| ||| |||||||| |||||| |||||||| |||||| |||||||| ||| |||
77
* ||| ||| ||| ||| ||| ||| ||| ||| ||| || || ||| ||| ||| |||
@@ -13,6 +13,25 @@
1313
* Powered By Truncheon Core
1414
*/
1515

16+
/*
17+
* This file is part of the Cataphract project.
18+
* Copyright (C) 2024 DAK404 (https://github.com/DAK404)
19+
*
20+
* This program is free software; you can redistribute it and/or modify
21+
* it under the terms of the GNU General Public License as published by
22+
* the Free Software Foundation; either version 2 of the License, or
23+
* (at your option) any later version.
24+
*
25+
* This program is distributed in the hope that it will be useful,
26+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
27+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28+
* GNU General Public License for more details.
29+
*
30+
* You should have received a copy of the GNU General Public License
31+
* along with this program; if not, write to the Free Software Foundation, Inc.,
32+
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
33+
*/
34+
1635
package Cataphract.API.Astaroth;
1736

1837
import java.time.LocalDate;

Source/Cataphract/API/Astaroth/Readme.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,4 @@ https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.htm
4444
The Astaroth package also provides a feature to display a calendar for a specified month and
4545
year. If the input values are 0, the calendar for the current month is displayed.
4646

47-
48-
-[ IMPORTANT LINKS ]-
49-
50-
EasyGuide - Nion Directory Specification :
51-
Developer Program Documentation : https://dak404.github.io/Cataphract/DeveloperDocumentation/index.html
52-
Internal Program Documentation : https://dak404.github.io/Cataphract/InternalDocumentation/index.html
53-
Website : https://dak404.github.io/Cataphract
54-
GitHub Repository : https://github.com/DAK404/Cataphract
55-
5647
============================================================================================

Source/Cataphract/API/Astaroth/Time.java

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* |
33
* ||
4-
* |||||| ||||||||| |||||||| ||||||||| ||||||| ||| ||| ||||||| ||||||||| |||||| ||||||||
4+
* |||||| ||||||||| |||||||| ||||||||| ||||||| ||| ||| ||||||| ||||||||| |||||| |||||||||
55
* ||| || ||| || || ||| ||| || || ||| |||
66
* ||| |||||||| ||| |||||||| |||||| |||||||| |||||| |||||||| ||| |||
77
* ||| ||| ||| ||| ||| ||| ||| ||| ||| || || ||| ||| ||| |||
@@ -13,6 +13,25 @@
1313
* Powered By Truncheon Core
1414
*/
1515

16+
/*
17+
* This file is part of the Cataphract project.
18+
* Copyright (C) 2024 DAK404 (https://github.com/DAK404)
19+
*
20+
* This program is free software; you can redistribute it and/or modify
21+
* it under the terms of the GNU General Public License as published by
22+
* the Free Software Foundation; either version 2 of the License, or
23+
* (at your option) any later version.
24+
*
25+
* This program is distributed in the hope that it will be useful,
26+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
27+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28+
* GNU General Public License for more details.
29+
*
30+
* You should have received a copy of the GNU General Public License
31+
* along with this program; if not, write to the Free Software Foundation, Inc.,
32+
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
33+
*/
34+
1635
package Cataphract.API.Astaroth;
1736

1837
import java.time.Instant;

Source/Cataphract/API/Astaroth/package-info.java

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,35 @@
11
/*
2-
* |
3-
* ||
4-
* |||||| ||||||||| |||||||| ||||||||| ||||||| ||| ||| ||||||| ||||||||| |||||| ||||||||
5-
* ||| || ||| || || ||| ||| || || ||| |||
6-
* ||| |||||||| ||| |||||||| |||||| |||||||| |||||| |||||||| ||| |||
7-
* ||| ||| ||| ||| ||| ||| ||| ||| ||| || || ||| ||| ||| |||
8-
* |||||| ||| ||| ||| ||| ||| ||| ||| ||| || || ||| ||| |||||| |||
9-
* ||
10-
* |
2+
* |
3+
* ||
4+
* |||||| ||||||||| |||||||| ||||||||| ||||||| ||| ||| ||||||| ||||||||| |||||| |||||||||
5+
* ||| || ||| || || ||| ||| || || ||| |||
6+
* ||| |||||||| ||| |||||||| |||||| |||||||| |||||| |||||||| ||| |||
7+
* ||| ||| ||| ||| ||| ||| ||| ||| ||| || || ||| ||| ||| |||
8+
* |||||| ||| ||| ||| ||| ||| ||| ||| ||| || || ||| ||| |||||| |||
9+
* ||
10+
* |
11+
*
12+
* A Cross Platform OS Shell
13+
* Powered By Truncheon Core
14+
*/
15+
16+
/*
17+
* This file is part of the Cataphract project.
18+
* Copyright (C) 2024 DAK404 (https://github.com/DAK404)
19+
*
20+
* This program is free software; you can redistribute it and/or modify
21+
* it under the terms of the GNU General Public License as published by
22+
* the Free Software Foundation; either version 2 of the License, or
23+
* (at your option) any later version.
24+
*
25+
* This program is distributed in the hope that it will be useful,
26+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
27+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28+
* GNU General Public License for more details.
29+
*
30+
* You should have received a copy of the GNU General Public License
31+
* along with this program; if not, write to the Free Software Foundation, Inc.,
32+
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
1133
*/
1234

1335
/**

Source/Cataphract/API/Build.java

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,25 @@
1313
* Powered By Truncheon Core
1414
*/
1515

16+
/*
17+
* This file is part of the Cataphract project.
18+
* Copyright (C) 2024 DAK404 (https://github.com/DAK404)
19+
*
20+
* This program is free software; you can redistribute it and/or modify
21+
* it under the terms of the GNU General Public License as published by
22+
* the Free Software Foundation; either version 2 of the License, or
23+
* (at your option) any later version.
24+
*
25+
* This program is distributed in the hope that it will be useful,
26+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
27+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28+
* GNU General Public License for more details.
29+
*
30+
* You should have received a copy of the GNU General Public License
31+
* along with this program; if not, write to the Free Software Foundation, Inc.,
32+
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
33+
*/
34+
1635
package Cataphract.API;
1736

1837
/**
@@ -56,11 +75,7 @@ public static void viewBuildInfo()
5675
//clear the screen before printing the branding.
5776
clearScreen();
5877
//print the branding string.
59-
IOStreams.println(_Branding + "\n");
60-
//new Build().debug();
61-
IOStreams.printDebug("Development Build. Use at your own risk!");
62-
63-
debug();
78+
IOStreams.println(_Branding + "\nVersion " + _BuildInfo[1]);
6479
}
6580

6681
/**

Source/Cataphract/API/Dragon/AccountCreate.java

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* |
33
* ||
4-
* |||||| ||||||||| |||||||| ||||||||| ||||||| ||| ||| ||||||| ||||||||| |||||| ||||||||
4+
* |||||| ||||||||| |||||||| ||||||||| ||||||| ||| ||| ||||||| ||||||||| |||||| |||||||||
55
* ||| || ||| || || ||| ||| || || ||| |||
66
* ||| |||||||| ||| |||||||| |||||| |||||||| |||||| |||||||| ||| |||
77
* ||| ||| ||| ||| ||| ||| ||| ||| ||| || || ||| ||| ||| |||
@@ -13,6 +13,25 @@
1313
* Powered By Truncheon Core
1414
*/
1515

16+
/*
17+
* This file is part of the Cataphract project.
18+
* Copyright (C) 2024 DAK404 (https://github.com/DAK404)
19+
*
20+
* This program is free software; you can redistribute it and/or modify
21+
* it under the terms of the GNU General Public License as published by
22+
* the Free Software Foundation; either version 2 of the License, or
23+
* (at your option) any later version.
24+
*
25+
* This program is distributed in the hope that it will be useful,
26+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
27+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28+
* GNU General Public License for more details.
29+
*
30+
* You should have received a copy of the GNU General Public License
31+
* along with this program; if not, write to the Free Software Foundation, Inc.,
32+
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
33+
*/
34+
1635
package Cataphract.API.Dragon;
1736

1837
import java.io.Console;
@@ -285,7 +304,7 @@ private final boolean setAccountUsername()throws Exception
285304

286305
// set the value of the account username
287306
_newAccountUsername = (console.readLine(_accountUsernamePolicy + "Account Username> "));
288-
307+
289308
// Check if the entered username adheres to the policy set
290309
if(_newAccountUsername == null || _newAccountUsername.equals("") || _newAccountUsername.equalsIgnoreCase("Administrator"))
291310
{
@@ -294,7 +313,7 @@ private final boolean setAccountUsername()throws Exception
294313
}
295314
else
296315
{
297-
_newAccountUsername = Cryptography.stringToSHA3_256(_newAccountUsername);
316+
_newAccountUsername = Cryptography.stringToSHA3_256(_newAccountUsername);
298317

299318
// check if the entered username exists in the database already
300319
if(new Login(_newAccountUsername).checkUserExistence())
@@ -309,7 +328,7 @@ private final boolean setAccountUsername()throws Exception
309328
status = true;
310329
}
311330
}
312-
331+
313332
// return the status
314333
return status;
315334
}

Source/Cataphract/API/Dragon/AccountDelete.java

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* |
33
* ||
4-
* |||||| ||||||||| |||||||| ||||||||| ||||||| ||| ||| ||||||| ||||||||| |||||| ||||||||
4+
* |||||| ||||||||| |||||||| ||||||||| ||||||| ||| ||| ||||||| ||||||||| |||||| |||||||||
55
* ||| || ||| || || ||| ||| || || ||| |||
66
* ||| |||||||| ||| |||||||| |||||| |||||||| |||||| |||||||| ||| |||
77
* ||| ||| ||| ||| ||| ||| ||| ||| ||| || || ||| ||| ||| |||
@@ -13,6 +13,25 @@
1313
* Powered By Truncheon Core
1414
*/
1515

16+
/*
17+
* This file is part of the Cataphract project.
18+
* Copyright (C) 2024 DAK404 (https://github.com/DAK404)
19+
*
20+
* This program is free software; you can redistribute it and/or modify
21+
* it under the terms of the GNU General Public License as published by
22+
* the Free Software Foundation; either version 2 of the License, or
23+
* (at your option) any later version.
24+
*
25+
* This program is distributed in the hope that it will be useful,
26+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
27+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28+
* GNU General Public License for more details.
29+
*
30+
* You should have received a copy of the GNU General Public License
31+
* along with this program; if not, write to the Free Software Foundation, Inc.,
32+
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
33+
*/
34+
1635
package Cataphract.API.Dragon;
1736

1837
import java.io.Console;
@@ -149,14 +168,14 @@ private void userManagementConsoleDelete()throws Exception
149168
* @return {@code true} if the deletion is successful, {@code false} otherwise.
150169
* @throws Exception Throws any exceptions encountered during runtime.
151170
*/
152-
private boolean accountDeletionLogic(String username) throws Exception
171+
private boolean accountDeletionLogic(String username) throws Exception
153172
{
154173
boolean status = false;
155174

156175
// Check if the username is "Administrator"
157176
if (username.equals(Cryptography.stringToSHA3_256("Administrator")))
158177
IOStreams.printError("Deletion of Administrator Account is not allowed!");
159-
else
178+
else
160179
{
161180
if (! new Login(Cryptography.stringToSHA3_256(username)).checkUserExistence() || ! new Login(username).checkUserExistence())
162181
{

0 commit comments

Comments
 (0)