wiki:WantedPagesMacro

List of non-existent wiki pages that are linked to

Description

This macro lists all wiki pages that are linked to but not created in wikis, ticket descriptions and ticket comments. That is, when a CamelCase identifier is listed in a wiki page, then a link is created to that page. However, if that page does not exist, then the link exists but the page is not created.

For example, MyPageAbc is a link to MyPageAbc, which does not exist.

To use this macro, add the following to the wiki page that you want to investigate non-existent wiki pages from:

[[WantedPages]] lists all wiki pages that are linked to, but do not exist.

[[WantedPages(show_referrers)]] does the same thing, but also lists the pages that contain the broken links.

[[WantedPages(ignored_referrers=<regex>)]] does the same thing, but ignores referring pages that match the regular expression <regex>, eg [[WantedPages(show_referrers,ignored_referrers=^Wiki[HP]|^Trac)]].

Note that the regex matches all or part of the name.

More options:

filter
alias for ignored_referrers
filtertype
flags whether filter option is inclusive or exclusive, with values inclusive or exclusive (is also default value for backward compatibility)

Examples:

  • ignore all pages that contain 'Trac' in their name:
    • [[WantedPages(show_referrers, ignored_referrers=Trac)]]
    • [[WantedPages(show_referrers, ignored_referrers=Trac, filtertype=exclusive)]]
    • [[WantedPages(show_referrers, filter=Trac)]]
    • [[WantedPages(show_referrers, filter=Trac, filtertype=exclusive)]]
  • only show pages that contain 'Trac' in their name:
    • [[WantedPages(show_referrers, ignored_referrers=Trac, filtertype=inclusive)]]
    • [[WantedPages(show_referrers, filter=Trac, filtertype=inclusive)]]

Bugs/Feature Requests

Existing bugs and feature requests for WantedPagesMacro are here.

If you have any issues, create a new ticket.

defect

14 / 14

enhancement

16 / 16

task

4 / 4

Download

Download the zipped source for 0.11 or 1.0+.

Source

You can check out WantedPagesMacro from here using Subversion, or browse the source with Trac.

Installation

You must have setuptools installed.

Run the following commands in the source directory:

python setup.py bdist_egg
cp dist/*.egg /path/to/projenv/plugins

General instructions on installing Trac plugins can be found on the TracPlugins page.

You also have to enable it in the trac.ini file:

[components]
wantedpages.* = enabled

Recent Changes

17745 by rjollos on 2020-05-16 18:07:30
TracWantedPages 0.6dev: Format referrers as TracLinks

Avoid expanding wanted pages as macros.

Fixes #12803.

17744 by rjollos on 2020-05-15 22:58:06
TracWantedPages 0.6dev: Conform to coding style
17735 by rjollos on 2020-05-10 20:39:50
TracWantedPages 0.6dev: Adapt to Trac 1.0+

Please uninstall old version before installing:

$ pip uninstall WantedPages

Fixes #13815.

(more)

Author/Contributors

Author: jfrancis
Maintainer: Geert
Contributors:

Last modified 2 months ago Last modified on May 16, 2020, 6:15:48 PM