[pmwiki-users] random musings

Waylan Limberg waylan at gmail.com
Fri Dec 16 12:27:58 CST 2005


On 12/16/05, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> Some random musings and questions to see if anyone has comments,
> ideas, or suggestions...
>

>
> 2. Wildcards
> Conditional markup needs a bit of work.  I'd like to work wildcards
> ('*' and '?') into conditionals and pagelists somehow, but I can't
> seem to come up with the proper names for the options.  Currently
> we have available
>
>     (:if group Profiles:)        # page is in Profiles group
>     (:if name HomePage:)         # page is named "HomePage" (in any group)
>     (:if match <pattern>:)       # page's name matches pattern (a regexp)
>     (:pagelist group=Profiles:)  # pages in Profiles group
>     (:pagelist list=normal:)     # pages matching "normal" selection
>
> One option is to just allow wildcards directly on "group" and "name"
> values in conditionals, so that
>
>     (:if group PmWiki* :)        # any group begining with "PmWiki"
>     (:pagelist group=PmWiki* :)  # all pages in groups starting with "PmWiki"
>     (:if name A*:)               # any page starting with "A"
>
> But how to match both group and name simultaneously?  For consistency
> with other markups, do we just use "fullname"?  (Somehow I think it's
> a big ugly.)
>
>     (:if fullname PmWiki.A* :)   # pages starting with "A" in the PmWiki group
>     (:pagelist fullname=2005.Blog* :)  # "Blog*" pages in the 2005 group
>
> Hmm, I guess "fullname" isn't so bad.  Lists of wildcards will also be
> allowed
>
>     (:pagelist fullname=2005.Blog*,2006.Blog*:)
>
> as well as negations
>
>     (:pagelist fullname=-*.HomePage,-*.RecentChanges:)
>

Just wanted to check that this would work as well:
      (:if fullname *Wiki*.*A* :)
Not that I'd ever use that exact example, but it covers all the bases.


--
----
Waylan Limberg
waylan at gmail.com




More information about the pmwiki-users mailing list