▄▄▄▄▄▄▄▖ ▗█▛
▗▄▟██████████ ▄█▛
▄▟███▀▘ ▀▀▀▘ ▄ ▟█▛
▗▟██▀ ██ ▟█▛
▟██ ▝▀ ▟█▛
▜███▄▄▖ ▗▄▄▄▄ ▄▄▖ ▄▄▄ ▄▖ ▟██▄▄▄▖ ▄▄▄▄
▝▀██████▙▄ ▄███▀███ ▟█▛▟███▛ ██ ▟███▀▀██ ▄██▛▜█▛
▀▀▀███▋ ▟██ ▝██ ▟███▀▗██ ▗██ ▗█▛ ▗█▛ ▟█▛▘
▄██▌ ▟█▘ ▟███▘ ▝▀ ▗██▘ ▗██ ██▘ ████▛
▗▖ ▄▟██▀ ▐█▌ ▗▟██▘ ▗██▘ ▟█▘ ▄█▛ ▄█▛▀ ▗▄
███▄▄▄▄██████▘ ▝█▙▄ ▗▄▄▟███▘ ██▌▗▄███▗▄██▀ ▐█▙ ▗▄██▀
▝▀██████▀▀▘ ▝████▀▀▘▀▀ ▝███▀▘▀██▀▀ ▀████▀▀
Terminal UI DSL.
Check that Swift 5.9 or greater is installed if not see installing Swift
swift -v
git clone https://github.com/zaneenders/Scribe
cd Scribe
swift run -c release
f key - Up j key - Down d key - Left k key - Right
This is kinda janky and really more of a proof of concept at this point.
With its default demo
configuration. Here is the list of instructions to move through the graph.
- d
- j
- j
- j
- d
- k
- f
- f
- f
- f
- k
After this You can kinda see how to movement might work. Unfortunately its pretty janky and doesn't work a 100% the way I want to. It also may leave some blocks un reachable depending on how you customize it.
You can press ctrl-j
on any of the selected blocks to send and action command which will increment the counter or toggle a state.
Taking a look at the Demo.swift file this is where the DSL will expand. The idea of having a safe APi layer between the janky code making this work and the language describing it. So hopefully I can only make improvements and not break much from this core idea.
Creates Docker Image from Dockerfile
docker build -t scribe_image .
Build and run container from docker image scribe_image
docker run --name scribe_container -it scribe_image
command to start container once built
docker start -i scribe_container
Below is snap shot of my personal use of this library. I have had added a system clock, a mechanism for running processes and updating the UI with there status. Currently I am working on swapping to different pages/screens but have to change how movement works first. See the list below for other ideas and upcoming features.
Ya a proof of concept of a DSL, movement and rendering all connected to the same graph. Besides the obvious goal of making it work better next goals are rendering text from files and moving around the contents of file and eventually editing it. Hopefully then having the basis for a text editor tool kit 🤷♂️.
I don't know if this is obvious or not but the buttons should be able to run any function so can run pretty much any code from there and update the screen based on changing the state variables you define. This isn't fully finished like everything else.
Traversing up, down, left, right and then up/out and down/in the graph. Everything on the screen and kinda be group together in blocks and that forms a sorta of tree like hierarchy that I want to move around.
I don't know how useful this will be, but I think it would be pretty cool as a demo.
Would also be nice to get real graphics or cheat and use a web browser. Honestly anything higher def and more of a canvas to draw with then the terminal.
Currently Scribe relies on unix terminal apis and putting the terminal into "raw mode". But I think adding PowerShell won't be too hard.