diff --git a/3270Connect b/3270Connect index 6b26e28..0d3f897 100755 Binary files a/3270Connect and b/3270Connect differ diff --git a/app/static/installation/index.html b/app/static/installation/index.html index 8d648b6..95476d3 100644 --- a/app/static/installation/index.html +++ b/app/static/installation/index.html @@ -435,9 +435,9 @@

Installation

To use the 3270Connect command-line utility, you need to install it on your system. Follow the steps below based on your platform:

Linux

-
$ curl -LO https://github.com/3270io/3270Connect/releases/download/v1.0.2/3270Connect
-$ chmod +x 3270Connect
-$ sudo mv 3270Connect /usr/local/bin/3270Connect
+
curl -LO https://github.com/3270io/3270Connect/releases/download/v1.0.3/3270Connect
+chmod +x 3270Connect
+sudo mv 3270Connect /usr/local/bin/3270Connect
 

macOS

diff --git a/app/static/search/search_index.json b/app/static/search/search_index.json index 36bfd59..5c79acb 100644 --- a/app/static/search/search_index.json +++ b/app/static/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Welcome","text":""},{"location":"#welcome-to-3270connect-documentation","title":"Welcome to 3270Connect Documentation","text":""},{"location":"#introduction","title":"Introduction","text":"

Welcome to the official documentation for the 3270Connect command-line utility. This documentation provides comprehensive information on how to use 3270Connect for automating interactions with terminal emulators like x3270 or s3270.

"},{"location":"#getting-started","title":"Getting Started","text":"

If you're new to 3270Connect, you can start by exploring the following sections:

  • Installation: Learn how to install 3270Connect on your system.
  • Basic Usage: Get started with basic usage, running workflows and sample 3270 application(s) to aid testing.
"},{"location":"#advanced-features","title":"Advanced Features","text":"

Once you've mastered the basics, you can dive into more advanced features:

  • API Mode: Discover how to run 3270Connect as an API server for advanced automation and load performance testing.
"},{"location":"#conclusion","title":"Conclusion","text":"

The 3270Connect command-line utility is a powerful tool for automating terminal emulator interactions. This documentation is here to help you make the most of it. If you have any questions or need assistance, feel free to reach out to the community or refer to the GitHub repository for more details.

Let's get started with 3270Connect!

"},{"location":"#video-example","title":"Video example","text":"

Video examples coming soon...

"},{"location":"1.mkdocs/","title":"mkdocs build","text":""},{"location":"1.mkdocs/#mkdocs-build","title":"mkdocs build","text":""},{"location":"1.mkdocs/#1-cmd-to-run","title":"1. CMD to run","text":"
  • in the project root folder
  • mkdocs build -d app/static build the static site within app/static folder
"},{"location":"advanced-features/","title":"Advanced Features","text":""},{"location":"advanced-features/#advanced-features","title":"Advanced Features","text":""},{"location":"advanced-features/#api-mode","title":"API Mode","text":"

3270Connect can also run as an API server using the -api and -api-port flags:

  • -api: Run 3270Connect as an API.
  • -api-port: Specifies the port for the API (default is 8080).

To run 3270Connect in API mode, use the following command:

3270Connect -api -api-port 8080\n

Once the API is running, you can send HTTP requests to it to trigger workflows and retrieve information.

POST:

http://localhost:8080/api/execute\n

Body:

