Opened 7 years ago

Closed 7 years ago

Last modified 7 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


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 7 years ago by martin_s

  • Status changed from new to assigned

Good idea. As soon I find time.

comment:2 Changed 7 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 7 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 7 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 7 years ago by martin_s

Use as following:


  • * 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.



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 7 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 7 years ago by martin_s

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

Add Comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.