everypolitician / compare_with_wikidata

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

Write raw comparison CSV to Wikidata #101

Closed chrismytton closed 6 years ago

chrismytton commented 6 years ago

A couple of times now I've wanted to get the information out of a prompt comparison table for use with QuickStatements or similar. Copying and pasting the HTML into vim to get the Q values out works, but isn't optimal.

This change adds a /csv subpage to the prompt so you can retrieve the raw CSV.

You can see it in action here:

https://www.wikidata.org/wiki/User:Chris_Mytton/prompts/Argentina/Chamber_of_Deputies/csv

Notes

At the moment this doesn't render nicely in the Wikidata interface, since it's just raw CSV data, but perhaps that doesn't matter, as you can just edit the source and copy the CSV out. I'm opening this pull request to get feedback on whether this is a good idea and to see if anyone has any suggestions for improvements or alternatives.

chrismytton commented 6 years ago

This has now been deployed to https://tools.wmflabs.org/prompter/, so prompts should now start having a /comparison_csv subpage with the raw comparison output.