everypolitician / compare_with_wikidata

Library for diffing Wikidata and CSVs
MIT License
2 stars 0 forks source link

Allow users to customise which parts of the diff are displayed #22

Closed chrismytton closed 7 years ago

chrismytton commented 7 years ago

At the moment we show all parts of the diff. Those parts are as follows:

Sometimes we don't want to show all parts of the diff, so it should be configurable:

I think a production version of this page would probably only include the → lines, and skip the +++/--- ones, we don't really care that much about people that aren't in both lists in this case only whether ones who are, are inconsistent. I can think of two ways to achieve that:

  • Have an option to the prompt for which of the 5 (IIRC) line types we want to display
  • Allow user-templates for each line type, and the user can have null templates for the ones they don't want to show

Original conversation.

chrismytton commented 7 years ago

Related to #16

chrismytton commented 7 years ago

Now that https://github.com/everypolitician/compare_with_wikidata/pull/27 has been merged this can be achieved by supplying a blank template for parts of the diff you don't want to see. For example this prompt supplies options for row_added_template and row_removed_template which point to blank templates, to prevent those rows from being rendered.