Difference between revisions of "Test article structure"

From FollowTheScore
Jump to: navigation, search
(New page: {{subst::Test includematch}})
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Type Test
 
{{Type Test
  |parameter = includematch
+
  |parameter = multisecseparators
 
}}
 
}}
  
=== all of the data (no filtering using includematch) ===
+
== We show the chapter names of all articles on African countries ==
<pre>
 
<dpl>
 
category=African Country
 
includepage={African Country}:languages,{African Country}:goverment,{African Country}:area,{African Country}:population,{African Country}:gdp,{African Country}:independence_day
 
mode=userformat
 
listseparators=¶{|class=sortable ¶!No ¶! Name ¶! Languages ¶! Government ¶! Area ¶! Population ¶! GDP ¶! Independence Day , ¶|-¶|%NR%¶|[[%PAGE%]] , ,¶|}
 
secseparators=¶|
 
</dpl>
 
</pre>
 
<dpl>
 
category=African Country
 
includepage={African Country}:languages,{African Country}:goverment,{African Country}:area,{African Country}:population,{African Country}:gdp,{African Country}:independence_day
 
mode=userformat
 
listseparators=¶{|class=sortable ¶!No ¶! Name ¶! Languages ¶! Government ¶! Area ¶! Population ¶! GDP ¶! Independence Day , ¶|-¶|%NR%¶|[[%PAGE%]] , ,¶|}
 
secseparators=¶|
 
</dpl>
 
 
 
=== includematch=/languages\s*=\s*.*English.*/s (which countries speak English?) ===
 
<pre>
 
<dpl>
 
category=African Country
 
includepage={African Country}:languages,{African Country}:goverment,{African Country}:area,{African Country}:population,{African Country}:gdp,{African Country}:independence_day
 
mode=userformat
 
listseparators=¶{|class=sortable ¶!No ¶! Name ¶! Languages ¶! Government ¶! Area ¶! Population ¶! GDP ¶! Independence Day , ¶|-¶|%NR%¶|[[%PAGE%]] , ,¶|}
 
secseparators=¶|
 
resultsheader=Number of data = %PAGES%
 
includematch=/languages\s*=\s*.*English.*/s
 
</dpl>
 
</pre>
 
<dpl>
 
category=African Country
 
includepage={African Country}:languages,{African Country}:goverment,{African Country}:area,{African Country}:population,{African Country}:gdp,{African Country}:independence_day
 
mode=userformat
 
listseparators=¶{|class=sortable ¶!No ¶! Name ¶! Languages ¶! Government ¶! Area ¶! Population ¶! GDP ¶! Independence Day , ¶|-¶|%NR%¶|[[%PAGE%]] , ,¶|}
 
secseparators=¶|
 
resultsheader=Number of data = %PAGES%
 
includematch=/languages\s*=\s*.*English.*/s
 
</dpl>
 
  
=== includenotmatch=/languages\s*=\s*.*English.*/s (which countries do not speak English?) ===
+
<pre><nowiki>
<pre>
+
  <dpl>
<dpl>
+
    resultsheader=__NOTOC____NOEDITSECTION__\n
category=African Country
+
    category=Fictitious country
includepage={African Country}:languages,{African Country}:goverment,{African Country}:area,{African Country}:population,{African Country}:gdp,{African Country}:independence_day
+
    namespace=
mode=userformat
+
    include=##.+[0 &nbsp;]
listseparators={|class=sortable ¶!No ¶! Name ¶! Languages ¶! Government ¶! Area ¶! Population ¶! GDP ¶! Independence Day , ¶|-¶|%NR%|[[%PAGE%]] , ,|}
+
    format={|class=wikitable,\n|[[%PAGE%|%TITLE%]],\n|--,\n|}
secseparators=|
+
    secseparators=\n|%SECTION%\n|,\n|--,
resultsheader=Number of data = %PAGES%
+
    multisecseparators=\n|%SECTION%\n|,\n|--,
includenotmatch=/languages\s*=\s*.*English.*/s
+
  </dpl>
</dpl>
+
</nowiki></pre>
</pre>
 
<dpl>
 
category=African Country
 
includepage={African Country}:languages,{African Country}:goverment,{African Country}:area,{African Country}:population,{African Country}:gdp,{African Country}:independence_day
 
mode=userformat
 
listseparators=¶{|class=sortable ¶!No ¶! Name ¶! Languages ¶! Government ¶! Area ¶! Population ¶! GDP ¶! Independence Day , |-¶|%NR%¶|[[%PAGE%]] , ,¶|}
 
secseparators=|
 
resultsheader=Number of data = %PAGES%
 
includenotmatch=/languages\s*=\s*.*English.*/s
 
</dpl>
 
  
=== includematch=/independence_day\s*=\s*..\/07\/..../s (which country was "born" on July ?) ===
 
<pre>
 
<dpl>
 
category=African Country
 
includepage={African Country}:languages,{African Country}:goverment,{African Country}:area,{African Country}:population,{African Country}:gdp,{African Country}:independence_day
 
mode=userformat
 
listseparators=¶{|class=sortable ¶!No ¶! Name ¶! Languages ¶! Government ¶! Area ¶! Population ¶! GDP ¶! Independence Day , ¶|-¶|%NR%¶|[[%PAGE%]] , ,¶|}
 
secseparators=¶|
 
resultsheader=Number of data = %PAGES%
 
includematch=/independence_day\s*=\s*..\/07\/..../s
 
</dpl>
 
</pre>
 
 
<dpl>
 
<dpl>
category=African Country
+
  resultsheader=__NOTOC____NOEDITSECTION__\n
includepage={African Country}:languages,{African Country}:goverment,{African Country}:area,{African Country}:population,{African Country}:gdp,{African Country}:independence_day
+
  category=Fictitious country
mode=userformat
+
  namespace=
listseparators={|class=sortable ¶!No ¶! Name ¶! Languages ¶! Government ¶! Area ¶! Population ¶! GDP ¶! Independence Day , ¶|-¶|%NR%|[[%PAGE%]] , ,|}
+
  include=##.+[0 &nbsp;]
secseparators=|
+
  format={|class=wikitable,\n|[[%PAGE%|%TITLE%]],\n|--,\n|}
resultsheader=Number of data = %PAGES%
+
  secseparators=\n|%SECTION%\n|,\n|--,
includematch=/independence_day\s*=\s*..\/07\/..../s
+
  multisecseparators=\n|%SECTION%\n|,\n|--,
 
</dpl>
 
</dpl>

Latest revision as of 11:42, 3 May 2008

Test multisecseparators

We show the chapter names of all articles on African countries

  <dpl>
    resultsheader=__NOTOC____NOEDITSECTION__\n
    category=Fictitious country
    namespace=
    include=##.+[0  ]
    format={|class=wikitable,\n|[[%PAGE%|%TITLE%]],\n|--,\n|}
    secseparators=\n|%SECTION%\n|,\n|--,
    multisecseparators=\n|%SECTION%\n|,\n|--,
  </dpl>


DPL Example 007 main page 1 #.+
Nigunda Religion
Nigunda Test History
Somango Religion