jazzband / jazzband/tablib

Plain text / Terminal formatter

Open
#317 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
4.8k
Forks
617
PR merge metrics
No merged PRs in 30d

Description

I thought I would open an issue to gauge interest in a terminal / plain text formatter. This possible formatter would print or read data from space padded plain text.

```python
import tablib

data = tablib.Dataset()
data.headers = ('first_name', 'last_name')
data.append(('John', 'Adams'))
data.append(('George', 'Washington'))
print data.export('txt')
# first_name last_name
# John Adams
# George Washington
```

If you think this is useful and fits with the philosophy of the project, I could put together a PR.

There are definitely some differences between this and some of the other formatters including:

- how wide should it print by default?
- if the data is wider than the width, there will be data truncation
- this can't really losslessly handle (outputting and then reading a dataset will result in differences) data with spaces at the beginning or end

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.