Help save external-url pictures as attachments in Confluence.
- prepare python3 envirement
- download
ConfluencePictureDump.py
- install requirements:
pip3 install python-magic atlassian-python-api BeautifulSoup4 lxml
- edit
ConfluencePictureDump.py
(see details in file comments) - run:
python3 ConfluencePictureDump.py
File directories show below.
- sourceSpace
- sourceParentPage
- pageA (waiting conversion)
- pageB (waiting conversion)
- ...
- sourceParentPage
- targetSpace
- targetParentPage
- pageA (converted)
- pageB (converted)
- ...
- targetParentPage
All children pages in sourceParentPage
will be converted.
Note, sourceSpace
can be same as targetSpace
, but it's NOT recommanded to set sourceParentPage
same as targetParentPage
because the script would convert again.
- adapt manually copied contents
- adapt Web-Clipper APP
When I paste external website page into confluence, it just paste the url of picture but not the picture attchment. And confluence official is not going to 'fix' it. Some cases will be listed below:
- https://community.atlassian.com/t5/Confluence-discussions/Save-Web-Image-as-local-File/td-p/1523462
- https://jira.atlassian.com/browse/CONFCLOUD-28739
- https://jira.atlassian.com/browse/CONFSERVER-28739
Besides these, I use Web Clipper to save web contents. But this App just paste picture url as confluence.
I just test on my MacBook, and it's a immature version. So welcome report bugs and PR in issues!