crinklywrappr / rivendell

general purpose library that pushes elvish to its limits!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rivendell Logo

About

Rivendell adds useful functionality to elvish to take your shell to the next level!

  • 🌈 functional bits: high-level functions which encapsulate common design patterns.
  • πŸ’€ lazy iterators: transducer-inspired iterators which allow you to represent infinite sequences.
  • πŸ“ˆ visual aids: sparklines & histograms.
  • πŸ”§ plus a toolbelt of common utility functions which operate on strings, lists, and maps.

Documentation

How to install

It's a 3-step process.

  • Add these lines to your ~/.config/elvish/rc.elv
epm:install &silent-if-installed=$true github.com/crinklywrappr/rivendell
epm:upgrade github.com/crinklywrappr/rivendell
  • Request modules Γ  la carte.
use github.com/crinklywrappr/rivendell/test t
use github.com/crinklywrappr/rivendell/base b
use github.com/crinklywrappr/rivendell/fun f
use github.com/crinklywrappr/rivendell/lazy l
use github.com/crinklywrappr/rivendell/rune r
use github.com/crinklywrappr/rivendell/algo a
use github.com/crinklywrappr/rivendell/vis v
  • Do cool stuff!
# lazily graphing population data from the 2021 census

var file = (a:lines NST-EST2021-alldata.csv)

var f = {|line| s:split , $line | f:listify}

var popkeys = ($f (l:first $file))

l:drop 6 $file ^
| l:each (f:comp $f (f:partial $f:zipmap~ $popkeys) (f:juxt (f:k NAME) (f:k POPESTIMATE2021)) $f:listify~) ^
| l:take 20 ^
| l:blast ^
| v:barky &min=0

        Alabama β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
         Alaska β–ˆ
        Arizona β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
       Arkansas β–ˆβ–ˆβ–ˆβ–ˆ
     California β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
       Colorado β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
    Connecticut β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
       Delaware β–ˆ
District of Co… β–ˆ
        Florida β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
        Georgia β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
         Hawaii β–ˆβ–ˆ
          Idaho β–ˆβ–ˆβ–ˆ
       Illinois β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
        Indiana β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
           Iowa β–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
         Kansas β–ˆβ–ˆβ–ˆβ–ˆ
       Kentucky β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
      Louisiana β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ
          Maine β–ˆβ–ˆ

Documentation in the terminal

Command-line users are recommended to use glow.

Run the following command to browse the docs.

glow ~/.local/share/elvish/lib/github.com/crinklywrappr/rivendell/

Browsing downloaded documentation inside glow

Testing / Generating documentation

Tests are run and Markdown documentation is generated with this command.

use ./gendoc
gendoc:gendoc

It places documentation in a doc folder relative to your current directory. Because it is a destructive operation, it is advisable that users should run this in an empty directory.

I recommend glow for reading documentation at the terminal. It looks sexy.

documentation illustration

Articles

About

general purpose library that pushes elvish to its limits!

License:BSD 2-Clause "Simplified" License


Languages

Language:Elvish 100.0%