{"action":"created","issue":{"url":"https://api.github.com/repos/WSULib/combine/issues/173","repository_url":"https://api.github.com/repos/WSULib/combine","labels_url":"https://api.github.com/repos/WSULib/combine/issues/173/labels{/name}","comments_url":"https://api.github.com/repos/WSULib/combine/issues/173/comments","events_url":"https://api.github.com/repos/WSULib/combine/issues/173/events","html_url":"https://github.com/WSULib/combine/issues/173","id":328784243,"node_id":"MDU6SXNzdWUzMjg3ODQyNDM=","number":173,"title":"Improve Record diff, XML/JSON output","user":{"login":"ghukill","id":1753087,"node_id":"MDQ6VXNlcjE3NTMwODc=","avatar_url":"https://avatars3.githubusercontent.com/u/1753087?v=4","gravatar_id":"","url":"https://api.github.com/users/ghukill","html_url":"https://github.com/ghukill","followers_url":"https://api.github.com/users/ghukill/followers","following_url":"https://api.github.com/users/ghukill/following{/other_user}","gists_url":"https://api.github.com/users/ghukill/gists{/gist_id}","starred_url":"https://api.github.com/users/ghukill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghukill/subscriptions","organizations_url":"https://api.github.com/users/ghukill/orgs","repos_url":"https://api.github.com/users/ghukill/repos","events_url":"https://api.github.com/users/ghukill/events{/privacy}","received_events_url":"https://api.github.com/users/ghukill/received_events","type":"User","site_admin":false},"labels":[{"id":680077042,"node_id":"MDU6TGFiZWw2ODAwNzcwNDI=","url":"https://api.github.com/repos/WSULib/combine/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-02T23:04:05Z","updated_at":"2018-06-05T15:26:43Z","closed_at":null,"author_association":"MEMBER","body":"Consider using [sxsdiff](https://github.com/timonwong/sxsdiff) library for Github-esque diffs between Record documents.\r\n\r\nSpike code for `models.py`:\r\n```\r\nfrom sxsdiff import DiffCalculator\r\nfrom sxsdiff.generators.github import GitHubStyledGenerator\r\nimport io\r\n\r\nsxsdiff_result = DiffCalculator().run(ir.document, self.document)\r\nsio = io.StringIO()\r\nGitHubStyledGenerator(file=sio).run(sxsdiff_result)\r\nsio.seek(0)\r\nreturn sio.read()\r\n```\r\n\r\nAnd then in the view `record.html`:\r\n```\r\n{% if input_record_diffs %}\r\n    <div>\r\n         {{ input_record_diffs|safe }}\r\n    </div>\r\n{% else %}\r\n    <p>During Transformation, no changes were detected for this Record.</p>\r\n{% endif %}\r\n```\r\n\r\nThe result looks great, but it is considerably slower than using python's diff library.  And though visibly attractive, also includes lines that are unchanged which can be redundant.  Keeping old, faster method for now, but saving this here in case.\r\n\r\nAdditioanally, made it apparent how nice it would be to have line numbers for ALL document output (XML, JSON, etc.)  "},"comment":{"url":"https://api.github.com/repos/WSULib/combine/issues/comments/394752756","html_url":"https://github.com/WSULib/combine/issues/173#issuecomment-394752756","issue_url":"https://api.github.com/repos/WSULib/combine/issues/173","id":394752756,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDc1Mjc1Ng==","user":{"login":"ghukill","id":1753087,"node_id":"MDQ6VXNlcjE3NTMwODc=","avatar_url":"https://avatars3.githubusercontent.com/u/1753087?v=4","gravatar_id":"","url":"https://api.github.com/users/ghukill","html_url":"https://github.com/ghukill","followers_url":"https://api.github.com/users/ghukill/followers","following_url":"https://api.github.com/users/ghukill/following{/other_user}","gists_url":"https://api.github.com/users/ghukill/gists{/gist_id}","starred_url":"https://api.github.com/users/ghukill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghukill/subscriptions","organizations_url":"https://api.github.com/users/ghukill/orgs","repos_url":"https://api.github.com/users/ghukill/repos","events_url":"https://api.github.com/users/ghukill/events{/privacy}","received_events_url":"https://api.github.com/users/ghukill/received_events","type":"User","site_admin":false},"created_at":"2018-06-05T15:26:43Z","updated_at":"2018-06-05T15:26:43Z","author_association":"MEMBER","body":"Closing - optional \"side-by-side\" diff when viewing Record Changes, which opens new tab.  This prevents long load time for each record, but ability to see this, arguably, more detailed view."}}
{"actor":{"display_login":"ghukill"}}