packages feed

tinytools-vty-0.1.0.3: README.md

# tinytools-vty

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

This repository contains the [reflex-vty](https://hackage.haskell.org/package/reflex-vty) based view/controller implementation built on top of the [tinytools](https://github.com/pdlla/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`

# 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, however sometimes they get captured by the OS or the terminal and never sent into the executable :(.

# 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](https://hackage.haskell.org/package/vty) for more info.

# tutorial

```
             ╔══════════════════════════════╗                                                                                                                 
             β•‘                              β•‘ β•”IMPORTANT#########################β•—                                                                            
   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ                      β•š>#to explore the canvas, click the  #                                                                            
   β–ˆTHIS IS TINYTOOLSβ–ˆβ•β•—                      #[(p)an] button or press p         #                                                                            
   β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β•‘                      #                                  #                                                                            
                       v                      #then click and drag in the canvas #                                                                            
   <═══╗   ╔══════════════════════╗           #area to move your view            #                                                                            
       β•‘   β•‘the menu on the left  β•‘           #                                  #                                                                            
       β•šβ•β•β•β•‘has a lot of important║═══╗       #                                  #                                                                            
           β•‘operations            β•‘   β•‘       β•š##################################╝                                                                            
           β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•   β•‘                        ^                                                                                              
                      β•‘               β•‘                        β•‘                                                                                              
                      v               β•‘                        β•‘                                                                                              
        ╔═══════════════════════════╗ β•‘                        β•‘                                                                                              
        β•‘to draw a box, click the   β•‘ β•‘                        β•‘                                                                                              
        β•‘[(b)ox] button or press b  β•‘ β•‘                        β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•—                                                                         
        β•‘                           β•‘ β•‘                                             β•‘                                                                         
        β•‘then click and drag in the β•‘ β•‘                                             β•‘                                                                         
        β•‘canvas area                β•‘ β•‘                        *------------------* β•‘                                                                         
        β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β• β•‘                        |this area (to the | β•‘                                                                         
                             β•‘        β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•>|right) is called  |═╝                                                                         
                             β•‘                                 |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!         β•‘                                                                         
            β•‘                                 β•‘     β•‘                               β•‘                                                                         
            β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•     β•‘                               β•‘                                                                         
                                                    β•‘                               β•‘                                                                         
                                                    β•‘                               β•‘                                                                         
                                                    β•‘                               β•‘                                                                         
                                                    β•‘                               β•‘                                                                         
                                                    β•‘                               β•‘                                                                         
                                                    β•‘                               β•‘                                                                         
                                                    β•‘                               β•‘                                                                         
                                                    β•‘                               β•‘                                                                         
                                                    β•‘                               β•‘                                                                         
                                                    β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•                                                                         

```