Skip to content

Commit a7c38ff

Browse files
authored
Merge pull request #6 from Sergix/dev
v0.3.1
2 parents 1451680 + 1ba7021 commit a7c38ff

File tree

20 files changed

+695
-67
lines changed

20 files changed

+695
-67
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ hs_err_pid*
2525
gradlew.bat
2626
build/libs/
2727
build/tmp/
28+
29+
# test scripts
30+
test.bat

.travis.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
language: java
77
jdk:
88
- oraclejdk8
9+
notifications:
10+
slack: sergix:qb9AYlJo8QqPybBY1FQ5V6my
911

10-
before_script: chmod +x compile.sh
11-
script: ./compile.sh
12+
# before_script: chmod +x compile.sh
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Changelog entry:
2+
3+
[6/12/2017-14:52 0.3.0 Sergix]
4+
Entering "cd /" only adds a slash ('/') to the current working directory (which is still valid, but not what the user desires
5+
and can potentially cause confusion.)
6+
Entering a single slash now changes the directory to the highest-level directory available.
7+
Wrote documentation for version "0.3.1".
8+
Updated source builds and JAR builds.
9+
Created version changelog and release notes.
10+
Put License commenting in the source code.
11+
Opened a PR and requested for merging into master.
12+
13+
Full changes include:
14+
- Created JTerm.Parse() function that is the dedicated command parser (called by JTerm.Standby())
15+
- Added checking for blank input in the Parse() function
16+
- Entering an invalid command now outputs "Unknown Command '(command)'"
17+
- Window() class changes
18+
- Window.ToggleVisible() function that toggles the visibility of the window
19+
- Window.visible property (private) (visibility is automatically set to false)
20+
- Added command option [-v] which turns on visibility of the window
21+
- Fixed possible issue with the Window title being null
22+
- Window.GetTitle() returns title of the window
23+
- Window.title property (private)
24+
- GNU General Public License comments were put at the head of each source file in the project
25+
- When opening the terminal, a quick note about JTerm's license is displayed, along with JTerm's version and authors
26+
27+
More information provided in published release documentation.

build/jar/jterm-v0.3.1.jar

17.7 KB
Binary file not shown.

build/src/jterm-src-v0.3.1.zip

30 KB
Binary file not shown.

changelog.txt

+61
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,64 @@
1+
[6/12/2017-14:52 0.3.0 Sergix]
2+
Entering "cd /" only adds a slash ('/') to the current working directory (which is still valid, but not what the user desires
3+
and can potentially cause confusion.)
4+
Entering a single slash now changes the directory to the highest-level directory available.
5+
Wrote documentation for version "0.3.1".
6+
Updated source builds and JAR builds.
7+
Created version changelog and release notes.
8+
Put License commenting in the source code.
9+
Opened a PR and requested for merging into master.
10+
11+
[6/12/2017-14:44 0.3.0 Sergix]
12+
Added some more scripting elements for windows.
13+
"pause", "window", and window title and visibility changes are now possible.
14+
Windows can be stored as variables and modified later.
15+
Found a large issue that needs to be released as a new patch (v0.3.1):
16+
- Blank input into the console crashes JTerm
17+
Pushed updates to Git.
18+
19+
[6/12/2017-10:09 0.3.0 Sergix]
20+
Moved project folders around for possible Maven integration for the CI.
21+
Added "-h" option to exec.
22+
Pushed updates to Git.
23+
24+
[6/11/2017-17:19 0.3.0 Sergix]
25+
Added "set" command to Exec.Parse().
26+
Known issue: an extra space is added at the end of the variable value
27+
28+
[6/11/2017-15:46 0.3.0 Sergix]
29+
Moved some code around in the JTerm class.
30+
Standby() now calls JTerm.Parse() to parse commands. This makes the code reusable with the Exec.Parse() function.
31+
Pushed updates to Git.
32+
33+
[6/4/2017-20:08 0.3.0 Sergix]
34+
Release 0.3.0 has been pushed with the associated documentation and other data.
35+
Documentation now includes a section covering commands that JTerm provides.
36+
The Client/Server classes are included in the packaged source, although they are not actually used in the release executable; see associated release documentation for more details.
37+
Pushed updates to Git.
38+
39+
[6/3/2017-23:04 0.2.1 Sergix]
40+
Created "jwindow" command that creates a new OS window.
41+
Main class is the "Window" class.
42+
Function called by JTerm command is "new Window(options)"
43+
Options are defined in function documentation comment.
44+
Release v0.3.0 is planned for tomorrow.
45+
Pushed updates to Git.
46+
47+
[6/3/2017-18:50 0.2.1 Sergix]
48+
Ceasing updates on Client/Server model until script interpreter is made.
49+
DO NOT run the "connect" or "server" command; they are DEPRECATED.
50+
Pushed updates to Git.
51+
52+
[5/31/2017-23:28 0.2.1 Sergix]
53+
Created a "Server" class that can run a socket server directly from JTerm and accepts multiple client requests.
54+
Soon, this will become programmable through scripts.
55+
Server.Start() is the used function.
56+
Threads are used to keep track of connecting users.
57+
Only issues are:
58+
- Loops cannot be used to receive input on the server side; the connection must be immediately severed after recieving a message
59+
- Server close code is unreachable
60+
Pushed updates to Git.
61+
162
[5/31/2017-20:43 0.2.1 Sergix]
263
Created a "Client" class that can connect to open TCP servers using a specified port and IP address.
364
Two-way messaging is also enabled from the console.

