All Projects → Guitarbum722 → Align

Guitarbum722 / Align

Licence: mit
A general purpose application and library for aligning text.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Align

Php Validate
Lightweight and feature-rich PHP validation and filtering library. Support scene grouping, pre-filtering, array checking, custom validators, custom messages. 轻量且功能丰富的PHP验证、过滤库。支持场景分组,前置过滤,数组检查,自定义验证器,自定义消息。
Stars: ✭ 225 (+257.14%)
Mutual labels:  library, tool
Motionia
Motionia is a lightweight simplified on demand animation library!
Stars: ✭ 294 (+366.67%)
Mutual labels:  library, tool
Behaviortree.js
An JavaScript implementation of Behavior Trees.
Stars: ✭ 228 (+261.9%)
Mutual labels:  library, tool
Phplrt
PHP Language Recognition Tool
Stars: ✭ 127 (+101.59%)
Mutual labels:  library, tool
Xspear
Powerfull XSS Scanning and Parameter analysis tool&gem
Stars: ✭ 583 (+825.4%)
Mutual labels:  library, tool
Android Rocket Launcher
🚀 Launch android modules from the terminal
Stars: ✭ 161 (+155.56%)
Mutual labels:  library, tool
Rex
Your RegEx companion.
Stars: ✭ 283 (+349.21%)
Mutual labels:  library, tool
Dublin Traceroute
Dublin Traceroute is a NAT-aware multipath tracerouting tool
Stars: ✭ 159 (+152.38%)
Mutual labels:  library, tool
Ferret
Declarative web scraping
Stars: ✭ 4,837 (+7577.78%)
Mutual labels:  library, tool
Alass
"Automatic Language-Agnostic Subtitle Synchronization"
Stars: ✭ 421 (+568.25%)
Mutual labels:  alignment, tool
Andes
Python toolbox / library for power system transient dynamics simulation with symbolic modeling and numerical analysis 🔥
Stars: ✭ 68 (+7.94%)
Mutual labels:  library, tool
Tabulate
Table Maker for Modern C++
Stars: ✭ 862 (+1268.25%)
Mutual labels:  alignment, library
Chroma
A general purpose syntax highlighter in pure Go
Stars: ✭ 3,013 (+4682.54%)
Mutual labels:  library, tool
Swaggen
OpenAPI/Swagger 3.0 Parser and Swift code generator
Stars: ✭ 385 (+511.11%)
Mutual labels:  library, formatter
Lambdacd
a library to define a continuous delivery pipeline in code
Stars: ✭ 655 (+939.68%)
Mutual labels:  library, tool
Depressurizer
A Steam library categorizing tool.
Stars: ✭ 1,008 (+1500%)
Mutual labels:  library, tool
Quantumgate
QuantumGate is a peer-to-peer (P2P) communications protocol, library and API written in C++.
Stars: ✭ 62 (-1.59%)
Mutual labels:  library
Cryptofin Solidity
A collection of Solidity libraries for building secure and gas-efficient smart contracts on Ethereum.
Stars: ✭ 62 (-1.59%)
Mutual labels:  library
Fsq
A tool for querying the file system with a SQL-like language.
Stars: ✭ 60 (-4.76%)
Mutual labels:  tool
New Empty Python Project Base
The Perfect Python Project Template. Bored of coding anew the same thing for your new Python projects? Here is what you need. Click below on the "use this template" green button to start using it instantly. Rename the "project" folder and all references to this folder to customize your project name.
Stars: ✭ 60 (-4.76%)
Mutual labels:  library

align

A general purpose application that aligns text

GoDoc Build Status Go Report Card Coverage Status

The focus of this application is to provide a fast, efficient, and useful tool for aligning text. Its creation is the result of inspiration from several other amazing alignment tools, namely column or the Sublime Text plugin AlignTab.

See the Wiki for usage examples!

Included

  • A simple yet useful CLI with options to specify your delimiter, input and output files, etc.
  • Align by any string as your delimiter or separator, not just a single character.
  • If your separator string is contained within the data itself, it can be escaped by specifying a text qualifier.
  • Right, Center, or Left justification of each field.

Why?

Sometimes, it's just easier to align a CSV (or delimited file) by its delimiter and view the columns in your plain text editor (which saves you from opening Excel!).

Another use is to align blocks of code by = or =>, etc.

Install

$ go get github.com/Guitarbum722/align
$ make install

$ # build all binaries
$ make release

Usage - CLI examples

Usage: align [-h] [-f] [-o] [-q] [-s] [-d] [-a] [-c] [-i] [-p]
Options:
  -h | --help  help
  -f           input file.  If not specified, pipe input to stdin
  -o           output file. (default: stdout)
  -q           text qualifier (if applicable)
  -s           delimiter (default: ',')
  -d           output delimiter (defaults to the value of sep)
  -a           <left>, <right>, <center> justification (default: left)
  -c           output specific fields (default: all fields)
  -i           override justification by column number (e.g. 2:center,5:right)
  -p           extra padding surrounding delimiter

Specify your input file, output file, delimiter. You can also pipe input to stdin (if the -f option is provided, it will take precedence over Stdin) If no -o option is provided, stdout will be used.

$ align -f input_file.csv -o output_file.csv

$ align -f input_file.csv -o 

$ cat awesome.csv | align

Do you have rows with a different number of fields? This might be more common with code, but align doesn't care!

$ echo "field1|field2\nValue1|Value2\nCoolValue1|CoolValue2|CoolValue3" | align -s \|
field1     | field2
Value1     | Value2
CoolValue1 | CoolValue2 | CoolValue3

Column filtering (specifiy output fields and optionally override the justification of the output fields). This might be useful if you would like to display a dollar amount or number field differently. The specified fields are indexed at 1.

# output fields 1,3,5 justified 'right'
$ cat file.csv | align -a right -c 1,3,5

# output fields 1,2,3,7,8 with default justification (left) except for field 7, which is right justified
$ cat file.csv | align -c 1,2,3,7,8 -i 1:right,7:center

#output all fields by default, with right justification, with overridden justification on certain columns
$ cat file.csv | align -a right -i 1:center,5:left

Support for worldwide characters.

first          , last              , middle  , email
paul           , danny             ,  かど    , や製油

It is perfectly acceptable to even use emojis as your input/output delimiters.

first  😮 last     😮 email
Hector 😮 Gonzalez 😮 [email protected]

Add additional padding if desired with the -p flag. Default is 1 space, and 0 will output with no additional padding. If the value supplied is less than 0, then the behavior will be as if it were set to 0 and no padding will be applied.

# padding of 4 spaces surrounding the delimiter.
align -p 4

Contributions

If you have suggestions or discover a bug, please open an issue. If you think you can make the fix, please use the Fork / Pull Request on your feature branch approach.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].