summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2019-02-10 22:49:31 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2019-02-10 22:49:31 (GMT)
commite82fb8f63217513d2d8f8acb14aa6ee9d197516e (patch)
tree8dbd7eab35c09a890131b816333210fcdab64fca
parent77b85b1d7474e7c67137999542436de242b150b2 (diff)
downloadmisc-fred-e82fb8f63217513d2d8f8acb14aa6ee9d197516e.zip
misc-fred-e82fb8f63217513d2d8f8acb14aa6ee9d197516e.tar.gz
misc-fred-e82fb8f63217513d2d8f8acb14aa6ee9d197516e.tar.bz2
doc: add support for images from mallard pages
-rw-r--r--doc-publik/update-publik-doc-from-mallard.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/doc-publik/update-publik-doc-from-mallard.py b/doc-publik/update-publik-doc-from-mallard.py
index e0990cc..1ddfac8 100644
--- a/doc-publik/update-publik-doc-from-mallard.py
+++ b/doc-publik/update-publik-doc-from-mallard.py
@@ -29,6 +29,8 @@ for cell in TextCell.objects.filter(slug__startswith='mallard-'):
except TextCell.DoesNotExist:
continue
a.attrs['href'] = target_cell.page.get_online_url()
+ for img in document.find_all('img'):
+ img.attrs['src'] = 'https://doc.entrouvert.org/%s/dev/%s' % (module, img.attrs['src'])
new_content = unicode(content).replace(unicode(more_info), '')
cell.text = new_content