Hi All,
I have recently migrated contents from Trac wiki to Confluence, We have nearly 1400 pages under this space.
I wanted to automate the Pages by adding TOC macro on top of each page, seach for code section within page and insert Code block macro and inside it the code should be pasted.
Can anyone please hep me how can i move ahead with this.. I am looking for some kind of python script to start but wondering the point to get kick start.
Thank You,
Akash
I have a couple suggestions. One would be the Confluence Command Line Interafce. There are some handy methods in it such as find and replace that you could automate across you instance. It uses Atlassian's API to do the changes, so you know it should be a safe operations.
Another possibility would be to use the WebDAV plugin(installed by default in Confluence). You can map Confluence to a drive letter(at least you can on Windows) and then work with it as if it were just a file system. Each page has a directory with the same name as the page and inside the directory is a .txt file with the mask {page name}.txt. The .txt files have the actual page content, so it you are into scripting it you could do it that way.
Hi Davin,
Thanks, i am working on your suggestions. Hope it does a trick for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Davin,
I have tried using CLI but there issues in communicating with Confluence instance, I even wonder even if it works for me to making bulk modification on every page as each page need to be traced and look for Heading levels based on heading level an TOC macro should be inserted, trace whole page and look for code block and insert that code into Code block macr.
Can you please let me know if there could be any other option like writing script to do these modifications, such as XML RPC, I ahve gone with these and found few method likes storePage, updatePage, but none matching my requirements.
Thank You,
Akash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I also mentioned the WebDAV plugin. You could for instance map Confluence to a drive letter and then just use you native filesystem APIs in python to edit the pages.
There is also the SOAP API and the RSET API that you might check into. If it is a one time thing though I would just get the WebDAV stuff setup. You could have it mapped to a drive in under five minutes. Then just script against it as if it were files and folders.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.