Skip to content

Commit

Permalink
Add description about the Evcxr support to the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbb committed Aug 25, 2019
1 parent 66b913f commit 1980557
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ keywords = ["tab", "table", "format", "pretty", "print"]
categories = ["command-line-interface"]
license = "BSD-3-Clause"
edition = "2018"
exclude = [
"prettytable-evcxr.png"
]

[badges]
appveyor = { repository = "phsym/prettytable-rs", branch = "master", service = "github" }
Expand All @@ -20,7 +23,7 @@ codecov = { repository = "phsym/prettytable-rs", branch = "master", service = "g

[features]
default = ["win_crlf", "csv"]
evcxr = []
evcxr = []
win_crlf = []

[[bin]]
Expand Down
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ A formatted and aligned table printer library for [Rust](https://www.rust-lang.o
* [Importing](#user-content-importing)
* [Exporting](#user-content-exporting)
* [Note on line endings](#user-content-note-on-line-endings)
* [Evcxr Integration](#evcxr-integration)

## Including

Expand Down Expand Up @@ -379,3 +380,19 @@ on any platform.
This customization capability will probably move to Formatting API in a future release.

Additional examples are provided in the documentation and in [examples](./examples/) directory.

## Evcxr Integration

[Evcxr][evcxr] is a Rust REPL and a [Jupyter notebook kernel][evcxr-jupyter].
This crate integrates into Evcxr and the Jupyter notebooks using the `evcxr` feature flag, which enables native displays of tables.
This includes support for displaying colors and various formattings.

You can include prettytable as a dependency using this line:
```
:dep prettytable = { git = "https://github.com/phsym/prettytable-rs", package = "prettytable-rs", features = ["evcxr"] }
```

![prettytable being used in a Jupyter notebook with Evcxr Rust kernel.](./prettytable-evcxr.png)

[evcxr]: https://github.com/google/evcxr/
[evcxr-jupyter]: https://github.com/google/evcxr/blob/master/evcxr_jupyter/README.md
Binary file added prettytable-evcxr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1980557

Please sign in to comment.