tinytools-vty: tinytools-vty is a terminal based monospace unicode diagram editing tool

[ bsd3, graphics, library, program, tinytools ] [ Propose Tags ]
Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.3, 0.1.0.4, 0.1.0.7
Change log ChangeLog.md
Dependencies aeson, aeson-pretty, ansi-terminal, base (>=4.7 && <5), bimap, bytestring, clock, constraints-extras, containers, data-default, dependent-map, dependent-sum, directory, extra, file-embed, filepath, http-conduit, ilist, lens, mtl, optparse-applicative, primitive, ref-tf, reflex (>=0.8 && <1), reflex-potatoes (>=0.1), reflex-test-host (>=0.1.2.2), reflex-vty (>=0.5.1), relude, semialign, template-haskell (>=2.18), text, these, time, tinytools (>=0.1.0.3), tinytools-vty, vty [details]
License BSD-3-Clause
Copyright 2023 minimaple (Peter Lu)
Author minimaple
Maintainer minimapletinytools@gmail.com
Category tinytools
Home page https://github.com/minimapletinytools/tinytools-vty#readme
Bug tracker https://github.com/minimapletinytools/tinytools-vty/issues
Source repo head: git clone https://github.com/minimapletinytools/tinytools-vty
Uploaded by minimaple at 2023-08-12T09:08:58Z
Distributions
Executables write-term-width, tinytools
Downloads 163 total (12 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-08-12 [all 1 reports]

Readme for tinytools-vty-0.1.0.4

[back to package description]

tinytools-vty

tinytools-vty is a mono-space unicode diagram editor written in Haskell

This repository contains the reflex-vty based view/controller implementation built on top of the tinytools model.

running

To install tiny tools run cabal install exe:tinytools and then run tinytools

Or if you are building locally then cabal run tinytools

NOTE that tinytools is also the name of the base model library for tinytools-vty which is why the exe is necessary. If you just cabal install tinytools you will install the library!

usage

When you first run tinytools a tutorial file will open which contains information on how to use tinytools-vty. This same tutorial is copied at the bottom of this README file. tinytools-vty has a very intuitive interface and most operations should be clear.

hotkeys are supported, unfortunately they seem to sometimes they get captured by the OS or the terminal and never get forwarded to the app :(.

tutorial

(open in the app instead for a better view, browser code preview doesn't render certain unicode characters in monospace correctly)


[new][open][save][save as]     *             ╔══════════════════════════════╗                                                                                            
[export to "potato.txt"][quit] *             ║                              ║ ╔IMPORTANT#########################╗                                                       
-------------------------------*   ███████████████████                      ╚>#to explore the canvas, click the  #                                                       
[(v)select][(p)an][(b)ox]      *   █THIS IS TINYTOOLS█═╗                      #[(p)an] button or press p         #                                                       
[(l)ine][(t)extbox][pai(n)t]   *   ███████████████████ ║                      #                                  #                                                       
-------------------------------*                       v                      #then click and drag in the canvas #                                                       
⇊ea 𐃛 starter                 #*   <═══╗   ╔══════════════════════╗           #area to move your view            #                                                       
  ea ⧈ info: more features    #*       ║   ║the menu on the left  ║           #                                  #                                                       
  ea ⤡ <line>                 #*       ╚═══║has a lot of important║═══╗       #                                  #                                                       
  ea ⤡ <line>                 #*           ║operations            ║   ║       ╚##################################╝                                                       
  ea ⤡ <line>                 #*           ╚══════════════════════╝   ║                        ^                                                                         
  ea ⧈ info: pan              #*                      ║               ║                        ║                                                                         
  ea ⤡ <line>                 #*                      v               ║                        ║                                                                         
  ea ⧈ info: box parameters   #*        ╔═══════════════════════════╗ ║                        ║                                                                         
  ea ⤡ <line>                 #*        ║to draw a box, click the   ║ ║                        ║                                                                         
  ea ⤡ <line>                 #*        ║[(b)ox] button or press b  ║ ║                        ╚════════════════════╗                                                    
  ea ⧈ info: canvas           #*        ║                           ║ ║                                             ║                                                    
  ea ⧈ info: box              #*        ║then click and drag in the ║ ║                                             ║                                                    
  ea ⧈ info: menu             #*        ║canvas area                ║ ║                        *------------------* ║                                                    
  ea ⤡ <line>                 #*        ╚═══════════════════════════╝ ║                        |this area (to the | ║                                                    
  ea ⤡ <line>                 #*                             ║        ╚═══════════════════════>|right) is called  |═╝                                                    
  ea ⧈ title                  #*                             ║                                 |the canvas        |                                                      
                              #*                             v                                 |                  |                                                      
                              #*            ╔═════════════════════════════════╗                |                  |                                                      
                              #*            ║after creating a box, it will be ║                |                  |                                                      
                              #*            ║selected, you can use the options║                *------------------*                                                      
                              #*            ║in the bottom right to change its║                                                                                          
                              #*      ╔═════║style. you can also convert your ║                                                                                          
                              #*  <═══╝     ║box into a text box or remove its║     ╔═══════════════════════════════╗                                                    
                              #*            ║border                           ║     ║of course there are many more  ║                                                    
                              #*            ║                                 ║     ║features, play around!         ║                                                    
                              #*            ║                                 ║     ║                               ║                                                    
                              #*            ╚═════════════════════════════════╝     ║                               ║                                                    
                              #*                                                    ║                               ║                                                    
                              #*                                                    ║                               ║                                                    
                              #*                                                    ║                               ║                                                    
                              #*                                                    ║                               ║                                                    
                              #*                                                    ║                               ║                                                    
                              #*                                                    ║                               ║                                                    
                              #*                                                    ║                               ║                                                    
                              #*                                                    ║                               ║                                                    
[new folder]                   *                                                    ║                               ║                                                    
-------------------------------*                                                    ╚═══════════════════════════════╝                                                    
canvas:                        *                                                                                                                                         
 width: 500                    *                                                                                                                                         
height: 200                    *                                                                                                                                         

enabling unicode widechar support

NOT WORKING, WILL CRASH RANDOMLY IF YOU USE UNICODE WIDE CHARS 😨 (this is due to bugs in TextZipper module that I still need to fix)

Unicode character display width seems to vary by terminal so you will need to generate a unicode width table file in order to enable support for unicode wide characters. You can run tinytools-vty with the --widthtable arg to generate the table to your local config directory for the current terminal. Generating the table samples each unicode character inside the terminal and takes a few seconds to run. Please see the Graphics.Vty.UnicodeWidthTable module of the vty for more info.