5 releases

0.0.6 Oct 12, 2024
0.0.5 Oct 11, 2024
0.0.4 Oct 4, 2024
0.0.3 Apr 17, 2024
0.0.0 Apr 12, 2024

#35 in Text editors

MIT/Apache

110KB
2K SLoC

dsntk | Decision Toolkit

Decision table editor

Crates.io MIT licensed Apache 2.0 licensed Contributor Covenant

Overview

Decision table editor.

Project status

Work in progress.

Installation

$ cargo install dte

Keystrokes

Key Action
CTRL + Q Quit without saving.
Arrow right Move cursor one character right
Arrow left Move cursor one character left
Arrow up Move cursor one row up
Arrow down Move cursor one row down
End Move cursor to the end of the current cell
Home Move cursor to the beginning of the current cell
PgUp Move cursor to the top row of the current cell
PgDown Move cursor to the bottom row of the current cell
CTRL + End Move cursor to the end of the current row
CTRL + Home Move cursor to the beginning of the current row
CTRL + PgUp Move cursor to the top row of the current column
CTRL + PgDown Move cursor to the bottom row of the current column
Backspace Delete character before the cursor
Delete Delete character under the cursor
Any character Insert character at the cursor position
Insert Toggle cursor from caret to block and back
ALT + Insert Toggle cursor from caret to underscore and back

Example decision table


 ┌─────────────────┐
 │  Order options  │
 ├───┬───────────┬─┴─────╥─────────────────────╥─────────────┬───────────┐
 │ U │           │       ║    Order options    ║             │           │
 │   │ Customer  │ Order ╟──────────┬──────────╢ Description │ Reference │
 │   │   type    │ size  ║ Discount │ Priority ║             │           │
 │   ├───────────┼───────╫──────────┼──────────╫─────────────┼───────────┤
 │   │"Business",│       ║          │"Normal", ║             │           │
 │   │"Private"  │       ║          │ "High",  ║             │           │
 │   │           │       ║          │ "Low"    ║             │           │
 ╞═══╪═══════════╪═══════╬══════════╪══════════╬═════════════╪═══════════╡
 │ 1 │"Business" │  <10  ║   0.10   │ "Normal" ║ Small order │   Ref 1   │
 ├───┼───────────┼───────╫──────────┼──────────╫─────────────┼───────────┤
 │ 2 │"Business" │ >=10  ║   0.15   │  "High"  ║ Large order │   Ref 2   │
 ├───┼───────────┼───────╫──────────┼──────────╫─────────────┼───────────┤
 │ 3 │"Private"  │   -   ║   0.05   │  "Low"   ║ All orders  │   Ref 3   │
 └───┴───────────┴───────╨──────────┴──────────╨─────────────┴───────────┘

Copy and save this decision table to any file, e.g. e.txt and run the editor:

$ dte e.txt

License

Licensed under either of

at your option.

Contribution

Any contributions to dte are greatly appreciated. All contributions intentionally submitted for inclusion in the work by you, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~3–12MB
~146K SLoC