Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
Test /
WildcardLinkSyntax
Some ideas about supporting wildcards for link= and linkto= options: Use casesAll pages with links to XYZ linkto=XYZ All pages in category XYZ linkto=Category.XYZ All pages with links to pages in Main/ linkto=Main.* All pages with links to pages in Main/ except for Main.HomePage linkto=Main.*,-Main.HomePage
Pages not in Category.XYZ nolinkto=Category.XYZ Pages not in any Category nolinkto=Category.* All pages linked from XYZ linkfrom=XYZ All pages linked from pages in Main linkfrom=Main.* All pages linked from Cookbook pages other than Cookbook.Skins linkfrom=Cookbook.*,-Cookbook.Skins "Wanted pages" -- missing pages linked from pages other than RecentChanges linkfrom=-*.*RecentChanges if="!exists {=$FullName}"
"Orphan pages" -- pages not linked from any other page (excluding RecentChanges) nolinkfrom=-*.*RecentChanges
The union of pages in Category.ABC and Category.XYZ linkto=Category.XYZ,Category.ABC The intersection of pages in Category.ABC and Category.XYZ ...?
(see "Notes and Discussion" below)
Underlying modelAll values (the things appearing on the right side of the equals sign) represent lists of pages to be tested. The values may be wildcarded, thus a value of 'Main.*,PmWiki.*,-*.RecentChanges' means "all of the pages in the Main and PmWiki groups except for Main.RecentChanges and PmWiki.RecentChanges". The option key determines the type of test to be performed: linkto=... All pages with links to any of the pages in the list
linkfrom=... All pages linked from any of the pages in the list
nolinkto=... All pages not linked to any of the pages in the list
nolinkfrom=... All pages not linked from any of the pages in the list
As conditionalsThese options to pagelist might also be available as conditionals, thus something like Notes and discussionMore important than the symbol used is setting a flexible system for future intersection needs. I propose:
A problem with the above formulation is that "DO NOT link to that" is specified by nolinkto=, not by a negative value to linkto. The two are different: linkto=-Main.That # pages with links to any page other than Main.That
nolinkto=Main.That # pages that do not have a link to Main.That
I've also been playing with the notion of using '+' to indicate "required", thus one could do the following to indicate multiple required terms. linkto=+Main.This,+Main.That At the moment I don't have a strong compulsion to incorporate grouping operators or full-fledge set operations, unless we come up with some real use cases where they would be needed (PmWikiPhilosophy #3). Makes sense in all cases, but I wonder if using '-' instead of the 'no'-prefix would work better because we already use that for negation for group=, name=, etc. Do you mean we should have "-linkto=..." and "-linkfrom=..." as options? Or something else? (by way of establishing prior art: we already have things like "nolinkwikiwords", "nolinebreaks", "nogroupheaders", "noleft", "noright", etc.) --Pm This is a long time after the discussion, but just some thoughts... Basically my thought is to have a space be an "and" operator and a comma be an "or" operator. Obviously anybody including the space would need to be careful to put quotes around everything to hold it together... A single level of parentheses would help with a lot of flexibility. Negation indicated through prefixed "-".
This is similar to the syntax for the search engine on ebay. It seems pretty consistent with the nomenclature used elsewhere in pmwiki where comma is always "or" whereas multiple terms in a pagelist are separated by space and imply boolean "and". Peter Bowers March 14, 2009, at 08:04 AM See FPLTemplate-Talk for an alternate solution to this and see http://pmwiki.qdk.org/pmwiki.php/PageListPlus/PageList for a live test. References
|
0: 00.00 00.00 config start 1: 00.00 00.00 config end 2: 00.07 00.06 MarkupToHTML begin 3: 00.28 00.25 ReadApprovedUrls SiteAdmin.ApprovedUrls begin 4: 00.29 00.26 ReadApprovedUrls SiteAdmin.ApprovedUrls end 5: 00.44 00.40 MarkupToHTML end 6: 00.45 00.41 MarkupToHTML begin 7: 00.52 00.46 MarkupToHTML end 8: 00.52 00.46 MarkupToHTML begin 9: 00.53 00.48 MarkupToHTML end 10: 00.54 00.48 now