mirror of
https://codeberg.org/scip/tablizer.git
synced 2025-12-18 21:11:03 +01:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f830cc6256 | |||
| 7e01d54b08 | |||
| 487ba6253d | |||
| 745d15b459 |
159
CHANGELOG.md
Normal file
159
CHANGELOG.md
Normal file
@@ -0,0 +1,159 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org).
|
||||
|
||||
## [v1.0.9](https://github.com/TLINDEN/tablizer/tree/v1.0.9) - 2022-10-14
|
||||
|
||||
[Full Changelog](https://github.com/TLINDEN/tablizer/compare/v1.0.8...v1.0.9)
|
||||
|
||||
### Added
|
||||
|
||||
- Added Changelog, Contribution guidelines and no COC.
|
||||
|
||||
### Changed
|
||||
|
||||
- some minor changes to satisfy linter.
|
||||
|
||||
|
||||
|
||||
## [v1.0.8](https://github.com/TLINDEN/tablizer/tree/v1.0.8) - 2022-10-13
|
||||
|
||||
[Full Changelog](https://github.com/TLINDEN/tablizer/compare/v1.0.7...v1.0.8)
|
||||
|
||||
### Added
|
||||
|
||||
- Added sort support with the new parameter -k (like sort(1).
|
||||
|
||||
|
||||
|
||||
## [v1.0.7](https://github.com/TLINDEN/tablizer/tree/v1.0.7) - 2022-10-11
|
||||
|
||||
[Full Changelog](https://github.com/TLINDEN/tablizer/compare/v1.0.6...v1.0.7)
|
||||
|
||||
### Added
|
||||
|
||||
- Added pattern highlighting support.
|
||||
|
||||
- Added more unit tests.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed extended more output in combination with -c.
|
||||
|
||||
- Fixed issue #4, the version string was missing.
|
||||
|
||||
|
||||
|
||||
## [v1.0.6](https://github.com/TLINDEN/tablizer/tree/v1.0.6) - 2022-10-05
|
||||
|
||||
[Full Changelog](https://github.com/TLINDEN/tablizer/compare/v1.0.5...v1.0.6)
|
||||
|
||||
### Added
|
||||
|
||||
- Added documentation about regexp syntax in the manpage.
|
||||
|
||||
- Added more unit tests.
|
||||
|
||||
### Changed
|
||||
|
||||
- Rewrote the input parser.
|
||||
|
||||
- Some more refactoring work has been done.
|
||||
|
||||
|
||||
|
||||
## [v1.0.5](https://github.com/TLINDEN/tablizer/tree/v1.0.5) - 2022-10-05
|
||||
|
||||
[Full Changelog](https://github.com/TLINDEN/tablizer/compare/v1.0.4...v1.0.5)
|
||||
|
||||
### Added
|
||||
|
||||
- A new option has been added: --invert-match -v which behaves like
|
||||
the same option in grep(1): it inverts the pattern match.
|
||||
|
||||
- A few more unit tests have been added.
|
||||
|
||||
### Fixed
|
||||
|
||||
- Pattern matching did not work, because the (new) help subcommand
|
||||
lead to cobra taking care of the first arg to the program
|
||||
(argv[1]). So now there's a new parameter -m which displays the
|
||||
manpage and no more subcommands.
|
||||
|
||||
|
||||
|
||||
## [v1.0.4](https://github.com/TLINDEN/tablizer/tree/v1.0.4) - 2022-10-04
|
||||
|
||||
[Full Changelog](https://github.com/TLINDEN/tablizer/compare/v1.0.3...v1.0.4)
|
||||
|
||||
### Added
|
||||
|
||||
- Development version of the compiled binary now uses git vars
|
||||
in addition to program version.
|
||||
|
||||
- Added an option to display the manual page (compiled in) as text:
|
||||
--help, for cases where a user just installed the binary.
|
||||
|
||||
### Changed
|
||||
|
||||
- Fixed go module namespace.
|
||||
|
||||
|
||||
|
||||
## [v1.0.3](https://github.com/TLINDEN/tablizer/tree/v1.0.3) - 2022-10-03
|
||||
|
||||
[Full Changelog](https://github.com/TLINDEN/tablizer/compare/v1.0.2...v1.0.3)
|
||||
|
||||
### Added
|
||||
|
||||
- Added a new output mode: shell mode, which allows the user
|
||||
to use the output in a shell eval loop to further process
|
||||
the data.
|
||||
|
||||
### Changed
|
||||
|
||||
- More refactoring work has been done.
|
||||
|
||||
|
||||
|
||||
## [v1.0.2](https://github.com/TLINDEN/tablizer/tree/v1.0.2) - 2022-10-02
|
||||
|
||||
[Full Changelog](https://github.com/TLINDEN/tablizer/compare/v1.0.1...v1.0.2)
|
||||
|
||||
### Added
|
||||
|
||||
- Added some basic unit tests.
|
||||
|
||||
### Changed
|
||||
|
||||
- Code has been refactored to be more efficient.
|
||||
|
||||
- Replaced table generation code with Tablewriter.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [v1.0.1](https://github.com/TLINDEN/tablizer/tree/v1.0.1) - 2022-09-30
|
||||
|
||||
[Full Changelog](https://github.com/TLINDEN/tablizer/compare/v1.0.0...v1.0.1)
|
||||
|
||||
### Added
|
||||
|
||||
- Added a unix manual page.
|
||||
|
||||
- Added release builder to Makefile
|
||||
|
||||
### Changed
|
||||
|
||||
- Various minor fixes.
|
||||
|
||||
|
||||
|
||||
## [v1.0.0](https://github.com/TLINDEN/tablizer/tree/v1.0.0) - 2022-09-28
|
||||
|
||||
[Full Changelog](https://github.com/TLINDEN/tablizer/compare/02a64a5c3fe4220df2c791ff1421d16ebd428c19...v1.0.0)
|
||||
|
||||
Initial release.
|
||||
111
CODE_OF_CONDUCT.md
Normal file
111
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,111 @@
|
||||
# No Code of Conduct
|
||||
|
||||
This project does **NOT** have a so called Code of Conduct, nor will
|
||||
it ever get one.
|
||||
|
||||
The reasons are somewhat complicated and I'll try my best to document
|
||||
them here.
|
||||
|
||||
Ethical codes or rules come along like laws. But how is ethical or
|
||||
moral behavior defined? And who defines which behavior is ethical and
|
||||
which is not? Certainly not me.
|
||||
|
||||
Unless you live in a dictatorship (and more than half of the
|
||||
population of planet earth do as of this writing), laws come into
|
||||
existence by democratic procedures. Laws cover almost every aspect of
|
||||
live in a society. Laws allow and forbid behavior and laws sanction
|
||||
infringements.
|
||||
|
||||
A software project like this one on the other hand is not a society.
|
||||
There are not enough people involved to form democratic
|
||||
structures. And there will always be a minority of users who have the
|
||||
right to commit or reject code. How could any maintainer of a software
|
||||
project dare to decree rules upon others? Actually, am I, the current
|
||||
maintainer of this very project authorized to do so?
|
||||
|
||||
I think the anser to this question clearly is NO.
|
||||
|
||||
The issue is being complicated by the fact, that open source
|
||||
development these days happens on planetary scale. And this planet
|
||||
houses hundreds if not thousands of different cultures, philosophies,
|
||||
ideologies and worldviews. The answer to many ethical questions will
|
||||
in most cases vague and nebulous.
|
||||
|
||||
Ones joke will always be another ones insult.
|
||||
|
||||
Then there is the problem of language. I myself am not an english
|
||||
native, but I publish everyting using the english language. I am able
|
||||
to communicate with most people in the open source community because
|
||||
of that. But I am certainly not able to understand everything and
|
||||
everyone. There might be nuances to a sentence I don't sense, there
|
||||
might be sarcastic connotations I don't understand or references to
|
||||
historical figures, events or traditions I don't know and never have
|
||||
heard of.
|
||||
|
||||
Juding over other peoples online behavior looks like a titanic task to
|
||||
me. It is just not my job to judge others. I am not legitimized or
|
||||
authorized to do so.
|
||||
|
||||
Another huge problem with ethical rules is that you need to outline
|
||||
and enforce sanctions on thos who violate the rules. But since I am
|
||||
not an elected authority how would I be able to do this? I don't
|
||||
know. And what happens if someone complains about myself? Shall I
|
||||
remove myself from my own project? Come on!
|
||||
|
||||
Last but not least there's the law. I am a german citizen and am
|
||||
living in relatively freedom. Unlike many other people living in
|
||||
democracies these days, I myself fought for this very freedom on the
|
||||
streets of Leipzig in 1989. I saw the tanks, the Stasi officers, I
|
||||
felt the fear. But the laws under I live today and which I have to
|
||||
adhere to, are only limited to the small speck on earth I am living on.
|
||||
|
||||
So, let's say someone in india says something insulting to some other
|
||||
developer in an issue. Of course german law does not apply to indian
|
||||
people. More, the insult might actually not be an insult in india. In
|
||||
the end, nothing would happen. Under normal circumstances, maintainers
|
||||
would delete the posting, ban the user or remove push privileges etc.
|
||||
|
||||
But then, is there a way for the offending user to defend himself? Of
|
||||
course not, since neither indian or german law alone applies. I cannot
|
||||
go to a german court and sue the guy and he cannot do the same in
|
||||
india. Or - we possibly could but the judges on both countries would
|
||||
just laugh and close the case.
|
||||
|
||||
And let's not even start talking about there undemocratic "comitees"
|
||||
many projects are forming to circumvent this problem.
|
||||
|
||||
That being said, I don't have the power nor the tools, nor the
|
||||
authority to enforce serious sanctions of any meaningful kind against
|
||||
others. Therefore I cannot outline any rules whatsoever.
|
||||
|
||||
## So, which are the ethical rules within this project then?
|
||||
|
||||
Well, there are none.
|
||||
|
||||
This project is about code, not society. It doesn't matter where you
|
||||
come from, how you look, how you think, what you believe, who your
|
||||
friends are, whay you said or did sometime in the past. I don't even
|
||||
care if you are a human being. You are an alien so bored that you need
|
||||
to submit code on github? Fine with me.
|
||||
|
||||
**The only thing I am interested here is Code and only Code.**
|
||||
|
||||
So if anyhing happens here I don't like or I am obliged by law to act
|
||||
on, I will decide on a case to case basis what to do. And
|
||||
unfortunately, since this is the nature of a github project, you
|
||||
cannot complain, object or protest. I am very sorry!
|
||||
|
||||
If you will, let's at least outline these:
|
||||
|
||||
- Please - just please - behave towards others as you'd expect others
|
||||
to behave towards yourself.
|
||||
|
||||
- Don't judge others for any reason.
|
||||
|
||||
- Only judge the code.
|
||||
|
||||
But these are not rules, only a friendly appeal to you as a developer
|
||||
and user.
|
||||
|
||||
|
||||
Thanks a lot!
|
||||
94
CONTRIBUTING.md
Normal file
94
CONTRIBUTING.md
Normal file
@@ -0,0 +1,94 @@
|
||||
## Project Goals
|
||||
|
||||
The goal of this project is to build a small tool which helps in day
|
||||
to day work with tabular output of various commandline programs. It
|
||||
should be small, fast and easy to understand. The idea is to replace
|
||||
multiline shell pipes using awk, sed and grep with just one
|
||||
binary.
|
||||
|
||||
There will be no GUI, no web interface, no public API of some sort, no
|
||||
builtin interpreter.
|
||||
|
||||
The programming language used for this project will always be
|
||||
[GOLANG](https://go.dev/) with the exception of the documentation
|
||||
([Perl POD](https://perldoc.perl.org/perlpod)) and the Makefile.
|
||||
|
||||
# Contributing
|
||||
|
||||
You can contribute to this project in various ways:
|
||||
|
||||
## Open an issue
|
||||
|
||||
If you encounter a problem or don't understand how the program works
|
||||
or if you think the documentation is unclear, please don't hesitate to
|
||||
open an issue.
|
||||
|
||||
Please add as much information about the case as possible, such as:
|
||||
|
||||
- Your environment (operating system etc)
|
||||
- tablizer version (`tablizer --version`)
|
||||
- Input data. Please replace sensitive information with mock data!
|
||||
- Actual program output.
|
||||
- Expected program output.
|
||||
- Error message - if any.
|
||||
|
||||
Be aware that I am working on this (and some other) project in my
|
||||
spare time which is scarce. Therefore please don't expect me to
|
||||
respond to your query within hours or even days. Be patient, but I
|
||||
WILL respond.
|
||||
|
||||
## Pull Requests
|
||||
|
||||
Code and documentation help is always much appreciated! Please follow
|
||||
thes guidelines to successfully contribute:
|
||||
|
||||
- Every pull request shall be based on latest `development`
|
||||
branch. `main` is only used for releases.
|
||||
|
||||
- Execute the unit tests before committing: `make test`. There shall
|
||||
be no errors.
|
||||
|
||||
- Strive to be backwards compatible so that users who are already
|
||||
using the program don't have to change their habits - unless it is
|
||||
really neccessary.
|
||||
|
||||
- Try to add a unit test for your addition.
|
||||
|
||||
- Don't ever change existing unit tests!
|
||||
|
||||
- Add a meaningful and comprehensive rationale about your contribution:
|
||||
- Why do you think it might be useful for others?
|
||||
- What did you actually change or add?
|
||||
- Is there an open issue which this PR fixes and if so, please link
|
||||
to that issue.
|
||||
|
||||
- [Re-]format your code with `gofmt -s`.
|
||||
|
||||
- Avoid unneccesary dependencies, especially for very small functions.
|
||||
|
||||
- **If** a new dependency is being added, it must be compatible with
|
||||
our [license agreement](LICENSE).
|
||||
|
||||
- You need to accept that the code or documentation you contribute
|
||||
will be redistributed under the terms of said license agreement. If
|
||||
your contribution is considerably large or if you contribute
|
||||
regularly, then feel free to add your name and if you want your
|
||||
email address to the *AUTHORS* section of the
|
||||
[manpage](tablizer.pod).
|
||||
|
||||
- Adhere to the above mentioned project goals.
|
||||
|
||||
- If you are unsure if your addition or change will be accepted,
|
||||
better ask before starting coding. Open an issue about your proposal
|
||||
and let's discuss it! That way we avoid doing unnessesary work on
|
||||
both sides.
|
||||
|
||||
Each pull request will be carefully reviewed and if it is a useful
|
||||
addition it will be accepted. However, please be prepared that
|
||||
sometimes a PR will be rejected. The reasons may vary and will be
|
||||
documented. Perhaps the above guidelines are not matched, or the
|
||||
addition seems to be not so useful from my perspective, maybe there
|
||||
are too much changes or there might be changes I don't even
|
||||
understand.
|
||||
|
||||
But whatever happens: your contribution is always welcome!
|
||||
1
Makefile
1
Makefile
@@ -36,6 +36,7 @@ all: $(tool).1 cmd/$(tool).go buildlocal
|
||||
|
||||
cmd/%.go: %.pod
|
||||
echo "package cmd" > cmd/$*.go
|
||||
echo >> cmd/$*.go
|
||||
echo "var manpage = \`" >> cmd/$*.go
|
||||
pod2text $*.pod >> cmd/$*.go
|
||||
echo "\`" >> cmd/$*.go
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
[](https://github.com/tlinden/tablizer/actions)
|
||||
[](https://github.com/tlinden/tablizer/blob/master/LICENSE)
|
||||
[](https://goreportcard.com/report/github.com/tlinden/tablizer)
|
||||
|
||||
## tablizer - Manipulate tabular output of other programs
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package cmd
|
||||
|
||||
var manpage = `
|
||||
NAME
|
||||
tablizer - Manipulate tabular output of other programs
|
||||
@@ -37,7 +38,7 @@ DESCRIPTION
|
||||
|
||||
You can use tablizer to do these and more things.
|
||||
|
||||
tablizer analyses the header fiels of a table, registers the column
|
||||
tablizer analyses the header fields of a table, registers the column
|
||||
positions of each header field and separates columns by those positions.
|
||||
|
||||
Without any options it reads its input from "STDIN", but you can also
|
||||
@@ -79,7 +80,7 @@ DESCRIPTION
|
||||
(as in GNU sort(1)). The default sort column is the first one. To
|
||||
disable sorting at all, supply 0 (Zero) to -k.
|
||||
|
||||
Finally the -d option enables debugging output which is mostly usefull
|
||||
Finally the -d option enables debugging output which is mostly useful
|
||||
for the developer.
|
||||
|
||||
PATTERNS
|
||||
@@ -102,14 +103,14 @@ DESCRIPTION
|
||||
|
||||
"i" ignore case "m" multiline mode "s" single line mode
|
||||
|
||||
Example for a case insensitve search:
|
||||
Example for a case insensitive search:
|
||||
|
||||
kubectl get pods -A | tablizer "(?i)account"
|
||||
|
||||
OUTPUT MODES
|
||||
There might be cases when the tabular output of a program is way too
|
||||
large for your current terminal but you still need to see every column.
|
||||
In such cases the -o extended or -X option can be usefull which enables
|
||||
In such cases the -o extended or -X option can be useful which enables
|
||||
*extended mode*. In this mode, each row will be printed vertically,
|
||||
header left, value right, aligned by the field widths. Here's an
|
||||
example:
|
||||
|
||||
@@ -52,13 +52,13 @@ var (
|
||||
|
||||
// colors to be used per supported color mode
|
||||
Colors = map[color.Level]map[string]string{
|
||||
color.Level16: map[string]string{
|
||||
color.Level16: {
|
||||
"bg": "green", "fg": "black",
|
||||
},
|
||||
color.Level256: map[string]string{
|
||||
color.Level256: {
|
||||
"bg": "lightGreen", "fg": "black",
|
||||
},
|
||||
color.LevelRgb: map[string]string{
|
||||
color.LevelRgb: {
|
||||
// FIXME: maybe use something nicer
|
||||
"bg": "lightGreen", "fg": "black",
|
||||
},
|
||||
@@ -68,7 +68,7 @@ var (
|
||||
validOutputmodes = "(orgtbl|markdown|extended|ascii)"
|
||||
|
||||
// main program version
|
||||
Version = "v1.0.8"
|
||||
Version = "v1.0.9"
|
||||
|
||||
// generated version string, used by -v contains lib.Version on
|
||||
// main branch, and lib.Version-$branch-$lastcommit-$date on
|
||||
|
||||
@@ -87,7 +87,7 @@ func reduceColumns(data *Tabdata) {
|
||||
// exclude columns, if any
|
||||
if len(Columns) > 0 {
|
||||
reducedEntries := [][]string{}
|
||||
reducedEntry := []string{}
|
||||
var reducedEntry []string
|
||||
for _, entry := range data.entries {
|
||||
reducedEntry = nil
|
||||
for i, value := range entry {
|
||||
|
||||
@@ -79,15 +79,15 @@ func TestReduceColumns(t *testing.T) {
|
||||
columns []int
|
||||
}{
|
||||
{
|
||||
expect: [][]string{[]string{"a", "b"}},
|
||||
expect: [][]string{{"a", "b"}},
|
||||
columns: []int{1, 2},
|
||||
},
|
||||
{
|
||||
expect: [][]string{[]string{"a", "c"}},
|
||||
expect: [][]string{{"a", "c"}},
|
||||
columns: []int{1, 3},
|
||||
},
|
||||
{
|
||||
expect: [][]string{[]string{"a"}},
|
||||
expect: [][]string{{"a"}},
|
||||
columns: []int{1},
|
||||
},
|
||||
{
|
||||
@@ -96,7 +96,7 @@ func TestReduceColumns(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
input := [][]string{[]string{"a", "b", "c"}}
|
||||
input := [][]string{{"a", "b", "c"}}
|
||||
|
||||
Columns = "y" // used as a flag with len(Columns)...
|
||||
|
||||
|
||||
@@ -35,10 +35,10 @@ func TestParser(t *testing.T) {
|
||||
"ONE", "TWO", "THREE",
|
||||
},
|
||||
entries: [][]string{
|
||||
[]string{
|
||||
{
|
||||
"asd", "igig", "cxxxncnc",
|
||||
},
|
||||
[]string{
|
||||
{
|
||||
"19191", "EDD 1", "X",
|
||||
},
|
||||
},
|
||||
@@ -69,7 +69,7 @@ func TestParserPatternmatching(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
entries: [][]string{
|
||||
[]string{
|
||||
{
|
||||
"asd", "igig", "cxxxncnc",
|
||||
},
|
||||
},
|
||||
@@ -78,7 +78,7 @@ func TestParserPatternmatching(t *testing.T) {
|
||||
},
|
||||
{
|
||||
entries: [][]string{
|
||||
[]string{
|
||||
{
|
||||
"19191", "EDD 1", "X",
|
||||
},
|
||||
},
|
||||
|
||||
@@ -52,10 +52,10 @@ func TestPrinter(t *testing.T) {
|
||||
"ONE", "TWO", "THREE",
|
||||
},
|
||||
entries: [][]string{
|
||||
[]string{
|
||||
{
|
||||
"asd", "igig", "cxxxncnc",
|
||||
},
|
||||
[]string{
|
||||
{
|
||||
"19191", "EDD 1", "X",
|
||||
},
|
||||
},
|
||||
@@ -100,7 +100,9 @@ THREE(3): X`,
|
||||
t.Run(testname, func(t *testing.T) {
|
||||
|
||||
OutputMode = mode
|
||||
data := startdata // we need to reset our mock data, since it's being modified in printData()
|
||||
// we need to reset our mock data, since it's being
|
||||
// modified in printData()
|
||||
data := startdata
|
||||
printData(&data)
|
||||
|
||||
buf := make([]byte, 1024)
|
||||
@@ -136,13 +138,13 @@ func TestSortPrinter(t *testing.T) {
|
||||
"ONE", "TWO", "THREE",
|
||||
},
|
||||
entries: [][]string{
|
||||
[]string{
|
||||
{
|
||||
"abc", "345", "b1",
|
||||
},
|
||||
[]string{
|
||||
{
|
||||
"bcd", "234", "a2",
|
||||
},
|
||||
[]string{
|
||||
{
|
||||
"cde", "123", "c3",
|
||||
},
|
||||
},
|
||||
|
||||
12
tablizer.1
12
tablizer.1
@@ -133,7 +133,7 @@
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "TABLIZER 1"
|
||||
.TH TABLIZER 1 "2022-10-13" "1" "User Commands"
|
||||
.TH TABLIZER 1 "2022-10-14" "1" "User Commands"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -177,8 +177,8 @@ not easy to process.
|
||||
.PP
|
||||
You can use \fBtablizer\fR to do these and more things.
|
||||
.PP
|
||||
\&\fBtablizer\fR analyses the header fiels of a table, registers the column
|
||||
positions of each header field and separates columns by those
|
||||
\&\fBtablizer\fR analyses the header fields of a table, registers the
|
||||
column positions of each header field and separates columns by those
|
||||
positions.
|
||||
.PP
|
||||
Without any options it reads its input from \f(CW\*(C`STDIN\*(C'\fR, but you can also
|
||||
@@ -228,7 +228,7 @@ data (as in \s-1GNU\s0 \fBsort\fR\|(1)). The default sort column is the first on
|
||||
disable sorting at all, supply 0 (Zero) to \-k.
|
||||
.PP
|
||||
Finally the \fB\-d\fR option enables debugging output which is mostly
|
||||
usefull for the developer.
|
||||
useful for the developer.
|
||||
.SS "\s-1PATTERNS\s0"
|
||||
.IX Subsection "PATTERNS"
|
||||
You can reduce the rows being displayed by using a regular expression
|
||||
@@ -256,7 +256,7 @@ The most important modifiers are:
|
||||
\&\f(CW\*(C`m\*(C'\fR multiline mode
|
||||
\&\f(CW\*(C`s\*(C'\fR single line mode
|
||||
.PP
|
||||
Example for a case insensitve search:
|
||||
Example for a case insensitive search:
|
||||
.PP
|
||||
.Vb 1
|
||||
\& kubectl get pods \-A | tablizer "(?i)account"
|
||||
@@ -266,7 +266,7 @@ Example for a case insensitve search:
|
||||
There might be cases when the tabular output of a program is way too
|
||||
large for your current terminal but you still need to see every
|
||||
column. In such cases the \fB\-o extended\fR or \fB\-X\fR option can be
|
||||
usefull which enables \fIextended mode\fR. In this mode, each row will be
|
||||
useful which enables \fIextended mode\fR. In this mode, each row will be
|
||||
printed vertically, header left, value right, aligned by the field
|
||||
widths. Here's an example:
|
||||
.PP
|
||||
|
||||
10
tablizer.pod
10
tablizer.pod
@@ -39,8 +39,8 @@ not easy to process.
|
||||
|
||||
You can use B<tablizer> to do these and more things.
|
||||
|
||||
B<tablizer> analyses the header fiels of a table, registers the column
|
||||
positions of each header field and separates columns by those
|
||||
B<tablizer> analyses the header fields of a table, registers the
|
||||
column positions of each header field and separates columns by those
|
||||
positions.
|
||||
|
||||
Without any options it reads its input from C<STDIN>, but you can also
|
||||
@@ -84,7 +84,7 @@ data (as in GNU sort(1)). The default sort column is the first one. To
|
||||
disable sorting at all, supply 0 (Zero) to -k.
|
||||
|
||||
Finally the B<-d> option enables debugging output which is mostly
|
||||
usefull for the developer.
|
||||
useful for the developer.
|
||||
|
||||
=head2 PATTERNS
|
||||
|
||||
@@ -109,7 +109,7 @@ C<i> ignore case
|
||||
C<m> multiline mode
|
||||
C<s> single line mode
|
||||
|
||||
Example for a case insensitve search:
|
||||
Example for a case insensitive search:
|
||||
|
||||
kubectl get pods -A | tablizer "(?i)account"
|
||||
|
||||
@@ -119,7 +119,7 @@ Example for a case insensitve search:
|
||||
There might be cases when the tabular output of a program is way too
|
||||
large for your current terminal but you still need to see every
|
||||
column. In such cases the B<-o extended> or B<-X> option can be
|
||||
usefull which enables I<extended mode>. In this mode, each row will be
|
||||
useful which enables I<extended mode>. In this mode, each row will be
|
||||
printed vertically, header left, value right, aligned by the field
|
||||
widths. Here's an example:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user