Crates.io | mfform |
lib.rs | mfform |
version | 0.4.0 |
source | src |
created_at | 2024-07-08 16:27:19.634735 |
updated_at | 2024-07-12 00:30:34.739229 |
description | A simple input form simulating mainframe input forms, think 3270. |
homepage | https://github.com/thorhs/mfform |
repository | https://github.com/thorhs/mfform |
max_upload_size | |
id | 1296134 |
size | 427,512 |
A simple input form simulating mainframe input forms, think 3270.
View Demo
·
Report Bug
·
Request Feature
mfframe is a small tool I created for gather bits of data from the user. I've recently been playing with Hercules, the mainframe emulator, as well as having a long standing facinations with them. So, I did what anyone would do, I created a small utility that presents the user with a 3270-like dialog asking for input.
Start by creating a screen.mfform with the inputs requested (see below), then run the program by calling mfform.
For now you need the rust compiler:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install --git https://github.com/thorhs/mfform
An example configuration file is below:
LABEL 8 2 USER ===>
LABEL 4 4 PASSWORD ===>
LABEL 6 6 NUMBER ===>
LABEL 5 8 DEFAULT ===>
INPUT 18 2 8 username
PASSWORD 18 4 8 password
NUMBER 18 6 8 number
INPUT 18 8 8 default awesome!
SELECT username id1 First!
SELECT username id2 Second
SELECT username id3 Third
SELECT username id4 Fourth
LABEL lines are made up of the LABEL keyword, followed by the x,y coordinates for the label, and the value. Everthing after the y coordinate is used as the text, there is no need to quote the string.
INPUT lines start with the same x,y coordinates followed by the input field length and the field name. An optional default value can follow the field name.
PASSWORD lines work just as the INPUT lines, except the input value is masked on screen. Please note that the value will be in plain text in the program output.
NUMBER lines work like INPUT lines, except the only accept numbers.
SELECT lines have a field name, item ID and item text. This enables F4 for the particular input field and adds the id/text combo as a possible item to select.
Once you have mfform running the following keyboard shortcuts are available:
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)Distributed under the MIT License. See LICENSE.txt
for more information.
Your Name - @thorhs - toti@toti.is
Project Link: https://github.com/thorhs/mfform