Sandbox

From syn2cat - HackerSpace.lu
(Difference between revisions)
Jump to: navigation, search
m (Maps)
 
(147 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== Poll ==
+
== More Sandboxes ==
 +
{{#ask: [[Category:Sandbox]] |format=ul}}
  
Test
+
Please only edit this page below this entry.
  
<poll>
+
== modifying pages automatically ==
Do you like this extension?
+
Attendees of peacemissions 28C3:
Yes
+
{{#arraymap: {{#ask:[[PeaceMissions 28C3]]
No
+
|?Has attendee
I don't know yet.
+
|format=list
</poll>
+
|limit=20
 +
|headers=hide
 +
|link=none
 +
|offset=0
 +
|mainlabel=-
 +
}}
 +
|,|x|{{#sub:x|5|0}}
 +
}}
  
== Today query ==
+
* Do Announce: {{#show: PeaceMissions 28C3 | ?Do Announce |link=none | offset=0}}
 +
* U19: {{#show: PeaceMissions 28C3 | ?Is U19 |link=none | offset=0}}
  
Now is {{CURRENTTIME}} (Which is Servertime-1) ?!
+
* {{#autoedit:form=Event
 +
|target=PeaceMissions 28C3
 +
|link text=Do stuff (and reload)
 +
|query string=Event[attendees]={{#arraymap:
 +
{{#ask:[[PeaceMissions 28C3]]
 +
|?Has attendee
 +
|format=list
 +
|limit=20
 +
|headers=hide
 +
|link=none
 +
|offset=0
 +
|mainlabel=-
 +
}}
 +
|,|x|{{#sub:x|5|0}}
 +
}}, {{#nickname:}} |query string=Event[announce]={{#show: PeaceMissions 28C3 | ?Do Announce |link=none | offset=0}}|query string=Event[u19]={{#show: PeaceMissions 28C3 | ?Is U19 |link=none | offset=0}} | reload }}
  
Let the weirdness begin:
+
* {{#autoedit:form=Event
 +
|target=PeaceMissions 28C3
 +
|link text=Do stuff (and reload, ORIG)
 +
|query string=Event[attendees]={{#arraymap:
 +
{{#ask:[[PeaceMissions 28C3]]
 +
|?Has attendee
 +
|format=list
 +
|limit=20
 +
|headers=hide
 +
|link=none
 +
|offset=0
 +
|mainlabel=-
 +
}}
 +
|,|x|{{#sub:x|5|0}}
 +
}}, {{#nickname:}} | reload }}
  
<pre>
+
== Instant Commons ==
    * This page was last modified on 20 November 2009, at 18:31.
+
[[Image:Finger Prints of The Gods by Graham Hancock.jpg|thumb]]
    * This page has been accessed 1,758 times.
+
    * Content is available under Attribution-Share Alike 3.0 Unported.
+
    * Privacy policy
+
    * About syn2cat - HackerSpace.lu
+
    * Disclaimers
+
  
Powered by MediaWiki 1.15.1
+
== Time ==
</pre>
+
{{#show: 26C3 |?EndDate }}
 +
{{#ifexpr:{{#timel: U | {{{EndDate|}}} }}<{{#time: U }}|<div style="border: 2px solid #007A20; padding: 0.5em 1em 0.3em 0.5em; color: #007A20;">
 +
'''Note:''' this article is about a passed event.
 +
</div>|}}
 +
=== more time===
 +
{{#ifexpr: {{#timel: U | {{#show: 26C3 |?EndDate }} }} < {{#time: U }} |<div style="border: 2px solid #007A20; padding: 0.5em 1em 0.3em 0.5em; color: #007A20;">
 +
'''Note:''' this article is about a passed event.
 +
</div>|}}
 +
{|
 +
|-
 +
| test || test2
 +
|}
  
A date that has a time is > than one that does not. :(<br/>
+
Time: {{#time: U }}<br/>
This should be a workable workaround:
+
Localtime: {{#timel: U }}
  
<pre>
+
== QrCode ==
{{#ask:[[Category:Event||ExternalEvent||Workshop||Meeting]]
+
=== this page's url ===
[[Is Recurring::no]]
+
{{#qrcode:}}
[[StartDate::>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY}} 00:00]]
+
{{#qrcode: scheme=https }}
[[StartDate::<{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY}} 23:59]]
+
 
| ?StartDate=
+
=== any other text and different settings ===
| intro='''TODAY''':_
+
{{#qrcode: ecc=Q | size=4 | boundary=5 | label=YAQRC }}
| searchlabel=
+
{{#qrcode: ecc=L | size=3 | boundary=2 | label=NewTest }}
 +
{{#qrcode: ecc=L | size=3 | boundary=2 | label=http://www.google.com }}
 +
{{#qrcode: ecc=L | size=3 | boundary=2 | label=études en Ümläüt mes Ömis }}
 +
 
 +
== Calendaring ==
 +
=== all-time event timeline ===
 +
{{#ask:
 +
[[Category:Event||Project]] [[Is Recurring::no]]
 +
| ?StartDate=Start date
 +
| ?EndDate=End date
 +
| ?Has location=Location
 
| sort=StartDate
 
| sort=StartDate
| limit=1
+
| order=desc
| format=list
+
| format=timeline
 +
| timelinebands=WEEK,MONTH
 +
| timelineposition=start
 +
| limit=342
 
}}
 
}}
</pre>
+
=== all-time press cutting timeline ===
{{#ask:[[Category:Event||ExternalEvent||Workshop||Meeting]]
+
There are only so many press cuttings listed as have been semantically annotated.
[[Is Recurring::no]]
+
{{#ask:
[[StartDate::>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY}} 00:00]]
+
[[Is presscutting::true]]
[[StartDate::<{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY}} 23:59]]
+
| mainlabel=-
| ?StartDate=
+
| ?Has heading
| intro='''TODAY''':_
+
| ?Has date
| searchlabel=
+
| ?=File
| sort=StartDate
+
| sort=Has date
| limit=3
+
| order=desc
| format=list
+
| format=timeline
 +
| timelinebands=WEEK,MONTH
 +
| timelineposition=start
 +
| limit=342
 
}}
 
}}
  
And with Currenttime instead of 00:00: (which isn't really what the TODAY query is all about.)
+
=== Improving Event table ===
{{#ask:[[Category:Event||ExternalEvent||Workshop||Meeting]]
+
'''Todo:''' Try to run a subquery, determining the nearest, specific date for recurrent events
[[Is Recurring::no]]
+
{{#ask:
[[StartDate::>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY}} {{CURRENTTIME}} ]]
+
[[Category:Event]]
[[StartDate::<{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY}} 23:59]]
+
[[EndDate::>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY}} 00:00]]  
| ?StartDate=
+
| mainlabel=Event
| intro='''TODAY''':_
+
| searchlabel=
+
 
| sort=StartDate
 
| sort=StartDate
| limit=1
+
| order=asc
| format=list
+
| format=broadtable
}}
+
| default=There are currently no events scheduled. See our '''[[Calendar]]''' page for previous events.
 +
| limit=6
 +
| outro=See our '''[[Calendar]]''' page for a complete list of events, additional formats and ways to [[Calendar#Add_your_Event|add yours]].
 +
| ? StartDate = From
 +
| ? EndDate = Till
 +
| ? Has location=Location}}
  
As well as a NOW query:
+
This is what is currently shown on the Frontpage, not showing recurring events.
{{#ask:[[Category:Event||ExternalEvent||Workshop||Meeting]]
+
 
[[Is Recurring::no]]
+
{{#ask:
[[StartDate::<{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY}} {{CURRENTTIME}} ]]
+
[[Category:Event]] [[Is Recurring::no]] <!-- recurring events do not show the correct dates -->
[[EndDate::<{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY}} {{CURRENTTIME}} ]]
+
[[EndDate::>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY}} 00:00]]  
| ?StartDate=
+
| mainlabel=Event
| intro='''NOW''':_
+
| searchlabel=
+
 
| sort=StartDate
 
| sort=StartDate
| limit=1
+
| order=asc
| format=list
+
| format=broadtable
 +
| default=There are currently no events scheduled. See our '''[[Calendar]]''' page for previous events.
 +
| limit=6
 +
| outro=See our '''[[Calendar]]''' page for a complete list of events, additional formats and ways to [[Calendar#Add_your_Event|add yours]].
 +
| ? StartDate = From
 +
| ? EndDate = Till
 +
| ? Has location=Location}}
 +
 
 +
== iCal in single Events ==
 +
{{#show: Ars Electronica 2010 |?Has location| ?StartDate = start |?EndDate = end |format=icalendar |icalendartitle= syn<sub>2</sub>cat event calendar}}
 +
 
 +
=== trying to implode stuff ===
 +
with <pre>{{#explode:{{#sub:{{{1}}}|3}}|{{!}}|0}}</pre>
 +
 
 +
{{#show: Ars Electronica 2010 |?Has Pagename |?Has location| ?StartDate = start |?EndDate = end |format=template |template=iCalSummary}}
 +
 
 +
== Maps  ==
 +
{|
 +
|-
 +
! Google Maps !! OSM !! Openlayers !! Openlayers2 with tilde !! Openlayers with coordinates (old) !! Openlayers with onthefly geocoding !! Openlayers with coordinates
 +
|-
 +
|
 +
{{#display_point:
 +
49.4796075928° N, 6.07754230499° E
 +
| service=googlemaps
 +
| zoom=10
 +
| height=250
 +
| width=250
 +
| label=Label
 +
| title=Title
 +
}}
 +
|
 +
{{#display_point:
 +
49.4796075928° N, 6.07754230499° E
 +
| service=osm
 +
| zoom=10
 +
| height=250
 +
| width=250
 +
| controls=auto
 +
| label=Label
 +
| title=Title
 +
}}
 +
|
 +
{{
 +
#display_point:
 +
49.4796075928° N, 6.07754230499° E
 +
| service=openlayers
 +
| layers=osm,google-hybrid,nasa
 +
| zoom=10
 +
| height=250
 +
| width=250
 +
| label=Label
 +
| title=Title
 +
}}
 +
|
 +
{{#display_map:{{#show:Level2|?Has coordinates}}~{{Address|{{#show:Level2|?Has address}}|{{#show:Level2|?Has city}}|{{#show:Level2|?Has country}}}}~The event takes place here.;
 +
|layers=osm-mapnik, osm-cyclemap
 +
|service=openlayers
 +
|width=250
 +
|height=250
 +
|controls=pan,zoom,type
 +
}}
 +
|
 +
{{#display_map:49.591600, 6.140700
 +
|layers=osm-mapnik, osm-cyclemap
 +
|service=openlayers
 +
|width=250
 +
|height=250
 +
|controls=pan,zoom,type
 +
}}
 +
|
 +
{{#display_map:address={{Address|{{#show:Level2|?Has address}}|{{#show:Level2|?Has city}}|{{#show:Level2|?Has country}} }}
 +
|layers=osm-mapnik, osm-cyclemap
 +
|service=openlayers
 +
|width=250
 +
|height=250
 +
|controls=pan,zoom,type
 +
}}
 +
|
 +
{{#display_map:{{#show:Level2|?Has coordinates}}
 +
|layers=osm-mapnik, osm-cyclemap
 +
|service=openlayers
 +
|width=250
 +
|height=250
 +
|controls=pan,zoom,type
 
}}
 
}}
 +
|-
 +
| Works || becomes static || issue with tiles || issue with geographic coordinates || OSM cannot handle the tilde operator || geocoding on the fly
 +
|}
  
==External Data ==
+
{{#show:Level2|?Has address}}
  
asking for events from our wiki
+
{{Address|{{#show:Level2|?Has address}}|{{#show:Level2|?Has city}}|{{#show:Level2|?Has country}}}}
{{#get_external_data:https://www.hackerspace.lu/wiki/Special:Ask?title=Special%3AAsk&q=[[Category%3AEvent]]%0D%0A[[StartDate%3A%3A%2B]]&po=%3FStartDate&sc=0&eq=yes&p=format%3Dcsv&sep=%3D,|CSV with Header|event=|startdate=StartDate}}
+
{{#for_external_table: * {{{event}}} starts on {{{startdate}}} <br/> }}
+
  
asking for external data from hackerspaces.org
+
{{#show:Level2|?Has coordinates}}~{{Address|{{#show:Level2|?Has address}}|{{#show:Level2|?Has city}}|{{#show:Level2|?Has country}}}}
{{#get_external_data:http://hackerspaces.org/wiki/Special:Ask?title=Special%3AAsk&q=[[Category%3AEvent]]%0D%0A&po=%3FStart%20date%0D%0A%3Ftitle%0D%0A&sc=0&eq=yes&p=format%3Dcsv&sep=%3D,|CSV with Header|event=title|startdate=Start date}}
+
{{#for_external_table: * {{{event}}} has {{{startdate}}} <br> }}
+
  
asking for opendoors startdate from our wiki
+
=== data from location ===
{{#get_external_data:https://www.hackerspace.lu/wiki/Special:Ask/-5B-5BOpenDoors-5D-5D/-3FStartDate/-3FEndDate/format%3Dcsv/sep%3D,|csv with header|sdate=StartDate|edate=EndDate}}
+
* Opendoors has StartDate {{#external_value:sdate}} and ends on {{#external_value:edate}}
+
  
asking for smw sample data from semanticweb.org:
+
{{#show: Hackerspace, Strassen|?Has coordinates}}~{{Address|{{#show:Hackerspace, Strassen|?Has address}}|{{#show:Hackerspace, Strassen|?Has city}}|{{#show:Hackerspace, Strassen|?Has country}}}}~The event takes place here.;
{{#get_external_data:http://semanticweb.org/wiki/Special:Ask/-5B-5BGermany-5D-5D/-3FBorders/-3FPopulation/-3FArea/format%3Dcsv/sep%3D,|csv with header|bordered countries=borders|population=population|area=area}}
+
* Germany has area {{#external_value:area}}.
+
  
== OggHandler ==
+
"{{#show:Hackerspace, Strassen|?Has country}}"
* [[File:Episode One.bis.ogg|noicon]]
+
* [[File:Episode One.bis.ogg|noplayer]]
+
* [[File:Episode One.bis.ogg|Download]]
+
  
== FlashMP3 ==
+
{{#display_point:{{#show: Hackerspace, Strassen|?Has coordinates}}~{{Address|{{#show:Hackerspace, Strassen|?Has address}}|{{#show:Hackerspace, Strassen|?Has city}}|{{#show:Hackerspace, Strassen|?Has country}}}}~The event takes place here.;}}
  
Howto: http://www.mediawiki.org/wiki/Extension:FlashMP3
+
==== Geocoding? ====
 +
Munich is at: [[has coordinates::{{#geocode:Munich}}]]
  
* <flashmp3>02 - Mineralogique.mp3</flashmp3>
+
Editing maps with [[MapsSandbox|geocoding]] input field?
  
== amazon ==
+
==== Extracting coordinates from locations ====
Note: if you don't see anything, maybe try turning Adblock off :D<br/>
+
* {{#show: BCC | ?Has coordinates}}
Single box: <amazon type="single" asin="0764588877">Circuit Bending</amazon><br/>
+
Single direkt link without preview: <amazon type="link" asin="0141000511">Hackers</amazon><br/>
+
Single direkt link with preview: <amazon type="link" preview="true" asin="0764588877">Circuit Bending</amazon><br/>
+
Single search link: <amazon type="link" keywords="hacker, hacking" limitto="english-books">Books for Hackers</amazon>
+
  
Older Sandbox stuff on [[Sandbox/2]]
+
==== Complex multi-level queries ====
  
== Workshops ==
+
{{#ask: [[Hx2]]
Without recurring events:
+
| ?Has waypoint
 +
| headers=hide
 +
| format=list
 +
| link=none
 +
| sep= $
 +
}}
  
{{#ask: [[Category:Workshop]] [[Is Recurring::no]]
+
----
[[StartDate::>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY}} 00:00]]
+
 
[[EndDate::>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY}} {{CURRENTTIME}}]]  
+
{{#ask: [[Hx2]]
| mainlabel=Workshop
+
| ?Has waypoint
| sort=StartDate
+
| format=list
| order=asc
+
| template=Waypoints
| format=broadtable
+
| link=none
| default=There are currently no workshops scheduled.<br/>[[Form:Workshop|Propose one]]!
+
| sep="
| limit=99
+
| ? StartDate = From
+
| ? EndDate = Till
+
| ? Location
+
| ? WorkshopLeader=Contact
+
 
}}
 
}}
  
 
----
 
----
With recurring events:
+
 
{{#ask: [[Category:Workshop]]
+
{{#ask: [[Hx2]]
[[StartDate::>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY}} 00:00]]
+
| ?Has waypoint
[[EndDate::>{{CURRENTYEAR}}-{{CURRENTMONTH}}-{{CURRENTDAY}} {{CURRENTTIME}}]]
+
| format=template
| mainlabel=Workshop
+
| template=Waypoints
| sort=StartDate
+
| link=none
| order=asc
+
| sep=/
| format=broadtable
+
| default=There are currently no workshops scheduled.<br/>[[Form:Workshop|Propose one]]!
+
| limit=99
+
| ? StartDate = From
+
| ? EndDate = Till
+
| ? Location
+
| ? WorkshopLeader=Contact
+
 
}}
 
}}
  
== Improved Calendar ==
+
----
{{#ask:
+
 
[[Category:Event||ExternalEvent||Workshop||Meeting]]
+
{{#ask: [[Hx2]]
[[EndDate::>{{#calendarstartdate:}}]]
+
| ?Has waypoint
[[StartDate::<{{#calendarenddate:}}]]
+
| format=ul
| ?Has date
+
| template=Waypoints
| ?Location
+
| link=none
| format=calendar
+
| sep=/
 
}}
 
}}
 +
 +
----
 +
 +
<!--
 +
 +
{{#display_points:
 +
 +
{{#arraymap:
 +
 +
  {{#ask: [[Hx2]]
 +
  | ?Has waypoint
 +
  | format=list
 +
  | sep="
 +
  | link=none
 +
  }}
 +
 +
|"
 +
|x
 +
| {{#show: x | ?Has coordinates}}~text~more text;
 +
}}
 +
 +
|width=250
 +
|height=250
 +
|controls=small
 +
}}
 +
<br/>
 +
----
 +
 +
{{#display_point:
 +
{{#show: {{{location|}}} | ?Has address}}, {{#show: {{{location|}}} | ?Has city}}, {{#show: {{{location|}}} | ?Has country}}~{{Address | {{#show: {{{location|}}} | ?Has address }} | {{#show: {{{location|}}} | ?Has city}}|{{#show: {{{location|}}} | ?Has country}} }}~The event takes place here.;
 +
|width=250
 +
|height=250
 +
|controls=small
 +
}}
 +
{{#arraymap:{{{attendees|}}}|,|x|[[Has attendee::User:x|x]]}}
 +
-->
 +
 +
== Cite ==
 +
 +
"Alea jacta est" <ref>Julius Caesar: De bello gallico</ref>
 +
 +
==counting properties ==
 +
<pre>{{#ask: [[Mailing-Lists]] | ?Mailing list |format=count}} <br/></pre>
 +
At the moment of writing, this should be 5, and it is: {{#ask: [[Mailing-Lists]] | ?Mailing list |format=count}} <br/>
 +
Either the query is wrong or SMW is very buggy.
 +
 +
If we list them, we see that it seems to be 1 page with 5 instances of that property:
 +
{{#ask: [[Mailing-Lists]] | ?Mailing list |format=ol}} <br/>
 +
 +
==tagcloud==
 +
 +
<tagcloud/>
 +
 +
==percentage meter==
 +
{{PercentageMeter|28|total=42}}
 +
 +
----
 +
<references/>
 +
 +
[[Category:Sandbox]]

Latest revision as of 12:48, 7 September 2014

Contents

[edit] More Sandboxes


Please only edit this page below this entry.

[edit] modifying pages automatically

Attendees of peacemissions 28C3: Lala, Sid, Muling, Gunstick, The metalgamer, Prometheus, Destructive, Kwisatz

  • Do Announce: yes
  • U19: no
  • Do stuff (and reload)
  • Do stuff (and reload, ORIG)

[edit] Instant Commons

[edit] Time

30 December 2009 00:00:00

[edit] more time

Note: this article is about a passed event.

test test2

Time: 1732335878
Localtime: 1732339478

[edit] QrCode

[edit] this page's url

QR-ee71b7d25b2eaf3caa9435d856bb7c22.png QR-ee71b7d25b2eaf3caa9435d856bb7c22.png

[edit] any other text and different settings

QR-c4cfa629bfa6dffe5dfbbc9e4965d050.png QR-308567c7408d009400eaff3fd8b61027.png QR-ed646a3334ca891fd3467db131372140.png QR-d67036abd87e13f51e0584ff21b70514.png

[edit] Calendaring

[edit] all-time event timeline

You need to have JavaScript enabled to view the interactive timeline. Further results for this query.

[edit] all-time press cutting timeline

There are only so many press cuttings listed as have been semantically annotated.

You need to have JavaScript enabled to view the interactive timeline. Further results for this query.

[edit] Improving Event table

Todo: Try to run a subquery, determining the nearest, specific date for recurrent events There are currently no events scheduled. See our Calendar page for previous events.

This is what is currently shown on the Frontpage, not showing recurring events.

There are currently no events scheduled. See our Calendar page for previous events.

[edit] iCal in single Events

… further results

[edit] trying to implode stuff

with
{{#explode:{{#sub:{{{1}}}|3}}|{{!}}|0}}



[edit] Maps

Google Maps OSM Openlayers Openlayers2 with tilde Openlayers with coordinates (old) Openlayers with onthefly geocoding Openlayers with coordinates
Loading map...
Loading map...
Loading map...
Loading map...
Loading map...
Loading map...
Loading map...
Works becomes static issue with tiles issue with geographic coordinates OSM cannot handle the tilde operator geocoding on the fly

87, route de Thionville

87, route de Thionville, Luxembourg, Luxembourg

49° 35' 29.76", 6° 8' 26.52"~87, route de Thionville, Luxembourg, Luxembourg

[edit] data from location

~11, rue du Cimetière, L-8018 Strassen, Luxembourg~The event takes place here.;

"Luxembourg"

Loading map...

[edit] Geocoding?

Munich is at: The following coordinate was not recognized: div><span class="errorbox">Fatal error: Failed to parse or geocode</span></div><br /><br />.The following coordinate was not recognized: div><span class="errorbox">Fatal error: Failed to parse or geocode</span></div><br /><br />.

Editing maps with geocoding input field?

[edit] Extracting coordinates from locations

[edit] Complex multi-level queries

Syn2cat goes Hx² (Pavillon Hueflach, Strassen$ Luftfahrtmuseum, Finowfurt, Germany)



Syn2cat goes Hx²


Syn2cat goes Hx²




Syn2cat goes Hx²


Syn2cat goes Hx²






[edit] Cite

"Alea jacta est" [1]

[edit] counting properties

{{#ask: [[Mailing-Lists]] | ?Mailing list |format=count}} <br/>

At the moment of writing, this should be 5, and it is: 1
Either the query is wrong or SMW is very buggy.

If we list them, we see that it seems to be 1 page with 5 instances of that property:

  1. Communicate (Mailing list syn2cat-announce, syn2cat-discuss, graffitiresearchlab)

[edit] tagcloud

<tagcloud/>

[edit] percentage meter

Pledged: € 28 (66.7%) Missing: € 14 (33.3%)



  1. Julius Caesar: De bello gallico
Personal tools
Namespaces

Variants
Actions
Navigation
syn2cat
Hackerspace
Activities
Initiatives
Community
Tools
Tools