summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-06-20 08:23:24 +0000
committerCoprDistGit <infra@openeuler.org>2023-06-20 08:23:24 +0000
commitd51cbb03ba64af5b85f2f154889911c3164ad881 (patch)
tree99887809a347890cfb9a7c079f1135860c1e8ec2
parent7ec2ee3c2c0c7ae1e73b08336b8376e439fd1dd9 (diff)
automatic import of python-pprintjsonopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-pprintjson.spec368
-rw-r--r--sources1
3 files changed, 370 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..44b2523 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pprintjson-1.4.2.tar.gz
diff --git a/python-pprintjson.spec b/python-pprintjson.spec
new file mode 100644
index 0000000..70e4e47
--- /dev/null
+++ b/python-pprintjson.spec
@@ -0,0 +1,368 @@
+%global _empty_manifest_terminate_build 0
+Name: python-pprintjson
+Version: 1.4.2
+Release: 1
+Summary: A json pretty printer for python
+License: MIT License
+URL: https://github.com/clarketm/pprintjson
+Source0: https://mirrors.aliyun.com/pypi/web/packages/81/66/94589d66848e879589e3082a3aeb38f64ea56d59668f9302a5e50d69e192/pprintjson-1.4.2.tar.gz
+BuildArch: noarch
+
+Requires: python3-pygments
+Requires: python3-simplejson
+
+%description
+# [pprintjson](https://pprintjson.readthedocs.io/en/latest/)
+
+[![PyPi release](https://img.shields.io/pypi/v/pprintjson.svg)](https://pypi.org/project/pprintjson/)
+[![PyPi versions](https://img.shields.io/pypi/pyversions/pprintjson.svg)](https://pypi.org/project/pprintjson/)
+[![Downloads](https://pepy.tech/badge/pprintjson)](https://pepy.tech/project/pprintjson)
+[![Documentation Status](https://readthedocs.org/projects/pprintjson/badge/?version=latest)](https://pprintjson.readthedocs.io/en/latest/?badge=latest)
+
+A json pretty printer for Python 🐍.
+
+[Check out the pprintjson docs](https://pprintjson.readthedocs.io/en/latest/)
+
+## Installation
+
+Install with the standard [`json`](https://docs.python.org/3/library/json.html) JSON encoder
+
+```bash
+$ pip install pprintjson
+```
+
+Install with the premier [`simplejson`](https://simplejson.readthedocs.io/en/latest/) JSON encoder
+```bash
+$ pip install pprintjson[simplejson]
+```
+
+## Usage
+
+```text
+
+usage: pprintjson.py [-h] [-i num] [-o file] [-c cmd] [-v] [file]
+
+A pretty-printing function for json.
+
+positional arguments:
+ file json <file> to pretty-print
+
+optional arguments:
+ -h, --help show this help message and exit
+ -i num, --indent num indent <num> number of spaces at each level (default: 4)
+ -o file, --output file write output to <file> instead of stdout (default: stdout)
+ -c cmd, --command cmd json <cmd> to pretty-print
+ -v, --version show program's version number and exit
+
+```
+
+### Script
+
+Pretty print JSON from a **file** using the `pprintjson` CLI.
+
+```bash
+$ pprintjson "./path/to/file.json"
+```
+
+Pretty print JSON from a **stdin** using the `pprintjson` CLI.
+
+```bash
+$ echo '{ "a": 1, "b": "string", "c": true }' | pprintjson
+```
+
+Pretty print JSON from a **string** using the `pprintjson` CLI.
+
+```bash
+$ pprintjson -c '{ "a": 1, "b": "string", "c": true }'
+```
+
+Pretty print JSON from a **string** with an *indent* of **1**.
+
+```bash
+$ pprintjson -c '{ "a": 1, "b": "string", "c": true }' -i 1
+```
+
+Pretty print JSON from a **string** and save *output* to a file **output.json**.
+
+```bash
+$ pprintjson -c '{ "a": 1, "b": "string", "c": true }' -o ./output.json
+```
+
+### Module
+
+Pretty print JSON from a **dict** using the `pprintjson` module.
+
+```python
+
+# 1. import the "pprintjson" function.
+from pprintjson import pprintjson as ppjson
+
+# 2. pretty print JSON.
+obj = { "a": 1, "b": "string", "c": True }
+
+ppjson(obj)
+```
+
+![stdout](https://raw.githubusercontent.com/clarketm/pprintjson/master/pprintjson.png)
+
+## License
+
+MIT &copy; [**Travis Clarke**](https://blog.travismclarke.com/)
+
+
+
+
+%package -n python3-pprintjson
+Summary: A json pretty printer for python
+Provides: python-pprintjson
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-pprintjson
+# [pprintjson](https://pprintjson.readthedocs.io/en/latest/)
+
+[![PyPi release](https://img.shields.io/pypi/v/pprintjson.svg)](https://pypi.org/project/pprintjson/)
+[![PyPi versions](https://img.shields.io/pypi/pyversions/pprintjson.svg)](https://pypi.org/project/pprintjson/)
+[![Downloads](https://pepy.tech/badge/pprintjson)](https://pepy.tech/project/pprintjson)
+[![Documentation Status](https://readthedocs.org/projects/pprintjson/badge/?version=latest)](https://pprintjson.readthedocs.io/en/latest/?badge=latest)
+
+A json pretty printer for Python 🐍.
+
+[Check out the pprintjson docs](https://pprintjson.readthedocs.io/en/latest/)
+
+## Installation
+
+Install with the standard [`json`](https://docs.python.org/3/library/json.html) JSON encoder
+
+```bash
+$ pip install pprintjson
+```
+
+Install with the premier [`simplejson`](https://simplejson.readthedocs.io/en/latest/) JSON encoder
+```bash
+$ pip install pprintjson[simplejson]
+```
+
+## Usage
+
+```text
+
+usage: pprintjson.py [-h] [-i num] [-o file] [-c cmd] [-v] [file]
+
+A pretty-printing function for json.
+
+positional arguments:
+ file json <file> to pretty-print
+
+optional arguments:
+ -h, --help show this help message and exit
+ -i num, --indent num indent <num> number of spaces at each level (default: 4)
+ -o file, --output file write output to <file> instead of stdout (default: stdout)
+ -c cmd, --command cmd json <cmd> to pretty-print
+ -v, --version show program's version number and exit
+
+```
+
+### Script
+
+Pretty print JSON from a **file** using the `pprintjson` CLI.
+
+```bash
+$ pprintjson "./path/to/file.json"
+```
+
+Pretty print JSON from a **stdin** using the `pprintjson` CLI.
+
+```bash
+$ echo '{ "a": 1, "b": "string", "c": true }' | pprintjson
+```
+
+Pretty print JSON from a **string** using the `pprintjson` CLI.
+
+```bash
+$ pprintjson -c '{ "a": 1, "b": "string", "c": true }'
+```
+
+Pretty print JSON from a **string** with an *indent* of **1**.
+
+```bash
+$ pprintjson -c '{ "a": 1, "b": "string", "c": true }' -i 1
+```
+
+Pretty print JSON from a **string** and save *output* to a file **output.json**.
+
+```bash
+$ pprintjson -c '{ "a": 1, "b": "string", "c": true }' -o ./output.json
+```
+
+### Module
+
+Pretty print JSON from a **dict** using the `pprintjson` module.
+
+```python
+
+# 1. import the "pprintjson" function.
+from pprintjson import pprintjson as ppjson
+
+# 2. pretty print JSON.
+obj = { "a": 1, "b": "string", "c": True }
+
+ppjson(obj)
+```
+
+![stdout](https://raw.githubusercontent.com/clarketm/pprintjson/master/pprintjson.png)
+
+## License
+
+MIT &copy; [**Travis Clarke**](https://blog.travismclarke.com/)
+
+
+
+
+%package help
+Summary: Development documents and examples for pprintjson
+Provides: python3-pprintjson-doc
+%description help
+# [pprintjson](https://pprintjson.readthedocs.io/en/latest/)
+
+[![PyPi release](https://img.shields.io/pypi/v/pprintjson.svg)](https://pypi.org/project/pprintjson/)
+[![PyPi versions](https://img.shields.io/pypi/pyversions/pprintjson.svg)](https://pypi.org/project/pprintjson/)
+[![Downloads](https://pepy.tech/badge/pprintjson)](https://pepy.tech/project/pprintjson)
+[![Documentation Status](https://readthedocs.org/projects/pprintjson/badge/?version=latest)](https://pprintjson.readthedocs.io/en/latest/?badge=latest)
+
+A json pretty printer for Python 🐍.
+
+[Check out the pprintjson docs](https://pprintjson.readthedocs.io/en/latest/)
+
+## Installation
+
+Install with the standard [`json`](https://docs.python.org/3/library/json.html) JSON encoder
+
+```bash
+$ pip install pprintjson
+```
+
+Install with the premier [`simplejson`](https://simplejson.readthedocs.io/en/latest/) JSON encoder
+```bash
+$ pip install pprintjson[simplejson]
+```
+
+## Usage
+
+```text
+
+usage: pprintjson.py [-h] [-i num] [-o file] [-c cmd] [-v] [file]
+
+A pretty-printing function for json.
+
+positional arguments:
+ file json <file> to pretty-print
+
+optional arguments:
+ -h, --help show this help message and exit
+ -i num, --indent num indent <num> number of spaces at each level (default: 4)
+ -o file, --output file write output to <file> instead of stdout (default: stdout)
+ -c cmd, --command cmd json <cmd> to pretty-print
+ -v, --version show program's version number and exit
+
+```
+
+### Script
+
+Pretty print JSON from a **file** using the `pprintjson` CLI.
+
+```bash
+$ pprintjson "./path/to/file.json"
+```
+
+Pretty print JSON from a **stdin** using the `pprintjson` CLI.
+
+```bash
+$ echo '{ "a": 1, "b": "string", "c": true }' | pprintjson
+```
+
+Pretty print JSON from a **string** using the `pprintjson` CLI.
+
+```bash
+$ pprintjson -c '{ "a": 1, "b": "string", "c": true }'
+```
+
+Pretty print JSON from a **string** with an *indent* of **1**.
+
+```bash
+$ pprintjson -c '{ "a": 1, "b": "string", "c": true }' -i 1
+```
+
+Pretty print JSON from a **string** and save *output* to a file **output.json**.
+
+```bash
+$ pprintjson -c '{ "a": 1, "b": "string", "c": true }' -o ./output.json
+```
+
+### Module
+
+Pretty print JSON from a **dict** using the `pprintjson` module.
+
+```python
+
+# 1. import the "pprintjson" function.
+from pprintjson import pprintjson as ppjson
+
+# 2. pretty print JSON.
+obj = { "a": 1, "b": "string", "c": True }
+
+ppjson(obj)
+```
+
+![stdout](https://raw.githubusercontent.com/clarketm/pprintjson/master/pprintjson.png)
+
+## License
+
+MIT &copy; [**Travis Clarke**](https://blog.travismclarke.com/)
+
+
+
+
+%prep
+%autosetup -n pprintjson-1.4.2
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-pprintjson -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 1.4.2-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..d97b7ad
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+c6e6b3c48a0283991fee03f698dd7fbd pprintjson-1.4.2.tar.gz