Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ashawley/scala-xml-pp

Scala XML pretty-printer command
https://github.com/ashawley/scala-xml-pp

scala scala-xml xml

Last synced: 5 days ago
JSON representation

Scala XML pretty-printer command

Awesome Lists containing this project

README

        

Scala XML pretty-printer command
================================

This is a command-line tool that uses `scala.xml.PrettyPrinter` to
format (_pretty-print_) and overwrite in-place XML files.

```
$ java -jar ~/Downloads/scala-xml-pp.jar
Error: Missing argument files...
Try --help for more information.

$ function scala-xml-pp() {
java -jar ~/Downloads/scala-xml-pp.jar "$@";
}

$ scala-xml-pp --help
scala-xml-pp 0.0
Usage: scala-xml-pp [options] files...

-w, --width Maximum width of N columns (default: 80)
-i, --indent Indent N spaces (default: 2)
--minimizeEmpty Minimize empty elements (default: false)
--help Output this help.
files... XML files to format.

$ scala-xml-pp -w 80 -i 2 books.xml
Formatted books.xml