Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOGS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Change Logs
0.2.0
+++++

* :pr:`23`: add sphinx extension quote
* :pr:`21`: add sphinx extension faqref, runpython uses black
* :pr:`17`: add RST writer to output the documentation into pure RST format
* :pr:`16`: add command line nb2py to convert notebook to python files
Expand Down
1 change: 1 addition & 0 deletions _doc/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Extensions
docassert
epkg
gdot
quote
runpython
tools
rst_builder
Expand Down
49 changes: 49 additions & 0 deletions _doc/api/quote.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
=====
quote
=====

A bloc to insert a quote from a book, a film...

Usage
=====

In *conf.py*:

::

extensions = [ ...
'sphinx_runpython.quote',
]

One example:

::

.. quote::
:author: Esther Duflo
:book: Expérience, science et lutte contre la pauvreté
:year: 2013
:index: economy
:pages: 26

[Roosevelt] It is common sense to take a method and try it:
if it fails, admit frankly and try another. But above all,
try something.

Which gives:

.. quote::
:author: Esther Duflo
:book: Expérience, science et lutte contre la pauvreté
:year: 2013
:index: pauvreté
:pages: 26

[Roosevelt] It is common sense to take a method and try it:
if it fails, admit frankly and try another. But above all,
try something.

Directive
=========

.. autoclass:: sphinx_runpython.quote.sphinx_quote_extension.QuoteNode
1 change: 1 addition & 0 deletions _doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"sphinx_runpython.docassert",
"sphinx_runpython.gdot",
"sphinx_runpython.epkg",
"sphinx_runpython.quote",
"sphinx_runpython.runpython",
"sphinx_runpython.sphinx_rst_builder",
]
Expand Down
6 changes: 1 addition & 5 deletions _unittests/ut_epkg/test_epkg_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ def test_epkg_module(self):
" ", ""
)
content = content.replace('u"', '"')

html = rst2html(
content,
writer_name="rst",
)
html = rst2html(content, writer_name="rst")

t1 = "abeforea"
if t1 not in html:
Expand Down
Loading