docs/patch/jterm-v0.3.1-docs.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# JTerm Patch Notes Documentation v0.3.1
2+
3+
## Table of Contents
4+
I. Table of Contents
5+
II. Overview
6+
III. Patch Notes
7+
IV. Changelog
8+
9+
## Overview
10+
This document provides information on version 0.3.1 of the JTerm project. Release notes, developer notes, and the full changelog is included.
11+
12+
## Patch Notes
13+
Patch version "0.3.1" fixes some major crashing issues associated with the command interpreter. Additions to the Window() class were also made to help with the incoming "Scripting" update (designated to be v0.4.0). Licensing notes were also put in the source code at the head of each file, as recommended by the GNU Public License. The "Exec" class is included in the source code built in the JAR, but it is not usable until the "Scripting" update (as mentioned before.) Read the Changelog section for details on these new additions.
14+
15+
## Changelog
16+
- Created JTerm.Parse() function that is the dedicated command parser (called by JTerm.Standby())
17+
- Added checking for blank input in the Parse() function
18+
- Entering an invalid command now outputs "Unknown Command '(command)'"
19+
- Window() class changes
20+
- Window.ToggleVisible() function that toggles the visibility of the window
21+
- Window.visible property (private) (visibility is automatically set to false)
22+
- Added command option [-v] which turns on visibility of the window
23+
- Fixed possible issue with the Window title being null
24+
- Window.GetTitle() returns title of the window
25+
- Window.title property (private)
26+
- GNU General Public License comments were put at the head of each source file in the project
27+
- When opening the terminal, a quick note about JTerm's license is displayed, along with JTerm's version and authors
28+
- Slight project folder mapping reformatting for possible Maven integration (package is now "main.java.jterm")
29+
30+
> `JTerm 0.3.1`
31+
> `jterm-v0.3.1.jar`
32+
> This project and its source are held under the GNU General Public License, located in the LICENSE file in the project's directory.
33+
> (c) 2017

pom.xml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<groupId>sergix</groupId>
6+
<artifactId>jterm</artifactId>
7+
<version>0.3.1</version>
8+
<packaging>jar</packaging>
9+
10+
<name>jterm</name>
11+
<url>http://maven.apache.org</url>
12+
13+
<properties>
14+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
15+
</properties>
16+
17+
<dependencies>
18+
<dependency>
19+
<groupId>junit</groupId>
20+
<artifactId>junit</artifactId>
21+
<version>3.8.1</version>
22+
<scope>test</scope>
23+
</dependency>
24+
</dependencies>
25+
26+
<build>
27+
<plugins>
28+
<plugin>
29+
<groupId>org.apache.maven.plugins</groupId>
30+
<artifactId>maven-compiler-plugin</artifactId>
31+
<version>3.1</version>
32+
<configuration>
33+
<source>1.7</source>
34+
<target>1.7</target>
35+
</configuration>
36+
</plugin>
37+
</plugins>
38+
</build>
39+
</project>

src/main/java/com/jterm/Echo.java

-40
This file was deleted.

src/main/java/com/jterm/Client.java src/main/java/jterm/Client.java

+19-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1-
package main.java.com.jterm;
1+
/*
2+
* JTerm - a cross-platform terminal
3+
* Copyright (C) 2017 Sergix, NCSGeek
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
package main.java.jterm;
220

321
import java.io.*;
422
import java.net.Socket;

src/main/java/com/jterm/Dir.java src/main/java/jterm/Dir.java

+23-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,22 @@
1-
package main.java.com.jterm;
1+
/*
2+
* JTerm - a cross-platform terminal
3+
* Copyright (C) 2017 Sergix, NCSGeek
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
package main.java.jterm;
220

321
import java.io.*;
422
import java.util.ArrayList;
@@ -139,7 +157,10 @@ else if ((!dir.exists() || !dir.isDirectory()) && (!newDir.exists() || !newDir.i
139157

140158
}
141159

142-
if (!newDirectory.endsWith("/"))
160+
if (newDirectory.equals("/"))
161+
newDirectory = "/";
162+
163+
else if (!newDirectory.endsWith("/"))
143164
{
144165
newDirectory += "/";
145166

src/main/java/jterm/Echo.java

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* JTerm - a cross-platform terminal
3+
* Copyright (C) 2017 Sergix, NCSGeek
4+
*
5+
* This program is free software: you can redistribute it and/or modify
6+
* it under the terms of the GNU General Public License as published by
7+
* the Free Software Foundation, either version 3 of the License, or
8+
* (at your option) any later version.
9+
10+
* This program is distributed in the hope that it will be useful,
11+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
* GNU General Public License for more details.
14+
15+
* You should have received a copy of the GNU General Public License
16+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
*/
18+
19+
package main.java.jterm;
20+
21+
import java.util.ArrayList;
22+
23+
public class Echo {
24+
25+
/*
26+
* EchoInput() void
27+
*
28+
* Echoes the input recieved to the console.
29+
*
30+
* ArrayList<String> options - command options
31+
*
32+
* -h
33+
* Prints help information.
34+
*/
35+
public static void EchoInput(ArrayList<String> options) {
36+
37+
String output = "";
38+
39+
for (String option: options) {
40+
if (option.equals("-h"))
41+
{
42+
System.out.println("Command syntax:\n\techo [-h] input\n\nPrints the specified input to the console.");
43+
return;
44+
45+
}
46+
else
47+
{
48+
output += option + " ";
49+
50+
}
51+
52+
}
53+
54+
System.out.println(output);
55+
56+
}
57+
58+
}

0 commit comments

Comments
 (0)