))
).text = str(m.url)
- newp().text = 'Tekst opracowany na podstawie: ' + m.source_name
+ if m.source_name:
+ newp().text = 'Tekst opracowany na podstawie: ' + m.source_name
newp().text = """
Wydawca:
"mp3": args.mp3,
}
- output = document.build(builder, **kwargs)
+ output = document.build(builder, base_url=args.base_url, **kwargs)
with open(output_file_path, 'wb') as f:
f.write(output.get_bytes())
)
- def build(self, builder, **kwargs):
- return builder().build(self, **kwargs)
+ def build(self, builder, base_url=None, **kwargs):
+ return builder(base_url=base_url).build(self, **kwargs)
def _compat_assign_ordered_ids(self):
"""
"coverBarColor": etree.ElementBase,
"coverBoxPosition": etree.ElementBase,
"coverLogoUrl": etree.ElementBase,
-
+ "contentWarning": etree.ElementBase,
+
"utwor": root.Utwor,
"dramat_wierszowany_l": masters.Master,
"dramat_wierszowany_lp": masters.Master,
"animacja": figures.Animacja,
"ilustr": figures.Ilustr,
+ "ref": etree.ElementBase,
+
# Inline MathML, should really be namespaced.
"mrow": etree.ElementBase,
"mi": etree.ElementBase,
else:
th = img.resize((width, round(width * img.size[1] / img.size[0])))
- imgfile.close()
buffer = six.BytesIO()
th.save(buffer, format=th_format)
- ## TODO: Counter
+ imgfile.close()
file_name = 'image%d.%s' % (
builder.assign_image_number(),
ext