Project

prettyp

0.0
No commit activity in last 3 years
No release in over 3 years
Pretty Print using popular tools and many languages
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0
>= 0

Runtime

 Project Readme

Prettyp

One language formatter tool to rule them all.

Why?

I didn't like having to remember:

pbpaste | xmllint --format -
cat log.json | python -m json.tool

Why not just have a tool to do them all.

Installation

Install it yourself as:

$ gem install prettyp

Usage

$ echo '{"foo": "lorem", "bar": "ipsum"}' | prettyp format
{
    "bar": "ipsum",
    "foo": "lorem"
}
$ pbpaste | prettyp format
<?xml version="1.0" encoding="UTF-8"?>
<note>
  <to>Tove</to>
  <from>Jani</from>
  <heading>Reminder</heading>
  <body>Don't forget me this weekend!</body>
</note>
$ prettyp format --file test.json
{
    "bar": "ipsum",
    "foo": "lorem"
}

Alfred

Ensure bash/zsh profile is loaded. Copies from clipboard and back to clipboard

source ~/.zshrc
pbpaste | prettyp format | pbcopy

Contributing

  1. Fork it ( https://github.com/dekz/prettyp/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

TODO support ignoring the language classifier