programmatically compare two files

I would like to be able to use the Edit-> Track changes → Compare document feature of libre office writer from the commandline. Is this somehow possible?