openzim / wp1

Wikipedia 1.0 engine & selection tools
https://wp1.openzim.org
GNU General Public License v2.0
24 stars 17 forks source link

Add some kind of "combinator" builder #728

Open audiodude opened 4 months ago

audiodude commented 4 months ago

Sometimes there's no one perfect tool for building a selection. Users are likely to want to combine methods from multiple builders. We should create a "combination builder" (name is up for debate). This would consist mostly of a dropdown selection of the existing builders that the user has created, with some number of mathematical set operations (probably union, intersection, and difference).

We could build a single set "expression" where the user fills in the sets (builders) that they wish to operate on. Something like:

(A ∪ B ∪ ...) - (C ∪ D ∪ ...)

Where the user provides their existing builders as values of A, B, C, D etc. We could also provide a toggle for Union/Intersection for each parenthesized expression, like Petscan does. This is probably the easiest to explain:

Include [all articles | articles that are shared] between [ A | B | C], but exclude [all articles | articles that are shared] between [ A | B | C].

An interesting question is if we want to let combinator builders themselves be combined. Conceptually and architecturally there's no problem with it, but it might be a case of "handing the user a footgun" where they create a complex chain of combined builders and get frustrated.