Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing tag plugin #2936

Merged
merged 5 commits into from
Aug 19, 2018
Merged

Missing tag plugin #2936

merged 5 commits into from
Aug 19, 2018

Conversation

blimmo
Copy link

@blimmo blimmo commented Aug 13, 2018

A plugin to match missing tags. Would (kind of) close #1940

@frestr
Copy link
Member

frestr commented Aug 14, 2018

Works nicely from a quick test.

It would probably be a good idea to strip the tag though, as queries like @(missing: date) and @(missing:date) do not yield the same results.

@blimmo
Copy link
Author

blimmo commented Aug 14, 2018

I added a strip to the body as requested.

I'm a little unhappy with the handling of numeric tags. E.g. rating must be entered as ~#rating. I believe this could be fixed by using the call interface of data instead of the dict one but when I do that @(missing:rating) matches everything.

Since this is a plugin I think merging it as is will be fine but if there are any ideas to improve this behaviour they'd be welcome.

@frestr
Copy link
Member

frestr commented Aug 15, 2018

I believe this could be fixed by using the call interface of data instead of the dict one but when I do that @(missing:rating) matches everything.

You still need to include the ~# prefix when using the call interface.

Even though ~ and # are metacharacters, they are still part of the tag key, so rating, ~rating and ~#rating are regarded as different tags. I guess it would be possible to introduce some kind of fallback mechanism, but that may introduce ambiguity and perhaps be a bit confusing.

A list of the internal tags (with the prefix included) exists in the documentation, so I don't consider it an issue having to use the whole tag key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add query syntax to match on missing tag values
3 participants