kai-morich / SimpleBluetoothTerminal

Android terminal app for Bluetooth classic devices using SPP profile
MIT License
447 stars 166 forks source link

[feature request] Support variables #27

Open KongNan opened 2 years ago

KongNan commented 2 years ago

Currently Macro is allowed in the App to send Multiline Text in bulk. this is useful, but support for variables would be even more powerful.

Imagine how convenient variables are in the programming language you are using. Also think about the <%%> {{ }} expressions that are common in the WEB.

Many programming languages have built-in template processors that will make your support for variables (relatively) more feasible.

Consider supporting variables in Macro, where you can use a syntax like <%%> {{ }} to simplify development and learning.

For example if the user includes {{host}} in Macro M1, then the App allows the value of the variable host to be entered (and temporarily cached) when M1 is clicked. This allows the user to easily modify the part of Macro that needs to be changed without the restriction that "Multiline Text" cannot be "inserted" but only "sent".

If the template has multiple variables, they can be displayed in the same panel, making the development relatively uncomplicated and the operation process smoother.

For example, take the following script and imagine how user-friendly it will be.

Thank you. and sorry for my English.

sys {{ host }} vlan 100 de GuanLi int vlan 100 de GuanLi ip add 172.16.100.{{ ip }} 24

ip route-static 0.0.0.0 0 0 172.16.100.254

local-user admin password sim samplep@ssword service-type ssh
authorization-attribute user-role level-15 quit user-interface vty 0 4 authentication-mode scheme user-role network-admin quit ssh server en

int ra te 1/0/25 to te1/0/28 po li tr po tr per vlan all un po tr per vlan 1

netconf soap http enable netconf soap https enable restful https enable