Extending literalinclude to include remote URLs
Project description
sphinxext-remoteliteralinclude
Sphinx extension that extends the literalinclude directive to allow remote URLS
Installation
Please install the extension via pip using the following command:
python3 -m pip install sphinxext-remoteliteralinclude
then in your conf.py under extensions, it should look like the following:
extensions = ["sphinxext.remoteliteralinclude"]
Configuration
There are two optional configuration for retry logic for failed requests.
remoteliteralinclude_retry_time = 1.0
remoteliteralinclude_max_retry_time = 180.0
The retry_time is the base time in seconds to wait, with an exponential backoff until max_retry_time (in seconds) is reached.
Usage
Simply just use it as you normally would a normal literalinclude
.. rli:: https://example.com/example.java
:language: java
:lines: 10-29
:linenos:
:lineno-start: 10
Important Notes
This is simply a modification of the normal literalinclude extension. Near all of the code is the exact same. Modifications are made by Eli Barnett, with pip module creation by Dalton Smith.
Using the extension to reference local files will not work. Use the regular literalinclude extension in that case.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinxext_remoteliteralinclude-0.6.1.tar.gz.
File metadata
- Download URL: sphinxext_remoteliteralinclude-0.6.1.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8b072a6e88a336662810017da3d4eeb154a4ef4ca8b42db69015dbbd36189c7
|
|
| MD5 |
928016be246320984aab2fb1f20a5214
|
|
| BLAKE2b-256 |
aab87a579e862fdad35933151e028aadebe064099a9a5c750a2a42ad70b9da74
|
File details
Details for the file sphinxext_remoteliteralinclude-0.6.1-py3-none-any.whl.
File metadata
- Download URL: sphinxext_remoteliteralinclude-0.6.1-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70271f0404476c08105abff5b30c636864461c1970e47efae0655c5774429a5c
|
|
| MD5 |
a857c54c8456923e50bac81c2248766b
|
|
| BLAKE2b-256 |
30a6a3d756ec2ae07d7ddb5094b2874366d1dd33a512454139f29c729f215543
|