Make it easier for humans to add quotes
Closed this issue · 1 comments
At the moment, multiple quotes per politicians are allowed, but they're managed in two arrays, which are then combined by the software, hence requiring the user to keep both arrays in sync to make sure that the pairs of "text" and "source" are correct. I think that this structure is pretty fragile, and cumbersome for users trying to add texts.
I'd suggest to replace these arrays by a single one containing objects like:
"texts": [
{
"text": "the text",
"source": "https://some.me/aningful/source"
},
...
This way, source and text are next to each other, and it's mostly impossible to screw up the relations between texts and sources, making this much more robust against human errors. And if there should ever be a faulty object in such an array, it can just be removed without any consequences for the rest of the objects.
(Also, it should be fairly easy to convert the existing list to such a new structure. I'd volunteer to provide a Python script doing exactly that.)