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.
Thanks,
Stephen
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Question:
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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[0] + " page_id_1 page_id_2") for line in difflib.unified_diff(get_page(sys.argv[1]), get_page(sys.argv[2]), fromfile='pageID='+sys.argv[1], tofile='pageID='+sys.argv[2]): print(line[:-1])
this little script could help you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It is very frequent in confluence to have this kind of requirements
I would expect to have this as a standard feature
As of today
so the work should not be enormous
With more effort such "Compare with" feature could also propose
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.