Skip to content

Commit

Permalink
Update README and CHANGELOG.
Browse files Browse the repository at this point in the history
  • Loading branch information
greglook committed Oct 13, 2015
1 parent 64c6056 commit 9e0eb8c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 15 deletions.
14 changes: 12 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,18 @@ Release Notes

This page documents the high-level changes in each release of Puget.

## 0.9.0 (...)

## 0.9.0 (2015-10-13)

- Upgrade to Clojure 1.7 and fipp 0.6.2.
- Separate total-order comparator into
[mvxcvi/arrangement](https://github.com/greglook/clj-arrangement).
- Reordered args to `color/document` and `color/text`.
- Drop `puget.data/ExtendedNotation` protocol and switched to type-dispatched
print-handler approach.
- Rename `:sort-key` option to `:sort-mode`.
- Remove `:escape-types` functionality in favor of `:print-handlers`.
- Add more `:print-fallback` possibilities.
- Add `CanonicalPrinter` as a minimalist alternative to `PrettyPrinter`.

## 0.8.1 (2015-04-25)

Expand Down
32 changes: 19 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,25 @@ Leiningen, add the following dependency to your project definition:

See [Whidbey](https://github.com/greglook/whidbey) for nREPL and Leiningen integration.

## Usage

Puget's printing is controlled by a map of options which include print width,
sorting mode, color scheme and style, whether to print metadata, and so on. The
default options are held in the dynamic var `puget.printer/*options*`. This can
be bound with the `with-options` macro for convenience.

These options are used to construct a _printer_ object to render values with.
You can create these manually with `pretty-printer` or `canonical-printer`, then
use them with `render-out` or `render-str` for maximum control.

These options are used to construct a printer record, which is either the
`PrettyPrinter` or `CanonicalPrinter`. The printers can be used directly to
render values with `render-out` or `render-str` if maximal repeatability is
desired.

Otherwise, the `pprint` and `pprint-str` functions will automatically create a
`PrettyPrinter` using the dynamic options and any provided configuration.

## Syntax Coloring

Puget's first main feature is colorizing the printed data using ANSI escape
Expand Down Expand Up @@ -120,19 +139,6 @@ will throw an exception for types with no defined representation. Finally, a
function may be provided which will be passed the current printer and the
unknown value to render.

## Further Customization

Puget's printing is controlled by a map of options which include print width,
sorting mode, color scheme and style, whether to print metadata, etc. The
default options are held in the dynamic var `puget.printer/*options*`. This can
be bound with the `with-options` macro for convenience, or a map can be passed
directly into Puget's print functions to override the defaults.

These options are used to construct a printer record, which is either the
`PrettyPrinter` or `CanonicalPrinter`. The printers can be used directly to
render values with `render-out` or `render-str` if maximal repeatability is
desired.

## License

This is free and unencumbered software released into the public domain.
Expand Down

0 comments on commit 9e0eb8c

Please sign in to comment.