summaryrefslogtreecommitdiff
path: root/python-prettytable.spec
diff options
context:
space:
mode:
Diffstat (limited to 'python-prettytable.spec')
-rw-r--r--python-prettytable.spec125
1 files changed, 118 insertions, 7 deletions
diff --git a/python-prettytable.spec b/python-prettytable.spec
index 34e9c7c..3d69060 100644
--- a/python-prettytable.spec
+++ b/python-prettytable.spec
@@ -1,11 +1,11 @@
%global _empty_manifest_terminate_build 0
Name: python-prettytable
-Version: 3.6.0
+Version: 3.7.0
Release: 1
Summary: A simple Python library for easily displaying tabular data in a visually appealing ASCII table format
License: BSD (3 clause)
URL: https://github.com/jazzband/prettytable
-Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ba/b6/8e78337766d4c324ac22cb887ecc19487531f508dbf17d922b91492d55bb/prettytable-3.6.0.tar.gz
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/95/8d/f6b4448e386eb1382a99cbceabe3899f3aa431992582cc90496843548303/prettytable-3.7.0.tar.gz
BuildArch: noarch
Requires: python3-importlib-metadata
@@ -22,7 +22,7 @@ Requires: python3-pytest-lazy-fixture
[![Supported Python versions](https://img.shields.io/pypi/pyversions/prettytable.svg?logo=python&logoColor=FFE873)](https://pypi.org/project/prettytable/)
[![PyPI downloads](https://img.shields.io/pypi/dm/prettytable.svg)](https://pypistats.org/packages/prettytable)
[![GitHub Actions status](https://github.com/jazzband/prettytable/workflows/Test/badge.svg)](https://github.com/jazzband/prettytable/actions)
-[![codecov](https://codecov.io/gh/jazzband/prettytable/branch/master/graph/badge.svg)](https://codecov.io/gh/jazzband/prettytable)
+[![codecov](https://codecov.io/gh/jazzband/prettytable/branch/main/graph/badge.svg)](https://codecov.io/gh/jazzband/prettytable)
[![Code style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
PrettyTable lets you print tables in an attractive ASCII form:
@@ -387,6 +387,43 @@ relevant row, in the column specified by the `sort_by` argument. The remaining n
elements are the data in each of the table's columns, in order, including a repeated
instance of the data in the `sort_by` column.
+#### Adding sections to a table
+
+You can divide your table into different sections using the `divider` argument. This
+will add a dividing line into the table under the row who has this field set. So we can
+set up a table like this:
+
+```python
+x = PrettyTable()
+x.field_names = ["City name", "Area", "Population", "Annual Rainfall"]
+x.add_row(["Adelaide", 1295, 1158259, 600.5])
+x.add_row(["Brisbane", 5905, 1857594, 1146.4])
+x.add_row(["Darwin", 112, 120900, 1714.7])
+x.add_row(["Hobart", 1357, 205556, 619.5], divider=True)
+x.add_row(["Melbourne", 1566, 3806092, 646.9])
+x.add_row(["Perth", 5386, 1554769, 869.4])
+x.add_row(["Sydney", 2058, 4336374, 1214.8])
+```
+
+to get a table like this:
+
+```
++-----------+------+------------+-----------------+
+| City name | Area | Population | Annual Rainfall |
++-----------+------+------------+-----------------+
+| Adelaide | 1295 | 1158259 | 600.5 |
+| Brisbane | 5905 | 1857594 | 1146.4 |
+| Darwin | 112 | 120900 | 1714.7 |
+| Hobart | 1357 | 205556 | 619.5 |
++-----------+------+------------+-----------------+
+| Melbourne | 1566 | 3806092 | 646.9 |
+| Perth | 5386 | 1554769 | 869.4 |
+| Sydney | 2058 | 4336374 | 1214.8 |
++-----------+------+------------+-----------------+
+```
+
+Any added dividers will be removed if a table is sorted.
+
### Changing the appearance of your table - the easy way
By default, PrettyTable produces ASCII tables that look like the ones used in SQL
@@ -701,7 +738,7 @@ BuildRequires: python3-pip
[![Supported Python versions](https://img.shields.io/pypi/pyversions/prettytable.svg?logo=python&logoColor=FFE873)](https://pypi.org/project/prettytable/)
[![PyPI downloads](https://img.shields.io/pypi/dm/prettytable.svg)](https://pypistats.org/packages/prettytable)
[![GitHub Actions status](https://github.com/jazzband/prettytable/workflows/Test/badge.svg)](https://github.com/jazzband/prettytable/actions)
-[![codecov](https://codecov.io/gh/jazzband/prettytable/branch/master/graph/badge.svg)](https://codecov.io/gh/jazzband/prettytable)
+[![codecov](https://codecov.io/gh/jazzband/prettytable/branch/main/graph/badge.svg)](https://codecov.io/gh/jazzband/prettytable)
[![Code style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
PrettyTable lets you print tables in an attractive ASCII form:
@@ -1066,6 +1103,43 @@ relevant row, in the column specified by the `sort_by` argument. The remaining n
elements are the data in each of the table's columns, in order, including a repeated
instance of the data in the `sort_by` column.
+#### Adding sections to a table
+
+You can divide your table into different sections using the `divider` argument. This
+will add a dividing line into the table under the row who has this field set. So we can
+set up a table like this:
+
+```python
+x = PrettyTable()
+x.field_names = ["City name", "Area", "Population", "Annual Rainfall"]
+x.add_row(["Adelaide", 1295, 1158259, 600.5])
+x.add_row(["Brisbane", 5905, 1857594, 1146.4])
+x.add_row(["Darwin", 112, 120900, 1714.7])
+x.add_row(["Hobart", 1357, 205556, 619.5], divider=True)
+x.add_row(["Melbourne", 1566, 3806092, 646.9])
+x.add_row(["Perth", 5386, 1554769, 869.4])
+x.add_row(["Sydney", 2058, 4336374, 1214.8])
+```
+
+to get a table like this:
+
+```
++-----------+------+------------+-----------------+
+| City name | Area | Population | Annual Rainfall |
++-----------+------+------------+-----------------+
+| Adelaide | 1295 | 1158259 | 600.5 |
+| Brisbane | 5905 | 1857594 | 1146.4 |
+| Darwin | 112 | 120900 | 1714.7 |
+| Hobart | 1357 | 205556 | 619.5 |
++-----------+------+------------+-----------------+
+| Melbourne | 1566 | 3806092 | 646.9 |
+| Perth | 5386 | 1554769 | 869.4 |
+| Sydney | 2058 | 4336374 | 1214.8 |
++-----------+------+------------+-----------------+
+```
+
+Any added dividers will be removed if a table is sorted.
+
### Changing the appearance of your table - the easy way
By default, PrettyTable produces ASCII tables that look like the ones used in SQL
@@ -1377,7 +1451,7 @@ Provides: python3-prettytable-doc
[![Supported Python versions](https://img.shields.io/pypi/pyversions/prettytable.svg?logo=python&logoColor=FFE873)](https://pypi.org/project/prettytable/)
[![PyPI downloads](https://img.shields.io/pypi/dm/prettytable.svg)](https://pypistats.org/packages/prettytable)
[![GitHub Actions status](https://github.com/jazzband/prettytable/workflows/Test/badge.svg)](https://github.com/jazzband/prettytable/actions)
-[![codecov](https://codecov.io/gh/jazzband/prettytable/branch/master/graph/badge.svg)](https://codecov.io/gh/jazzband/prettytable)
+[![codecov](https://codecov.io/gh/jazzband/prettytable/branch/main/graph/badge.svg)](https://codecov.io/gh/jazzband/prettytable)
[![Code style: Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
PrettyTable lets you print tables in an attractive ASCII form:
@@ -1742,6 +1816,43 @@ relevant row, in the column specified by the `sort_by` argument. The remaining n
elements are the data in each of the table's columns, in order, including a repeated
instance of the data in the `sort_by` column.
+#### Adding sections to a table
+
+You can divide your table into different sections using the `divider` argument. This
+will add a dividing line into the table under the row who has this field set. So we can
+set up a table like this:
+
+```python
+x = PrettyTable()
+x.field_names = ["City name", "Area", "Population", "Annual Rainfall"]
+x.add_row(["Adelaide", 1295, 1158259, 600.5])
+x.add_row(["Brisbane", 5905, 1857594, 1146.4])
+x.add_row(["Darwin", 112, 120900, 1714.7])
+x.add_row(["Hobart", 1357, 205556, 619.5], divider=True)
+x.add_row(["Melbourne", 1566, 3806092, 646.9])
+x.add_row(["Perth", 5386, 1554769, 869.4])
+x.add_row(["Sydney", 2058, 4336374, 1214.8])
+```
+
+to get a table like this:
+
+```
++-----------+------+------------+-----------------+
+| City name | Area | Population | Annual Rainfall |
++-----------+------+------------+-----------------+
+| Adelaide | 1295 | 1158259 | 600.5 |
+| Brisbane | 5905 | 1857594 | 1146.4 |
+| Darwin | 112 | 120900 | 1714.7 |
+| Hobart | 1357 | 205556 | 619.5 |
++-----------+------+------------+-----------------+
+| Melbourne | 1566 | 3806092 | 646.9 |
+| Perth | 5386 | 1554769 | 869.4 |
+| Sydney | 2058 | 4336374 | 1214.8 |
++-----------+------+------------+-----------------+
+```
+
+Any added dividers will be removed if a table is sorted.
+
### Changing the appearance of your table - the easy way
By default, PrettyTable produces ASCII tables that look like the ones used in SQL
@@ -2043,7 +2154,7 @@ black prettytable*.py
%prep
-%autosetup -n prettytable-3.6.0
+%autosetup -n prettytable-3.7.0
%build
%py3_build
@@ -2083,5 +2194,5 @@ mv %{buildroot}/doclist.lst .
%{_docdir}/*
%changelog
-* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 3.6.0-1
+* Fri Apr 21 2023 Python_Bot <Python_Bot@openeuler.org> - 3.7.0-1
- Package Spec generated