Exclusive label groups
Closed this issue · 1 comments
jaywonchung commented
Sometimes, you want to express reading progress with labels, and a paper can only have exactly one of three states: ['queued', 'active', 'done']
.
Without exclusive label groups, you would have to run commands in this order:
$ ls zeus | set is queued # You made up your mind to read this paper soon.
$ ls zeus | set not queued | set is active
$ ls zeus | set not active | set is done
Having to run set not queued
and set not active
are a bit annoying.
Exclusive labels groups can be defined in the configuration group like the following:
[output]
exclusive_labels = [ ['queued', 'active', 'done'] ]
and a paper can only have zero or one of the labels part of the same exclusive label group. set
-ing the second label will delete and override the first label.
jaywonchung commented
Implemented in 351ebb7.