Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#6074 closed enhancement (fixed)

Add way to exclude sets of pages

Reported by: pickscrape@… Owned by: martin_s
Priority: normal Component: ListOfWikiPagesMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

Some way to exclude ranges of pages based on some hierarchical base would be nice.

Just an idea. :)

Attachments (0)

Change History (7)

comment:1 Changed 5 years ago by martin_s

  • Status changed from new to assigned

Good idea. As soon I find time.

comment:2 Changed 5 years ago by martin_s

Can be done with SQL, something like ... AND name NOT LIKE 'pattern' . I would be happy to receive patches. :-)

comment:3 Changed 5 years ago by pickscrape

The thing that complicates this for me is that I would probably want to be able to supply multiple filters. I've had a quick look at the code but I don't know how trac macro handling of such things would work...

From the SQL perspective that would probably mean that the query builder would need to be able to handle an arbitrary number of AND name NOT LIKE 'pattern' clauses.

comment:4 Changed 5 years ago by martin_s

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [6955]) Added exclude=pattern option to ListOfWikiPages. This closes #6074.

comment:5 Changed 5 years ago by martin_s

Use as following:

Wildcards

  • * matches everything (translated to % in SQL)
  • ? matches a single character (translated to _ in SQL)

Care is taken to automatically escape normal % and _. Wildcards can be escaped using double backslashes '\\', e.g. \\* stands for a normal non-wildcard '*'.

The ListOfWikiPagesMacro now uses the AdvParseArgsPlugin.

Example

[[ListOfWikiPages(...,exclude=Trac*,exclude=tests/*,exclude=A?B)]]

This will exclude all wikis starting with Trac and tests/ as well as all three-character wikis which start with A and end with B.

comment:6 Changed 5 years ago by pickscrape

Absolutely fantastic: thanks for turning this around so quickly.

This makes our "RustyPages" page 100% useful now: thanks a lot!

comment:7 Changed 5 years ago by martin_s

Just added exclude support for ListChangesBy and made a small bugfix: [6956]

Add Comment

Modify Ticket

Action
as closed The owner will remain martin_s.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.