pydocmaker 2.3.0__tar.gz → 2.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pydocmaker-2.3.0/src/pydocmaker.egg-info → pydocmaker-2.3.2}/PKG-INFO +1 -1
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker/__init__.py +6 -5
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker/core.py +6 -6
- {pydocmaker-2.3.0 → pydocmaker-2.3.2/src/pydocmaker.egg-info}/PKG-INFO +1 -1
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/LICENSE +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/README.md +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/setup.cfg +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/setup.py +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker/backend/__init__.py +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker/backend/baseformatter.py +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker/backend/ex_docx.py +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker/backend/ex_html.py +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker/backend/ex_ipynb.py +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker/backend/ex_markdown.py +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker/backend/ex_redmine.py +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker/backend/ex_tex.py +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker/backend/mdx_latex.py +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker/backend/pandoc_api.py +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker/backend/pdf_maker.py +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker/templating.py +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker/util.py +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker.egg-info/SOURCES.txt +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker.egg-info/dependency_links.txt +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker.egg-info/requires.txt +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/src/pydocmaker.egg-info/top_level.txt +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/tests/test_backend_pandoc.py +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/tests/test_convert_all.py +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/tests/test_core.py +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/tests/test_ex_html.py +0 -0
- {pydocmaker-2.3.0 → pydocmaker-2.3.2}/tests/test_util.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydocmaker
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.2
|
|
4
4
|
Summary: a minimal document maker to make docx, markdown, html, textile, redmine, and tex documents from python. Written in pure python.
|
|
5
5
|
Home-page: https://github.com/TobiasGlaubach/pydocmaker
|
|
6
6
|
Author: Tobias Glaubach
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
__version__ = '2.3.
|
|
1
|
+
__version__ = '2.3.2'
|
|
2
2
|
|
|
3
3
|
from pydocmaker.core import DocBuilder, construct, constr, buildingblocks, print_to_pdf, get_latex_compiler, set_latex_compiler, make_pdf_from_tex, show_pdf
|
|
4
4
|
from pydocmaker.util import upload_report_to_redmine, bcolors, txtcolor, colors_dc
|
|
@@ -126,9 +126,9 @@ def mk_md(children=None, index=None, chapter=None, color='', end=None, **kwargs)
|
|
|
126
126
|
**kwargs: Additional keyword arguments for the document part.
|
|
127
127
|
|
|
128
128
|
Returns:
|
|
129
|
-
|
|
129
|
+
dict: The newly created markdown document part.
|
|
130
130
|
"""
|
|
131
|
-
return DocBuilder().add_md(children=children, index=index, chapter=chapter, color=color, end=end, **kwargs)
|
|
131
|
+
return DocBuilder().add_md(children=children, index=index, chapter=chapter, color=color, end=end, **kwargs)[0]
|
|
132
132
|
|
|
133
133
|
|
|
134
134
|
def mk_pre(children=None, index=None, chapter=None, color='', end=None, **kwargs):
|
|
@@ -149,13 +149,14 @@ def mk_pre(children=None, index=None, chapter=None, color='', end=None, **kwargs
|
|
|
149
149
|
return DocBuilder().add_pre(children=children, index=index, chapter=chapter, color=color, end=end, **kwargs)[0]
|
|
150
150
|
|
|
151
151
|
|
|
152
|
-
def mk_fig(fig=None, caption='', width=0.8, children=None, color='', end=None, **kwargs):
|
|
152
|
+
def mk_fig(fig=None, caption='', width=0.8, bbox_inches='tight', children=None, color='', end=None, **kwargs):
|
|
153
153
|
"""make an image document part from a pyplot figure type dict from given image input.
|
|
154
154
|
|
|
155
155
|
Args:
|
|
156
156
|
fig (matplotlib figure, optional): the figure which to upload (or the current figure if None). Defaults to None.
|
|
157
157
|
caption (str, optional): the caption to give to the image. Defaults to ''.
|
|
158
158
|
width (float, optional): The width for the image to have in the document. Defaults to 0.8.
|
|
159
|
+
bbox_inches (str, optional): will give better spacing for matplotlib figures.
|
|
159
160
|
children (str, optional): A specific name/id to give to the image (will be auto generated if None). Defaults to None.
|
|
160
161
|
index (int, optional): The index where to insert the part. If None, appends to the end.
|
|
161
162
|
chapter (str | int, optional): The chapter name or index where to insert the part. If None, appends to the end.
|
|
@@ -165,7 +166,7 @@ def mk_fig(fig=None, caption='', width=0.8, children=None, color='', end=None, *
|
|
|
165
166
|
Returns:
|
|
166
167
|
dict: The created document part.
|
|
167
168
|
"""
|
|
168
|
-
return DocBuilder().add_fig(fig=fig, caption=caption, width=width, children=children, color=color, end=end, **kwargs)[0]
|
|
169
|
+
return DocBuilder().add_fig(fig=fig, caption=caption, width=width, bbox_inches=bbox_inches, children=children, color=color, end=end, **kwargs)[0]
|
|
169
170
|
|
|
170
171
|
def mk_image(image, caption='', width=0.8, children=None, color='', end=None, **kwargs):
|
|
171
172
|
"""make an image type dict from given image input.
|
|
@@ -268,7 +268,7 @@ class constr():
|
|
|
268
268
|
return constr.image(imageblob=imageblob, children=children, caption=caption, width=width, color=color, end=end)
|
|
269
269
|
|
|
270
270
|
|
|
271
|
-
def image_from_fig(caption='', width=0.8, children=None, fig=None, color='', end=None, **kwargs):
|
|
271
|
+
def image_from_fig(caption='', width=0.8, children=None, fig=None, color='', end=None, bbox_inches='tight', **kwargs):
|
|
272
272
|
"""convert a matplotlib figure (or the current figure) to a document image dict to later add to a document
|
|
273
273
|
|
|
274
274
|
Args:
|
|
@@ -285,9 +285,9 @@ class constr():
|
|
|
285
285
|
|
|
286
286
|
with io.BytesIO() as buf:
|
|
287
287
|
if fig:
|
|
288
|
-
fig.savefig(buf, format='png', **kwargs)
|
|
288
|
+
fig.savefig(buf, format='png', bbox_inches=bbox_inches, **kwargs)
|
|
289
289
|
else:
|
|
290
|
-
plt.savefig(buf, format='png', **kwargs)
|
|
290
|
+
plt.savefig(buf, format='png', bbox_inches=bbox_inches, **kwargs)
|
|
291
291
|
buf.seek(0)
|
|
292
292
|
|
|
293
293
|
img = base64.b64encode(buf.read()).decode('utf-8')
|
|
@@ -874,22 +874,22 @@ class DocBuilder(UserList):
|
|
|
874
874
|
return self
|
|
875
875
|
|
|
876
876
|
|
|
877
|
-
def add_fig(self, fig=None, caption = '', width=0.8, children=None, index=None, chapter=None, color='', end=None, **kwargs):
|
|
877
|
+
def add_fig(self, fig=None, caption = '', width=0.8, bbox_inches='tight', children=None, index=None, chapter=None, color='', end=None, **kwargs):
|
|
878
878
|
"""add a pyplot figure type dict from given image input.
|
|
879
879
|
|
|
880
880
|
Args:
|
|
881
881
|
fig (matplotlib figure, optional): the figure which to upload (or the current figure if None). Defaults to None.
|
|
882
882
|
caption (str, optional): the caption to give to the image. Defaults to ''.
|
|
883
883
|
width (float, optional): The width for the image to have in the document. Defaults to 0.8.
|
|
884
|
+
bbox_inches (str, optional): will give better spacing for matplotlib figures.
|
|
884
885
|
children (str, optional): A specific name/id to give to the image (will be auto generated if None). Defaults to None.
|
|
885
886
|
index (int, optional): The index where to insert the part. If None, appends to the end.
|
|
886
887
|
chapter (str | int, optional): The chapter name or index where to insert the part. If None, appends to the end.
|
|
887
888
|
color (str, optional): any color which can be rendered by html or latex. Empty string for default.
|
|
888
889
|
end (str, optional): If you want to insert a different line ending (than the default) for this element set this argument to any string. None for default.
|
|
889
890
|
|
|
890
|
-
|
|
891
891
|
"""
|
|
892
|
-
self.add(constr.image_from_fig(caption=caption, width=width, children=children, fig=fig, color=color, end=end, **kwargs), index=index, chapter=chapter)
|
|
892
|
+
self.add(constr.image_from_fig(caption=caption, width=width, bbox_inches=bbox_inches, children=children, fig=fig, color=color, end=end, **kwargs), index=index, chapter=chapter)
|
|
893
893
|
return self
|
|
894
894
|
|
|
895
895
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pydocmaker
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.2
|
|
4
4
|
Summary: a minimal document maker to make docx, markdown, html, textile, redmine, and tex documents from python. Written in pure python.
|
|
5
5
|
Home-page: https://github.com/TobiasGlaubach/pydocmaker
|
|
6
6
|
Author: Tobias Glaubach
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|