Skip to content

Latest commit

 

History

History
47 lines (38 loc) · 1.81 KB

README.md

File metadata and controls

47 lines (38 loc) · 1.81 KB

ConfluencePictureDump

Help save external-url pictures as attachments in Confluence.

Usage

  1. prepare python3 envirement
  2. download ConfluencePictureDump.py
  3. install requirements: pip3 install python-magic atlassian-python-api BeautifulSoup4 lxml
  4. edit ConfluencePictureDump.py (see details in file comments)
  5. run: python3 ConfluencePictureDump.py

Detailed

Page Directory

File directories show below.

  • sourceSpace
    • sourceParentPage
      • pageA (waiting conversion)
      • pageB (waiting conversion)
      • ...
  • targetSpace
    • targetParentPage
      • pageA (converted)
      • pageB (converted)
      • ...

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.

TODO

  • adapt manually copied contents
  • adapt Web-Clipper APP

Background

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:

Besides these, I use Web Clipper to save web contents. But this App just paste picture url as confluence.

P.S.

I just test on my MacBook, and it's a immature version. So welcome report bugs and PR in issues!

Reference