8000 v0.3.1 by Sergix · Pull Request #6 · Sergix/JTerm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

v0.3.1 #6

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

Merged
merged 13 commits into from
Jun 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@ hs_err_pid*
gradlew.bat
build/libs/
build/tmp/

# test scripts
test.bat
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
language: java
jdk:
- oraclejdk8
notifications:
slack: sergix:qb9AYlJo8QqPybBY1FQ5V6my

before_script: chmod +x compile.sh
script: ./compile.sh
# before_script: chmod +x compile.sh
27 changes: 27 additions & 0 deletions build/changelog/jterm-changelog-v0.3.1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Changelog entry:

[6/12/2017-14:52 0.3.0 Sergix]
Entering "cd /" only adds a slash ('/') to the current working directory (which is still valid, but not what the user desires
and can potentially cause confusion.)
Entering a single slash now changes the directory to the highest-level directory available.
Wrote documentation for version "0.3.1".
Updated source builds and JAR builds.
Created version changelog and release notes.
Put License commenting in the source code.
Opened a PR and requested for merging into master.

Full changes include:
- Created JTerm.Parse() function that is the dedicated command parser (called by JTerm.Standby())
- Added checking for blank input in the Parse() function
- Entering an invalid command now outputs "Unknown Command '(command)'"
- Window() class changes
- Window.ToggleVisible() function that toggles the visibility of the window
- Window.visible property (private) (visibility is automatically set to false)
- Added command option [-v] which turns on visibility of the window
- Fixed possible issue with the Window title being null
- Window.GetTitle() returns title of the window
- Window.title property (private)
- GNU General Public License comments were put at the head of each source file in the project
- When opening the terminal, a quick note about JTerm's license is displayed, along with JTerm's version and authors

More information provided in published release documentation.
Binary file added build/jar/jterm-v0.3.1.jar
Binary file not shown.
Binary file added build/src/jterm-src-v0.3.1.zip
Binary file not shown.
61 changes: 61 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
[6/12/2017-14:52 0.3.0 Sergix]
Entering "cd /" only adds a slash ('/') to the current working directory (which is still valid, but not what the user desires
and can potentially cause confusion.)
Entering a single slash now changes the directory to the highest-level directory available.
Wrote documentation for version "0.3.1".
Updated source builds and JAR builds.
Created version changelog and release notes.
Put License commenting in the source code.
Opened a PR and requested for merging into master.

[6/12/2017-14:44 0.3.0 Sergix]
Added some more scripting elements for windows.
"pause", "window", and window title and visibility changes are now possible.
Windows can be stored as variables and modified later.
Found a large issue that needs to be released as a new patch (v0.3.1):
- Blank input into the console crashes JTerm
Pushed updates to Git.

[6/12/2017-10:09 0.3.0 Sergix]
Moved project folders around for possible Maven integration for the CI.
Added "-h" option to exec.
Pushed updates to Git.

[6/11/2017-17:19 0.3.0 Sergix]
Added "set" command to Exec.Parse().
Known issue: an extra space is added at the end of the variable value

[6/11/2017-15:46 0.3.0 Sergix]
Moved some code around in the JTerm class.
Standby() now calls JTerm.Parse() to parse commands. This makes the code reusable with the Exec.Parse() function.
Pushed updates to Git.

[6/4/2017-20:08 0.3.0 Sergix]
Release 0.3.0 has been pushed with the associated documentation and other data.
Documentation now includes a section covering commands that JTerm provides.
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.
Pushed updates to Git.

[6/3/2017-23:04 0.2.1 Sergix]
Created "jwindow" command that creates a new OS window.
Main class is the "Window" class.
Function called by JTerm command is "new Window(options)"
Options are defined in function documentation comment.
Release v0.3.0 is planned for tomorrow.
Pushed updates to Git.

