remotecode is an extension for Sphinx that enables code blocks from remote sources.
Install chios, then add remotecode to the list of extensions in
extensions = ['chios.remotecode']
remote-code-blockdirective to fetch remote source code and display it in a
.. remote-code-block:: ini https://example.com/rawsource.ini
remote-code-block is empty in the HTML output, it is likely that
the given link could not be resolved. Check the Sphinx build messages for a
index.rst:32: WARNING: Unable to resolve https://example.ini
A Sphinx extension that enables code blocks from remote sources.
Copyright (C) 2021 Brian Moss
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
- class remotecode.RemoteCodeBlock(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)
Create remote-code-block directive.
Fetch remote code.
- remotecode.setup(app) dict
Set up Sphinx extension.
app – Sphinx application context.