robot icon indicating copy to clipboard operation
robot copied to clipboard

Robot diff: multiple formats, and newlines

Open allysonlister opened this issue 5 years ago • 3 comments

Good morning!

Thanks so much for providing Robot - it's a really useful resource. I've been making use of the diff command, and was wondering about the possibility of two additional features please:

  1. Please can we have the option of requesting multiple diff output formats? e.g. java -jar build/robot.jar diff --labels=true --format=markdown,html --left left.owl --right right.owl --output=diff-stem And then the output variable would take diff-stem as the stem of the output path/filename, which would have the appropriate file extensions added?

  2. I've noticed recently that performing a diff against a version of the OWL file made by a collaborator on a different OS has resulted in the different types of newlines coming up as modifications (e.g. "\n" versus "\c\n" or whatever the current line breaks are these days). Is that just my imagination, and a fault of my own between keyboard and chair, or are different line breaks treated differently by robot diff? If so, could there be an option to ignore differences in line breaks please?

Thanks very much!

allysonlister avatar Aug 03 '20 07:08 allysonlister

Hi @allysonlister thanks for your feedback! I think 1 should be doable. For 2, are these line break differences inside string literals?

balhoff avatar Aug 03 '20 12:08 balhoff

Thanks!

Unfortunately I've trashed my diff file already (I know, I should have uploaded it) - I think it was issues with the end of lines in the actual XML tags, as it touched almost 1500 lines in my ontology, and the update had only modified one annotation property in one class. I think it might be something to do with how Protege saves OWL files in the two different operating systems. If you like you can wait on number 2 until I can somehow reproduce the offending diff...

allysonlister avatar Aug 03 '20 12:08 allysonlister

I would like to add that it would be great if we could have a command line friendly output for GitHub actions type things.. format TXT and --print true?

matentzn avatar Oct 12 '21 16:10 matentzn