uxy

UXY: Adding structure to the UNIX tools

  • Owner: sustrik/uxy
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

UXY: Adding structure to the UNIX tools

Treating everything as a string is the way through which the great power and
versatility of UNIX tools is achieved. However, sometimes the constant
parsing of strings gets a bit cumbersome.

UXY is a tool to manipulate UXY format, which is
basically a two-dimensional table that's both human- and machine-readable.

The format is deliberately designed to be as similar to the output of
standard tools, such as ls or ps, as possible.

UXY tool also wraps some common UNIX tools and exports their output in
UXY format. Along with converters from/to other common data formats
(e.g. JSON) it is meant to allow for quick and painless access to the data.

Examples

TOOLS

UXY tools

All UXY tools take input from stdin and write the result to stdout.

The tools follow the Postel's principle: "Be liberal in what you accept,
conservative in what you output." They accept any UXY input, but
they try to align the fields in the output to make it more convenient to read.

Wrapped UNIX tools

Any argument that could be passed to the original tool can also be passed to
the UXY-wrapped version of the tool.

The exception are the arguments that modify how the output looks like. UXY
manages those arguments itself. The only control you have over the output is
to either print the default (short) set of result fields (mostly defined
as "the most useful info that fits on page") or long set of result fields
("all the information UXY was able to extract"):

When running with -l option it often happens that the output exceeds the
terminal width, gets wrapped and unreadable. In such cases you can either
filter out just the fields you are intersed in using fmt subcommand or
convert the result to YAML (uxy to-yaml) which happens to render each field
on a separate line:

TESTING

To test, run ./test script.

Build Status

Main metrics

Overview
Name With Ownersustrik/uxy
Primary LanguagePython
Program languagePython (Language Count: 2)
Platform
License:MIT License
所有者活动
Created At2019-05-18 08:14:22
Pushed At2023-07-22 06:02:10
Last Commit At2019-07-12 11:13:02
Release Count0
用户参与
Stargazers Count704
Watchers Count9
Fork Count12
Commits Count198
Has Issues Enabled
Issues Count9
Issue Open Count5
Pull Requests Count5
Pull Requests Open Count2
Pull Requests Close Count1
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private