Version 0.4.0: mask, eine Eingabemaske mit eigener Oberfläche

This commit is contained in:
wkh
2026-10-11 22:08:38 +02:00
parent 837a73366d
commit e7a7577900
12 changed files with 592 additions and 4 deletions
+43 -2
View File
@@ -745,6 +745,9 @@ Name : <Name> Company: <Company>
Street: <Street>
City : <City> State : <State> ZIP: <ZIP>
Phone : <Phone>
[Speichern] [Abbrechen]
$ screen < entry
: paint crt screen
exec 1>/dev/tty
@@ -755,6 +758,8 @@ Name : Company:
Street:
City : State : ZIP:
Phone :
[Speichern] [Abbrechen]
SCREEN
: read user input
cursor 3 9 ; read Name;
@@ -770,6 +775,42 @@ echo "Name Company Street City State ZIP Phone"
echo "---- ------- ------ ---- ----- --- -----"
: append row
echo "$Name $Company $Street $City $State $ZIP $Phone"
## mask draws the form itself (fields, buttons, frame) and writes the row as a table on stdout.
## It needs a terminal, so here only the picture of the form and its fields (-s) is shown.
## Try it: mask -b < maskform mask < maskform | append -h t
$ cat maskform
Mail List Entry
Name : <Name:24>
Company: <Company:24>
Street : <Street:24>
City : <City:16> State: <State:10> ZIP: <ZIP:9>
Phone : <Phone:16>
[ Save ] [ Cancel ]
$ mask -s -b < maskform
┌──────────────────────────────────────────────────────────────┐
│ Mail List Entry │
│ │
│ Name : ________________________ │
│ Company: ________________________ │
│ Street : ________________________ │
│ City : ________________ State: __________ ZIP: _________ │
│ Phone : ________________ │
│ │
│ [ Save ] [ Cancel ] │
└──────────────────────────────────────────────────────────────┘
Fields:
Name row 4 col 12 width 24
Company row 5 col 12 width 24
Street row 6 col 12 width 24
City row 7 col 12 width 16
State row 7 col 37 width 10
ZIP row 7 col 54 width 9
Phone row 8 col 12 width 16
[Save] row 10 col 6
[Cancel] row 10 col 17 (cancels)
## reportwriter: a sample report with page headings (the date is cut out)
$ reportwriter -3 Prices < inventory | grep -v 'Report Date'
Prices
@@ -804,9 +845,9 @@ Item Amount Cost Value Description
## tabletom4 / tabletosed / tabletostruct were shown above
## ===== Help and the terminal =====
$ rdb --version
rdb 0.3.0
rdb 0.4.0
$ howmany
134
135
$ whatis row
row - make a new table where rows match logical condition
row row 'column condition column-or-value ..' < table