Open pitrson opened 3 months ago
Hi Pitrson!
That first point was a problem for me too the other day.
The second one how about this:
{pagelist tag1 tag2}
for any pages with either of those tags (Current)
{pagelist tag1 -tag2}
for pages with tag1 but not if it also is tagged with tag2 (Current)
`{pagelist +tag1 +tag2} for pages tagged with both those tags (New)
Thanks for the offer of help. I don't have the time right now to do these changes unfortunatly. Maybe in a few weeks?
Hi @alanpt
I was checking the code today and I've seen that the '+tag' is already implemented.
any_tags = {tag for tag in tags_to_filter if not tag.startswith('+') and not tag.startswith('-')}
all_tags = {tag.lstrip('+') for tag in tags_to_filter if tag.startswith('+')}
exclude_tags = {tag.lstrip('-') for tag in tags_to_filter if tag.startswith('-')}
any_match = any(tag in page_tags for tag in any_tags) if any_tags else True
all_match = all(tag in page_tags for tag in all_tags)
exclude_match = not any(tag in page_tags for tag in exclude_tags)
return any_match and all_match and exclude_match
It works sufficiently for my needs (for now ^^). I will submit a PR which reflects this in the README and makes sure that it doesn't generate link for "myself" and include few minor fixes I came across.
Hello there,
first of all - many thanks for your work! Your plugin is really amazing and it is the only one available which was (almost) able to fulfill my needs :-). Now when it comes to my feature request I'm missing few important (IMHO) functionalities:
Exclude myself from the generated links
-myself
, or even to have it like that by default and only include if specified. I was missing this even in Confluence :)Add logical operators for tags in pagelist
Current state:
{ pagelist 100 tag1 tag2}
My idea would be something like this:
(tag1 or tag2 or tag3)
(tag1 and tag2)
((tag1 and/or tag3) and/or (tag1 and/or tag2)) and (not tag4)
Many thanks again! Let me please know if any help or testing is needed.
Cheers