{\n  \"Host\": \"10.27.27.27\",\n  \"Port\": 3270,\n  \"HTMLFilePath\": \"output.html\",\n  \"Steps\": [\n    {\n      \"Type\": \"InitializeHTMLFile\"\n    },\n    {\n      \"Type\": \"Connect\"\n    },\n    {\n      \"Type\": \"AsciiScreenGrab\"\n    },\n    {\n      \"Type\": \"CheckValue\",\n      \"Coordinates\": {\"Row\": 1, \"Column\": 2, \"Length\": 11},\n      \"Text\": \"Some: VALUE\"\n    },\n    {\n      \"Type\": \"FillString\",\n      \"Coordinates\": {\"Row\": 10, \"Column\": 44},\n      \"Text\": \"user1\"\n    },\n    {\n      \"Type\": \"FillString\",\n      \"Coordinates\": {\"Row\": 11, \"Column\": 44},\n      \"Text\": \"mypass\"\n    },\n    {\n      \"Type\": \"AsciiScreenGrab\"\n    },\n    {\n      \"Type\": \"PressEnter\"\n    },\n    {\n      \"Type\": \"AsciiScreenGrab\"\n    },\n    {\n      \"Type\": \"Disconnect\"\n    }\n  ]\n}\n
"},{"location":"basic-usage/","title":"Basic Usage","text":""},{"location":"basic-usage/#basic-usage","title":"Basic Usage","text":""},{"location":"basic-usage/#introduction","title":"Introduction","text":"

The basic usage of 3270Connect involves running workflows defined in a configuration file. The configuration file specifies a sequence of actions to perform, such as connecting to a host, filling fields, and capturing screens.

As well as performing workflows on a 3270 running instance, 3270Connect can emulate a 3270 sample application using the github.com/racingmars/go3270 framework. Full credit go to racingmars for this excellent coding.

github.com/racingmars/go3270 is Copyright (c) 2020 Matthew R. Wilson, under MIT License.

To run a workflow, use the following command:

3270Connect -config workflow.json\n
  • -config: Specifies the path to the configuration file (default is \"workflow.json\").
"},{"location":"basic-usage/#running-workflows","title":"Running Workflows","text":""},{"location":"basic-usage/#single-workflow","title":"Single Workflow","text":"

To run a single workflow, create a JSON configuration file that describes the workflow steps. Here's an example configuration file:

{\n  \"Host\": \"10.27.27.62\",\n  \"Port\": 3270,\n  \"HTMLFilePath\": \"output.html\",\n  \"Steps\": [\n    {\n      \"Type\": \"InitializeHTMLFile\"\n    },\n    {\n      \"Type\": \"Connect\"\n    },\n    {\n      \"Type\": \"AsciiScreenGrab\"\n    },\n    {\n      \"Type\": \"CheckValue\",\n      \"Coordinates\": {\"Row\": 1, \"Column\": 29, \"Length\": 24},\n      \"Text\": \"3270 Example Application\"\n    },\n    {\n      \"Type\": \"FillString\",\n      \"Coordinates\": {\"Row\": 5, \"Column\": 21},\n      \"Text\": \"user1-firstname\"\n    },\n    {\n      \"Type\": \"FillString\",\n      \"Coordinates\": {\"Row\": 6, \"Column\": 21},\n      \"Text\": \"user1-lastname\"\n    },\n    {\n      \"Type\": \"AsciiScreenGrab\"\n    },\n    {\n      \"Type\": \"PressEnter\"\n    },\n    {\n      \"Type\": \"CheckValue\",\n      \"Coordinates\": {\"Row\": 1, \"Column\": 29, \"Length\": 24},\n      \"Text\": \"3270 Example Application\"\n    },\n    {\n      \"Type\": \"AsciiScreenGrab\"\n    },\n    {\n      \"Type\": \"Disconnect\"\n    }\n  ]\n}\n

In this example, the workflow connects to a host, captures the screen, fills a field, presses Enter, captures the screen again, and then disconnects.

"},{"location":"basic-usage/#concurrent-workflows","title":"Concurrent Workflows","text":"

You can run multiple workflows concurrently by specifying the -concurrent and -runtime flags:

  • -concurrent: Sets the number of concurrent workflows to run (default is 1).
  • -runtime: Specifies the duration to run workflows in seconds (only used in concurrent mode).

For example, to run two workflows concurrently for 60 seconds, use:

3270Connect -config workflow.json -concurrent 2 -runtime 60\n
"},{"location":"basic-usage/#configuration","title":"Configuration","text":""},{"location":"basic-usage/#headless-mode","title":"Headless Mode","text":"

You can run 3270Connect in headless mode using the -headless flag. Headless mode is useful for running workflows without a graphical user interface.

3270Connect -config workflow.json -headless\n
"},{"location":"basic-usage/#verbose-mode","title":"Verbose Mode","text":"

To enable verbose mode for detailed output, use the -verbose flag.

3270Connect -config workflow.json -verbose\n
"},{"location":"basic-usage/#examples","title":"Examples","text":"

Let's explore some common use cases with examples:

"},{"location":"basic-usage/#1-running-a-basic-workflow","title":"1. Running a Basic Workflow","text":"

Run a basic workflow defined in \"workflow.json\":

3270Connect -config workflow.json\n
"},{"location":"basic-usage/#2-running-multiple-workflows-concurrently","title":"2. Running Multiple Workflows Concurrently","text":"

Run two workflows concurrently for 60 seconds:

3270Connect -config workflow.json -concurrent 2 -runtime 60\n
"},{"location":"basic-usage/#3-running-in-headless-mode","title":"3. Running in Headless Mode","text":"

Run a workflow in headless mode:

3270Connect -config workflow.json -headless\n
"},{"location":"basic-usage/#4-using-the-api-mode","title":"4. Using the API Mode","text":"

Run 3270Connect in API mode and interact with it using HTTP requests.

  • API Mode: Discover how to run 3270Connect as an API server for advanced automation.
"},{"location":"basic-usage/#5-running-a-3270-sample-application-to-help-with-testing-the-workflow-features","title":"5. Running a 3270 sample application to help with testing the workflow features","text":"

Run a test 3270 sample application to assist with testing 3270Connect workflow features:

3270Connect -runApp\n

Once running and listening on port 3270, run a separate 3270 Connect to run a workflow against the sample 3270 application. The \"workflow.json\" provided with the root folder of the repo works with the sample application.

"},{"location":"basic-usage/#conclusion","title":"Conclusion","text":"

The 3270Connect command-line utility offers a flexible way to automate interactions with terminal emulators. Whether you need to connect to hosts, manipulate screens, or run multiple workflows concurrently, 3270Connect has you covered. Explore its features, experiment with different workflows, and streamline your terminal automation tasks.

That's it! You're now ready to use 3270Connect for your terminal automation needs, including the API mode for more advanced automation scenarios.

"},{"location":"installation/","title":"Installation","text":""},{"location":"installation/#installation","title":"Installation","text":"

To use the 3270Connect command-line utility, you need to install it on your system. Follow the steps below based on your platform:

"},{"location":"installation/#linux","title":"Linux","text":"
$ curl -LO https://github.com/3270io/3270Connect/releases/download/v1.0.2/3270Connect\n$ chmod +x 3270Connect\n$ sudo mv 3270Connect /usr/local/bin/3270Connect\n
"},{"location":"installation/#macos","title":"macOS","text":"

Coming soon.

"},{"location":"installation/#windows","title":"Windows","text":"

Coming soon.

"}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Welcome","text":""},{"location":"#welcome-to-3270connect-documentation","title":"Welcome to 3270Connect Documentation","text":""},{"location":"#introduction","title":"Introduction","text":"

Welcome to the official documentation for the 3270Connect command-line utility. This documentation provides comprehensive information on how to use 3270Connect for automating interactions with terminal emulators like x3270 or s3270.

"},{"location":"#getting-started","title":"Getting Started","text":"

If you're new to 3270Connect, you can start by exploring the following sections:

  • Installation: Learn how to install 3270Connect on your system.
  • Basic Usage: Get started with basic usage, running workflows and sample 3270 application(s) to aid testing.
"},{"location":"#advanced-features","title":"Advanced Features","text":"

Once you've mastered the basics, you can dive into more advanced features:

  • API Mode: Discover how to run 3270Connect as an API server for advanced automation and load performance testing.
"},{"location":"#conclusion","title":"Conclusion","text":"

The 3270Connect command-line utility is a powerful tool for automating terminal emulator interactions. This documentation is here to help you make the most of it. If you have any questions or need assistance, feel free to reach out to the community or refer to the GitHub repository for more details.

Let's get started with 3270Connect!

"},{"location":"#video-example","title":"Video example","text":"

Video examples coming soon...

"},{"location":"1.mkdocs/","title":"mkdocs build","text":""},{"location":"1.mkdocs/#mkdocs-build","title":"mkdocs build","text":""},{"location":"1.mkdocs/#1-cmd-to-run","title":"1. CMD to run","text":"
  • in the project root folder
  • mkdocs build -d app/static build the static site within app/static folder
"},{"location":"advanced-features/","title":"Advanced Features","text":""},{"location":"advanced-features/#advanced-features","title":"Advanced Features","text":""},{"location":"advanced-features/#api-mode","title":"API Mode","text":"

3270Connect can also run as an API server using the -api and -api-port flags:

  • -api: Run 3270Connect as an API.
  • -api-port: Specifies the port for the API (default is 8080).

To run 3270Connect in API mode, use the following command:

3270Connect -api -api-port 8080\n

Once the API is running, you can send HTTP requests to it to trigger workflows and retrieve information.

POST:

http://localhost:8080/api/execute\n

Body:

{\n  \"Host\": \"10.27.27.27\",\n  \"Port\": 3270,\n  \"HTMLFilePath\": \"output.html\",\n  \"Steps\": [\n    {\n      \"Type\": \"InitializeHTMLFile\"\n    },\n    {\n      \"Type\": \"Connect\"\n    },\n    {\n      \"Type\": \"AsciiScreenGrab\"\n    },\n    {\n      \"Type\": \"CheckValue\",\n      \"Coordinates\": {\"Row\": 1, \"Column\": 2, \"Length\": 11},\n      \"Text\": \"Some: VALUE\"\n    },\n    {\n      \"Type\": \"FillString\",\n      \"Coordinates\": {\"Row\": 10, \"Column\": 44},\n      \"Text\": \"user1\"\n    },\n    {\n      \"Type\": \"FillString\",\n      \"Coordinates\": {\"Row\": 11, \"Column\": 44},\n      \"Text\": \"mypass\"\n    },\n    {\n      \"Type\": \"AsciiScreenGrab\"\n    },\n    {\n      \"Type\": \"PressEnter\"\n    },\n    {\n      \"Type\": \"AsciiScreenGrab\"\n    },\n    {\n      \"Type\": \"Disconnect\"\n    }\n  ]\n}\n
"},{"location":"basic-usage/","title":"Basic Usage","text":""},{"location":"basic-usage/#basic-usage","title":"Basic Usage","text":""},{"location":"basic-usage/#introduction","title":"Introduction","text":"

The basic usage of 3270Connect involves running workflows defined in a configuration file. The configuration file specifies a sequence of actions to perform, such as connecting to a host, filling fields, and capturing screens.

As well as performing workflows on a 3270 running instance, 3270Connect can emulate a 3270 sample application using the github.com/racingmars/go3270 framework. Full credit go to racingmars for this excellent coding.

github.com/racingmars/go3270 is Copyright (c) 2020 Matthew R. Wilson, under MIT License.

To run a workflow, use the following command:

3270Connect -config workflow.json\n
  • -config: Specifies the path to the configuration file (default is \"workflow.json\").
"},{"location":"basic-usage/#running-workflows","title":"Running Workflows","text":""},{"location":"basic-usage/#single-workflow","title":"Single Workflow","text":"

To run a single workflow, create a JSON configuration file that describes the workflow steps. Here's an example configuration file:

{\n  \"Host\": \"10.27.27.62\",\n  \"Port\": 3270,\n  \"HTMLFilePath\": \"output.html\",\n  \"Steps\": [\n    {\n      \"Type\": \"InitializeHTMLFile\"\n    },\n    {\n      \"Type\": \"Connect\"\n    },\n    {\n      \"Type\": \"AsciiScreenGrab\"\n    },\n    {\n      \"Type\": \"CheckValue\",\n      \"Coordinates\": {\"Row\": 1, \"Column\": 29, \"Length\": 24},\n      \"Text\": \"3270 Example Application\"\n    },\n    {\n      \"Type\": \"FillString\",\n      \"Coordinates\": {\"Row\": 5, \"Column\": 21},\n      \"Text\": \"user1-firstname\"\n    },\n    {\n      \"Type\": \"FillString\",\n      \"Coordinates\": {\"Row\": 6, \"Column\": 21},\n      \"Text\": \"user1-lastname\"\n    },\n    {\n      \"Type\": \"AsciiScreenGrab\"\n    },\n    {\n      \"Type\": \"PressEnter\"\n    },\n    {\n      \"Type\": \"CheckValue\",\n      \"Coordinates\": {\"Row\": 1, \"Column\": 29, \"Length\": 24},\n      \"Text\": \"3270 Example Application\"\n    },\n    {\n      \"Type\": \"AsciiScreenGrab\"\n    },\n    {\n      \"Type\": \"Disconnect\"\n    }\n  ]\n}\n

In this example, the workflow connects to a host, captures the screen, fills a field, presses Enter, captures the screen again, and then disconnects.

"},{"location":"basic-usage/#concurrent-workflows","title":"Concurrent Workflows","text":"

You can run multiple workflows concurrently by specifying the -concurrent and -runtime flags:

  • -concurrent: Sets the number of concurrent workflows to run (default is 1).
  • -runtime: Specifies the duration to run workflows in seconds (only used in concurrent mode).

For example, to run two workflows concurrently for 60 seconds, use:

3270Connect -config workflow.json -concurrent 2 -runtime 60\n
"},{"location":"basic-usage/#configuration","title":"Configuration","text":""},{"location":"basic-usage/#headless-mode","title":"Headless Mode","text":"

You can run 3270Connect in headless mode using the -headless flag. Headless mode is useful for running workflows without a graphical user interface.

3270Connect -config workflow.json -headless\n
"},{"location":"basic-usage/#verbose-mode","title":"Verbose Mode","text":"

To enable verbose mode for detailed output, use the -verbose flag.

3270Connect -config workflow.json -verbose\n
"},{"location":"basic-usage/#examples","title":"Examples","text":"

Let's explore some common use cases with examples:

"},{"location":"basic-usage/#1-running-a-basic-workflow","title":"1. Running a Basic Workflow","text":"

Run a basic workflow defined in \"workflow.json\":

3270Connect -config workflow.json\n
"},{"location":"basic-usage/#2-running-multiple-workflows-concurrently","title":"2. Running Multiple Workflows Concurrently","text":"

Run two workflows concurrently for 60 seconds:

3270Connect -config workflow.json -concurrent 2 -runtime 60\n
"},{"location":"basic-usage/#3-running-in-headless-mode","title":"3. Running in Headless Mode","text":"

Run a workflow in headless mode:

3270Connect -config workflow.json -headless\n
"},{"location":"basic-usage/#4-using-the-api-mode","title":"4. Using the API Mode","text":"

Run 3270Connect in API mode and interact with it using HTTP requests.

  • API Mode: Discover how to run 3270Connect as an API server for advanced automation.
"},{"location":"basic-usage/#5-running-a-3270-sample-application-to-help-with-testing-the-workflow-features","title":"5. Running a 3270 sample application to help with testing the workflow features","text":"

Run a test 3270 sample application to assist with testing 3270Connect workflow features:

3270Connect -runApp\n

Once running and listening on port 3270, run a separate 3270 Connect to run a workflow against the sample 3270 application. The \"workflow.json\" provided with the root folder of the repo works with the sample application.

"},{"location":"basic-usage/#conclusion","title":"Conclusion","text":"

The 3270Connect command-line utility offers a flexible way to automate interactions with terminal emulators. Whether you need to connect to hosts, manipulate screens, or run multiple workflows concurrently, 3270Connect has you covered. Explore its features, experiment with different workflows, and streamline your terminal automation tasks.

That's it! You're now ready to use 3270Connect for your terminal automation needs, including the API mode for more advanced automation scenarios.

"},{"location":"installation/","title":"Installation","text":""},{"location":"installation/#installation","title":"Installation","text":"

To use the 3270Connect command-line utility, you need to install it on your system. Follow the steps below based on your platform:

"},{"location":"installation/#linux","title":"Linux","text":"
curl -LO https://github.com/3270io/3270Connect/releases/download/v1.0.3/3270Connect\nchmod +x 3270Connect\nsudo mv 3270Connect /usr/local/bin/3270Connect\n
"},{"location":"installation/#macos","title":"macOS","text":"

Coming soon.

"},{"location":"installation/#windows","title":"Windows","text":"

Coming soon.

"}]} \ No newline at end of file diff --git a/app/static/sitemap.xml b/app/static/sitemap.xml index 14620a9..e260f86 100644 --- a/app/static/sitemap.xml +++ b/app/static/sitemap.xml @@ -2,27 +2,27 @@ https://3270.io/ - 2023-11-04 + 2023-11-07 daily https://3270.io/1.mkdocs/ - 2023-11-04 + 2023-11-07 daily https://3270.io/advanced-features/ - 2023-11-04 + 2023-11-07 daily https://3270.io/basic-usage/ - 2023-11-04 + 2023-11-07 daily https://3270.io/installation/ - 2023-11-04 + 2023-11-07 daily \ No newline at end of file diff --git a/app/static/sitemap.xml.gz b/app/static/sitemap.xml.gz index f35698f..cdfd6ec 100644 Binary files a/app/static/sitemap.xml.gz and b/app/static/sitemap.xml.gz differ diff --git a/docs/installation.md b/docs/installation.md index fa9a3be..b5033d3 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -5,9 +5,9 @@ To use the 3270Connect command-line utility, you need to install it on your syst ## Linux ```shell -$ curl -LO https://github.com/3270io/3270Connect/releases/download/v1.0.2/3270Connect -$ chmod +x 3270Connect -$ sudo mv 3270Connect /usr/local/bin/3270Connect +curl -LO https://github.com/3270io/3270Connect/releases/download/v1.0.3/3270Connect +chmod +x 3270Connect +sudo mv 3270Connect /usr/local/bin/3270Connect ``` ## macOS diff --git a/go3270Connect.go b/go3270Connect.go index 75cbc8c..d5a8792 100644 --- a/go3270Connect.go +++ b/go3270Connect.go @@ -19,7 +19,7 @@ import ( "github.com/gin-gonic/gin" ) -const version = "1.0.2" +const version = "1.0.3" // Configuration holds the settings for the terminal connection and the steps to be executed. type Configuration struct {