[6/3/2017-18:50 0.2.1 Sergix]
Ceasing updates on Client/Server model until script interpreter is made.
DO NOT run the "connect" or "server" command; they are DEPRECATED.
Pushed updates to Git.

[5/31/2017-23:28 0.2.1 Sergix]
Created a "Server" class that can run a socket server directly from JTerm and accepts multiple client requests.
Soon, this will become programmable through scripts.
Server.Start() is the used function.
Threads are used to keep track of connecting users.
Only issues are:
- Loops cannot be used to receive input on the server side; the connection must be immediately severed after recieving a message
- Server close code is unreachable
Pushed updates to Git.

[5/31/2017-20:43 0.2.1 Sergix]
Created a "Client" class that can connect to open TCP servers using a specified port and IP address.
Two-way messaging is also enabled from the console.
Expand Down
33 changes: 33 additions & 0 deletions docs/patch/jterm-v0.3.1-docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# JTerm Patch Notes Documentation v0.3.1

## Table of Contents
I. Table of Contents
II. Overview
III. Patch Notes
IV. Changelog

## Overview
This document provides information on version 0.3.1 of the JTerm project. Release notes, developer notes, and the full changelog is included.

## Patch Notes
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.

## Changelog
- Created JTerm.Parse() function that is the dedicated command parser (called by JTerm.Standby())
- Added checking for blank input in the Parse() function
- Entering an invalid command now outputs "Unknown Command '(command)'"
- Window() class changes
- Window.ToggleVisible() function that toggles the visibility of the window
- Window.visible property (private) (visibility is automatically set to false)
- Added command option [-v] which turns on visibility of the window
- Fixed possible issue with the Window title being null
- Window.GetTitle() returns title of the window
- Window.title property (private)
- GNU General Public License comments were put at the head of each source file in the project
- When opening the terminal, a quick note about JTerm's license is displayed, along with JTerm's version and authors
- Slight project folder mapping reformatting for possible Maven integration (package is now "main.java.jterm")

> `JTerm 0.3.1`
> `jterm-v0.3.1.jar`
> This project and its source are held under the GNU General Public License, located in the LICENSE file in the project's directory.
> (c) 2017
39 changes: 39 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>sergix</groupId>
<artifactId>jterm</artifactId>
<version>0.3.1</version>
<packaging>jar</packaging>

<name>jterm</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
40 changes: 0 additions & 40 deletions src/main/java/com/jterm/Echo.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
package main.java.com.jterm;
/*
* JTerm - a cross-platform terminal
* Copyright (C) 2017 Sergix, NCSGeek
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.

* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.

* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package main.java.jterm;

import java.io.*;
import java.net.Socket;
Expand Down
25 changes: 23 additions & 2 deletions src/main/java/com/jterm/Dir.java → src/main/java/jterm/Dir.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
package main.java.com.jterm;
/*
* JTerm - a cross-platform terminal
* Copyright (C) 2017 Sergix, NCSGeek
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.

* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.

* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package main.java.jterm;

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

}

if (!newDirectory.endsWith("/"))
if (newDirectory.equals("/"))
newDirectory = "/";

else if (!newDirectory.endsWith("/"))
{
newDirectory += "/";

Expand Down
58 changes: 58 additions & 0 deletions src/main/java/jterm/Echo.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/*
* JTerm - a cross-platform terminal
* Copyright (C) 2017 Sergix, NCSGeek
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.

* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.

* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package main.java.jterm;

import java.util.ArrayList;

public class Echo {

/*
* EchoInput() void
*
* Echoes the input recieved to the console.
*
* ArrayList<String> options - command options
*
* -h
* Prints help information.
*/
public static void EchoInput(ArrayList<String> options) {

String output = "";

for (String option: options) {
if (option.equals("-h"))
{
System.out.println("Command syntax:\n\techo [-h] input\n\nPrints the specified input to the console.");
return;

}
else
{
output += option + " ";

}

}

System.out.println(output);

}

}
Loading
0