RubyGems Navigation menu

tabelr 0.0.1

Tabler ====== Creates neat aligned ascii tables from a json input This is mainly useful on SQU query output from Sequel Pro app, which can save results as json. I'm sure there are a 100+ versions of this around, but I wrote this mainly for the challenge. Usage ----- ruby bin/tabelr test/example.json test/output.txt input ----- - The input must be a json formatted file - Which contains a hash - with one key named `data` - and one value containing an array of hashes - Each hash must contain the same number of same named keys, which this will use as the column headers E.g. (extract from `test/example.json`) { "data": [ { "column1": "This", "column2": "is", "column3": "quite", "column4": "cool!" }, { "column1": "This", "column2": "is the longest field", "column3": "by far", "column4": 1241 }, output ------ The output filename can be omitted, it will then default to the STDOUT terminal Given the file input above, the output will look like :- +---------+----------------------+---------+------------------+ | column1 | column2 | column3 | column4 | +---------+----------------------+---------+------------------+ | This | is | quite | cool! | | This | is the longest field | by far | 1241 | | Short | fields | fit | in | | other | eg | | 3322119999999999 | +---------+----------------------+---------+------------------+

Gemfile:
= In die Zwischenablage kopieren Kopiert!

installieren:
=

Versionen:

  1. 0.0.8 - August 07, 2012 (6,5 KB)
  2. 0.0.7 - May 01, 2012 (6 KB)
  3. 0.0.6 - April 26, 2012 (5,5 KB)
  4. 0.0.5 - April 26, 2012 (5,5 KB)
  5. 0.0.4 - April 26, 2012 (28 KB)
  6. 0.0.1 - April 26, 2012 (6 KB)
Zeige alle Versionen (8 total)

Besitzer:

Autoren:

  • Ian Vaughan

SHA 256-Prüfsumme:

f736bddfd6a1438f49b5e119caa4a1fd114a3c551953d3c6009c645e1a584681

Downloads insgesamt 24.543

Für diese Version 2.899

Lizenzen:

k.A.

Erforderliche Ruby-Version: >= 1.9

Links: