Skip to content

Commit b518d5c

Browse files
committed
Convert README.md from reST to MD.
1 parent efb47a6 commit b518d5c

1 file changed

Lines changed: 57 additions & 70 deletions

File tree

README.md

Lines changed: 57 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,108 +1,95 @@
1-
sphinxcontrib-httpexample
2-
=========================
1+
# sphinxcontrib-httpexample
32

4-
.. image:: https://github.com/collective/sphinxcontrib-httpexample/actions/workflows/build.yml/badge.svg?branch=master
5-
:target: https://github.com/collective/sphinxcontrib-httpexample/actions
3+
<img alt="GitHub Actions" src="https://github.com/collective/sphinxcontrib-httpexample/actions/workflows/build.yml/badge.svg?branch=master" href="https://github.com/collective/sphinxcontrib-httpexample/actions">
4+
<img alt="Coverage" src="https://coveralls.io/repos/github/collective/sphinxcontrib-httpexample/badge.svg?branch=master" href="https://coveralls.io/github/collective/sphinxcontrib-httpexample?branch=master">
5+
<img alt="PyPI package" src="https://badge.fury.io/py/sphinxcontrib-httpexample.svg" href="https://badge.fury.io/py/sphinxcontrib-httpexample">
6+
<img alt="Documentation" src="https://readthedocs.org/projects/sphinxcontrib-httpexample/badge/?version=latest" href="http://sphinxcontrib-httpexample.readthedocs.io/en/latest">
67

7-
.. image:: https://coveralls.io/repos/github/collective/sphinxcontrib-httpexample/badge.svg?branch=master
8-
:target: https://coveralls.io/github/collective/sphinxcontrib-httpexample?branch=master
8+
sphinxcontrib-httpexample enhances [`sphinxcontrib-httpdomain`](https://pythonhosted.org/sphinxcontrib-httpdomain/), a Sphinx domain extension for describing RESTful HTTP APIs in detail, with a simple call example directive. The new directive provided by this extension generates RESTful HTTP API call examples for different tools from a single HTTP request example.
99

10-
.. image:: https://badge.fury.io/py/sphinxcontrib-httpexample.svg
11-
:target: https://badge.fury.io/py/sphinxcontrib-httpexample
10+
The audience for this extension are developers and technical writes documenting their RESTful HTTP APIs. This extension has originally been developed for documenting [`plone.restapi`](https://6.docs.plone.org/plone.restapi/docs/source/index.html).
1211

13-
.. image:: https://readthedocs.org/projects/sphinxcontrib-httpexample/badge/?version=latest
14-
:target: http://sphinxcontrib-httpexample.readthedocs.io/en/latest
1512

16-
sphinxcontrib-httpexample enhances `sphinxcontrib-httpdomain`_, a Sphinx domain extension for describing RESTful HTTP APIs in detail, with a simple call example directive. The new directive provided by this extension generates RESTful HTTP API call examples for different tools from a single HTTP request example.
13+
## Features
1714

18-
The audience for this extension are developers and technical writes documenting their RESTful HTTP APIs. This extension has originally been developed for documenting `plone.restapi`_.
15+
- Directive for generating various RESTful HTTP API call examples from single HTTP request.
16+
- Supported tools:
1917

20-
.. _sphinxcontrib-httpdomain: https://pythonhosted.org/sphinxcontrib-httpdomain/
21-
.. _plone.restapi: http://plonerestapi.readthedocs.org/
18+
- [curl](https://curl.haxx.se/)
19+
- [wget](https://www.gnu.org/software/wget/)
20+
- [httpie](https://httpie.org/)
21+
- [python-requests](http://docs.python-requests.org/)
2222

2323

24-
Features
25-
--------
24+
## Examples
2625

27-
* Directive for generating various RESTful HTTP API call examples from single HTTP request.
26+
This extension has been used at least in the following documentations:
2827

29-
* Supported tools:
28+
- https://6.docs.plone.org/plone.restapi/docs/source/index.html
29+
- https://sphinxcontrib-httpexample.readthedocs.org/en/latest/
30+
- https://guillotina.readthedocs.io/en/latest/
3031

31-
- curl_
32-
- wget_
33-
- httpie_
34-
- python-requests_
3532

36-
.. _curl: https://curl.haxx.se/
37-
.. _wget: https://www.gnu.org/software/wget/
38-
.. _httpie: https://httpie.org/
39-
.. _python-requests: http://docs.python-requests.org/
33+
## Documentation
4034

35+
Full documentation for end users can be found in the "docs" folder. It is also available online at http://sphinxcontrib-httpexample.readthedocs.org/
4136

42-
Examples
43-
--------
4437

45-
This extension has been used at least in the following documentations:
38+
## Installation
4639

47-
* http://plonerestapi.readthedocs.org/
48-
* http://sphinxcontrib-httpexample.readthedocs.org/
49-
* https://guillotina.readthedocs.io/en/latest/
40+
Add `sphinxcontrib-httpexample` and `sphincontrib-httpdomain` into your project requirements.
5041

42+
Then configure your Sphinx configuration file `conf.py` with `sphinxcontrib.httpdomain` and `sphinxcontrib.httpexample` as follows.
5143

52-
Documentation
53-
-------------
44+
```python
45+
extensions = [
46+
"sphinxcontrib.httpdomain",
47+
"sphinxcontrib.httpexample",
48+
]
49+
```
5450

55-
Full documentation for end users can be found in the "docs" folder. It is also available online at http://sphinxcontrib-httpexample.readthedocs.org/
5651

52+
## Contribute
5753

58-
Installation
59-
------------
54+
To contribute to `sphinxcontrib-httpexample`, first set up your environment.
6055

61-
Add sphinxcontrib-httpexample into requirements of your product documentation and into the configuration file of your Sphinx documentation next to sphincontrib-httpdomain as follows:
6256

63-
.. code:: python
57+
### Set up development environment
6458

65-
extensions = ['sphinxcontrib.httpdomain', 'sphinxcontrib.httpexample']
59+
Install [uv](https://6.docs.plone.org/glossary.html#term-uv).
60+
Carefully read the console output for further instructions, and follow them, if needed.
6661

62+
```shell
63+
curl -LsSf https://astral.sh/uv/install.sh | sh
64+
```
6765

68-
## Contribute
66+
Initialize a Python virtual environment.
6967

7068
```shell
7169
uv venv
70+
```
71+
72+
Install `sphinxcontrib-httpexample`.
73+
74+
```shell
7275
uv sync
73-
make watch
7476
```
7577

76-
Yields
77-
78-
```console
79-
$ make watch
80-
PYTHONPATH=/Users/stevepiercy/projects/sphinxcontrib-httpexample/docs sphinx-autobuild -b html docs docs/html
81-
[sphinx-autobuild] > sphinx-build -b html /Users/stevepiercy/projects/sphinxcontrib-httpexample/docs /Users/stevepiercy/projects/sphinxcontrib-httpexample/docs/html
82-
Running Sphinx v4.5.0
83-
84-
Configuration error:
85-
There is a programmable error in your configuration file:
86-
87-
Traceback (most recent call last):
88-
File "/Users/stevepiercy/.pyenv/versions/3.10.13/lib/python3.10/site-packages/sphinx/config.py", line 332, in eval_config_file
89-
exec(code, namespace)
90-
File "/Users/stevepiercy/projects/sphinxcontrib-httpexample/docs/conf.py", line 86, in <module>
91-
dist = metadata.distribution("sphinxcontrib-httpexample")
92-
File "/Users/stevepiercy/.pyenv/versions/3.10.13/lib/python3.10/importlib/metadata/__init__.py", line 969, in distribution
93-
return Distribution.from_name(distribution_name)
94-
File "/Users/stevepiercy/.pyenv/versions/3.10.13/lib/python3.10/importlib/metadata/__init__.py", line 548, in from_name
95-
raise PackageNotFoundError(name)
96-
importlib.metadata.PackageNotFoundError: No package metadata was found for sphinxcontrib-httpexample
97-
98-
Command exited with exit code: 2
99-
The server will continue serving the build folder, but the contents being served are no longer in sync with the documentation sources. Please fix the cause of the error above or press Ctrl+C to stop the server.
100-
[I 251202 22:42:04 server:335] Serving on http://127.0.0.1:8000
101-
[I 251202 22:42:04 handlers:62] Start watching changes
78+
### Build documentation
79+
80+
Rebuild Sphinx documentation on changes, with live-reload in the browser
81+
82+
```shell
83+
make livehtml
10284
```
10385

86+
To stop the preview, type `CTRL-C`.
87+
88+
89+
### Run tests
90+
91+
make te
10492

105-
License
106-
-------
93+
## License
10794

10895
The project is licensed under the GPLv2.

0 commit comments

Comments
 (0)