CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Fri, 05 Sep 2025 03:13:48 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20100106145316
location: https://web.archive.org/web/20100106145316/https://github.com/cloudhead/mutter
server-timing: captures_list;dur=0.916213, exclusion.robots;dur=0.037849, exclusion.robots.policy;dur=0.017006, esindex;dur=0.017174, cdx.remote;dur=24.025455, LoadShardBlock;dur=206.310410, PetaboxLoader3.datanode;dur=58.968235, PetaboxLoader3.resolve;dur=63.685063
x-app-server: wwwb-app218
x-ts: 302
x-tr: 265
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app218; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Fri, 05 Sep 2025 03:13:49 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Wed, 06 Jan 2010 14:53:16 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "15bf626a20a91452c1f1b570e4885279"
x-archive-orig-x-runtime: 166ms
x-archive-orig-content-length: 27690
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Wed, 06 Jan 2010 14:53:16 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Sat, 19 Sep 2009 16:05:06 GMT", ; rel="prev memento"; datetime="Mon, 05 Oct 2009 12:52:45 GMT", ; rel="memento"; datetime="Wed, 06 Jan 2010 14:53:16 GMT", ; rel="next memento"; datetime="Thu, 18 Feb 2010 20:55:49 GMT", ; rel="last memento"; datetime="Thu, 12 Oct 2023 21:19:00 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 51_13_20100106120225_crawl102-c/51_13_20100106145144_crawl101.arc.gz
server-timing: captures_list;dur=0.621628, exclusion.robots;dur=0.021670, exclusion.robots.policy;dur=0.010014, esindex;dur=0.014197, cdx.remote;dur=51.236242, LoadShardBlock;dur=309.033807, PetaboxLoader3.datanode;dur=111.666493, PetaboxLoader3.resolve;dur=296.639819, load_resource;dur=128.248412
x-app-server: wwwb-app218
x-ts: 200
x-tr: 553
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
cloudhead's mutter at master - GitHub
cloudhead / mutter
- Source
- Commits
- Network (3)
- Issues (0)
- Downloads (15)
- Wiki (1)
- Graphs
-
Branch:
master
mutter /
name | age | message | |
---|---|---|---|
![]() |
.document | Tue Jul 28 19:20:14 -0700 2009 | Initial commit to mumbler. [cloudhead] |
![]() |
.gitignore | Mon Aug 03 06:22:24 -0700 2009 | added .document [cloudhead] |
![]() |
LICENSE | Tue Jul 28 19:20:14 -0700 2009 | Initial commit to mumbler. [cloudhead] |
![]() |
README.md | Thu Oct 15 20:50:40 -0700 2009 | reformatted README a little, and removed footbote [cloudhead] |
![]() |
Rakefile | Wed Nov 25 13:06:24 -0800 2009 | bye bye rubyforge [cloudhead] |
![]() |
VERSION | Fri Nov 27 10:56:46 -0800 2009 | Version bump to 0.5.2 [cloudhead] |
![]() |
lib/ | Fri Nov 27 10:56:31 -0800 2009 | moved ext to mutter/ext [cloudhead] |
![]() |
mutter.gemspec | Fri Nov 27 10:56:49 -0800 2009 | Regenerated gemspec for version 0.5.2 [cloudhead] |
![]() |
spec/ | Sun Nov 08 14:13:12 -0800 2009 | better color support detection | if color is no... [cloudhead] |
README.md
mutter
$ my words come out,
in color and
style
mutter takes the concepts of separation of style & content to the command-line!
setup
$ sudo gem install mutter -s https://gemcutter.org
synopsis
require 'mutter'
mut = Mutter.new # creates a new 'Mutterer', who talks in command-line language
mut.say "hello _world_" # underlines 'world'
mut.say "hello world", :bold # bolds the whole string
mut.say "hello [world]", :cyan # inverts 'world', and colors the string cyan
mut.print "bonjour!" # alias of `say`
mut["_hola_"] # return the stylized string without printing, alias of #process
Tables
Define your table structure, arguments are optional.
table = Mutter::Table.new(:delimiter => '|') do # Strings which don't fit the column width will be truncated
column :width => 15, :style => :green # with '..' by default, you can change that with the :truncater
column :style => :yellow # option.
column :width => 15, :align => :right
end
Add some rows
table << ["gaspar", "morello", 1976]
table << ["eddie", "vedder", 1964]
table << ["david", "bowie", 1947]
Print.
print table.to_s
If you want something barebones, you can also do
t = Mutter::Table.new
t.rows = (1..10).map {|n| [n, n **2, n **3] }
t.print
And it'll make sure everything is aligned nicely
styles
mutter supports these styles:
:bold, :underline, :inverse, :blink
and these colors:
:red, :green, :blue, :yellow, :cyan, :purple, :white, :black
customization
styles = {
:warning => { # an alias you can use anywhere in mutter
:match => ['*!', '!*'], # will match *!mutter!*
:style => ['yellow', 'bold'] # these styles will be applied to the match
},
:error => {
:match => '!!', # will match !!mutter!!
:style => ['red', 'underline']
}
}
mut = Mutter.new(styles)
mut.say "warning, the dogs have escaped!", :warning # These two are
mut.warning "warning, the dogs have escaped!" # equivalent
mut.say "gosh, we have an !!error!!"
YAML
The previous example could have (and should really have) been written in a separate .yml file, like so:
warning:
match:
- '*!'
- '!*
style:
- yellow
- bold
error:
match: '!!'
style:
- red
- underline
and then loaded like this:
Mutter.new("styles.yml")
quick styles
mut = Mutter.new :yellow => '~'
mut.say "~[black on yellow!]~"
add/remove styles from an instance
mut = Mutter.new(:blink)
mut >> :blink # remove :blink
mut << :bold << :underline # add :bold and :underline
mut.say "hello mutter." # bold and underlined
That's it!
have fun
This feature is coming soon. Sit tight!