Confluence Server 5.9.7
I have two different pages in the same space. They are similar, with minor differences. Call them:
VENDORS and VENDORS_NEW
How do I generate a comparison of these two pages? I'm looking for something similar to the "Compare Selected Versions" that compares two historical versions of the same page (within PAGE HISTORY).
Since Confluence has the above ability within the same page, I'd hope it could do the same with two separate pages.
I don't think it can be done within Confluence. I'd export them both to PDF then use Acrobat to do a comparison.
On the other hand, why don't you just copy the VENDORS page, then edit the VENDORS_NEW page, select all and copy, then edit the Copy of VENDORS page, select all and paste. Then you can use the history compare feature.
Thank you. (I like your 2nd solution.) As it turns out, i realized that v1 (in Page History) of VENDORS_NEW is very close to the last version of VENDORS. So, I ended up comparing v1 to v50 (current version).
You'd think, though, that Confluence would support page-to-page compare...I wonder if that's a feature request.
another way to accomplish this, could be done with python.
If you are familiar with the output from the posix diff -u command:
#!/usr/bin/env python import difflib
import sys try: from xmlrpc.client import ServerProxy from xmlrpc.client import Fault except: from xmlrpclib import ServerProxy from xmlrpclib import Fault def get_page(page_id, confluence_url='https://<confluence_domain>', confluence_login='<username>', confluence_password='<password>'): client = ServerProxy(confluence_url+"/rpc/xmlrpc", verbose=0) try: auth_token = client.confluence2.login(confluence_login, confluence_password) except: print("Can't login to confluence") return  try: # getting confluence page page = client.confluence2.getPage(auth_token, page_id) except Fault as e: print(e.faultString) return  return page['content'].split('\n') if len(sys.argv) < 3:
print("usage:" + sys.argv + " page_id_1 page_id_2") for line in difflib.unified_diff(get_page(sys.argv), get_page(sys.argv), fromfile='pageID='+sys.argv, tofile='pageID='+sys.argv): print(line[:-1])
this little script could help you
More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs