everypolitician / compare_with_wikidata

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

Refactor to work with other tools #30

Closed chrismytton closed 7 years ago

chrismytton commented 7 years ago

This refactors the code so it can be called from other places, e.g. an HTTP handler, as well as from the command line.

Apologies for the confusing branch name, this pull request ended up doing something different from what I originally thought!

Notes

At the moment this code is very thrown together, and not terribly well thought through, but it works! I've split the code out into a couple of classes, MediawikiPage to represent the page we're updating, and MediawikiText to represent the text that we want to update the page with. We probably want to at least split out the comparison code, which I've made a start on in #25, but this should be good enough to get us going.

Fixes #29

chrismytton commented 7 years ago

Closing in favour of https://github.com/everypolitician/compare_with_wikidata/pull/41