Recurring events: Difference between revisions
(Created page with "{{Welcome}} <div style="position:relative; margin: 15px 0 0.5em 1em; border-collapse: collapse; background: #fff; float: right; clear: right; width: 250px; "> <div> {{Video |provider=YouTube |description=Semantic MediaWiki for Beginners |id=1CaNJLsAI2A |type=Tutorial video }} </div> <div> {{Video |provider=YouTube |description=Semantic MediaWiki for Beginners |id=N5rlX9yCqDo |type=Tutorial video }} </div> </div> == How to create a quality example? == If you have...") |
No edit summary |
||
| Line 1: | Line 1: | ||
== Example data == | |||
<pre> | |||
< | {{#set_recurring_event:some | ||
{{ | |property=has date | ||
| | |Has page=Recurring events | ||
| | |Has text=Simple recurring events text | ||
| | |start=June 8, 2022 | ||
| | |unit=week | ||
|period=1 | |||
|limit=10 | |||
|duration=7200 | |||
|include=March 16, 2012;March 23, 2023|+sep=; | |||
|exclude=March 15, 2012;March 22, 2023|+sep=; | |||
}} | }} | ||
</ | </pre> | ||
{{#set_recurring_event:some | |||
{{ | |property=has date | ||
| | |Has page=Recurring events | ||
| | |Has text=Simple recurring events text | ||
| | |start=June 8, 2022 | ||
| | |unit=week | ||
|period=1 | |||
|limit=10 | |||
|duration=7200 | |||
|include=March 16, 2012;March 23, 2013|+sep=; | |||
|exclude=March 15, 2012;March 22, 2013|+sep=; | |||
}} | }} | ||
== | == Example query == | ||
=== broadtable === | |||
<pre> | |||
{{#ask: | |||
[[Has page::Recurring events]] | |||
== | |?Has date | ||
|limit=5 | |||
|format=broadtable | |||
}} | |||
</pre> | |||
== | {{#ask: | ||
[[Has page::Recurring events]] | |||
|?Has date | |||
|limit=5 | |||
== | |format=broadtable | ||
}} | |||
or | |||
<pre> | |||
{{#ask: | |||
[[Has page::Recurring events]] | |||
|?Has date#ISO | |||
|limit=5 | |||
|format=broadtable | |||
}} | |||
</pre> | |||
{{#ask: | {{#ask: | ||
[[Has page::Recurring events]] | |||
|?Has date#ISO | |||
|?Has | |limit=5 | ||
| | |||
|format=broadtable | |format=broadtable | ||
}} | }} | ||
== | === eventcalendar === | ||
In case the <code>format=eventcalendar</code> is available then the results will be as displayed as calendar otherwise a simple table is used. | |||
<pre> | |||
{{#ask: | {{#ask: | ||
[[Has page::Recurring events]] | |||
[[ | |?Has text | ||
|?Has | |?Has date | ||
|?Has | |limit=5 | ||
| | |format=eventcalendar | ||
|format= | |start=latest | ||
| | }} | ||
</pre> | |||
{{#ask: | |||
[[Has page::Recurring events]] | |||
|?Has text | |||
|?Has date | |||
|limit=5 | |||
|format=eventcalendar | |||
|start=latest | |||
}} | }} | ||
== | == iCalendar == | ||
{{#ask: | |||
[[Has page::Recurring events]] | |||
|?Has page | |||
|?Has text=summary | |||
|?Has date=start | |||
|limit=5 | |||
|format=table | |||
|title=Recurring events calendar | |||
|description=A test calender for recurring events as subobjects | |||
}} | |||
{{#ask: | {{#ask: | ||
[[ | [[Has page::Recurring events]] | ||
|?Has page | |||
|?Has | |?Has text=summary | ||
|?Has | |?Has date=start | ||
| | |limit=5 | ||
|format= | |format=iCalendar | ||
| | |title=Recurring events calendar | ||
|description=A test calender for recurring events as subobjects | |||
|searchlabel=Export for iCalendar | |||
}} | }} | ||
[[Category: | [[Category:Sample pages]] | ||
[[Category:Main Page sample pages]] | |||
[[Category:Semantic MediaWiki example]] | |||
[[Category:Semantic Result Formats example]] | |||
Latest revision as of 18:10, 30 January 2025
Example data
{{#set_recurring_event:some
|property=has date
|Has page=Recurring events
|Has text=Simple recurring events text
|start=June 8, 2022
|unit=week
|period=1
|limit=10
|duration=7200
|include=March 16, 2012;March 23, 2023|+sep=;
|exclude=March 15, 2012;March 22, 2023|+sep=;
}}
Example query
broadtable
{{#ask:
[[Has page::Recurring events]]
|?Has date
|limit=5
|format=broadtable
}}
| Has date | |
|---|---|
| Recurring events | 20 July 2022 |
| Recurring events | 17 August 2022 |
| Recurring events | 10 August 2022 |
| Recurring events | March 23, 2013 |
| Recurring events | 29 June 2022 |
| ... further results | |
or
{{#ask:
[[Has page::Recurring events]]
|?Has date#ISO
|limit=5
|format=broadtable
}}
| Has date | |
|---|---|
| Recurring events | 20 July 2022 |
| Recurring events | 17 August 2022 |
| Recurring events | 10 August 2022 |
| Recurring events | March 23, 2013 |
| Recurring events | 29 June 2022 |
| ... further results | |
eventcalendar
In case the format=eventcalendar is available then the results will be as displayed as calendar otherwise a simple table is used.
{{#ask:
[[Has page::Recurring events]]
|?Has text
|?Has date
|limit=5
|format=eventcalendar
|start=latest
}}