After a hard fight with vagarities subst: and #invoke :-( now {{Autore:Silvio Pellico|Giorno e mese di nascita}} into any it.wikisource page returns 24 giugno, and 24 giugno comes from wikidata element Q435151, P569, value 24 giugno 1789 (as seen by it language).

Autore:Silvio Pellico is so far a special "test page" untouched by default scripts, so the code runs for that Autore: page alone. 


2014-07-20 15:51 GMT+02:00 Alex Brollo <>:
I took a deeper look to and now I feel that what I wrote is not so banal; really I can access to any (scheduled) property of a wikidata element by basic template inclusion, from any page of it.wikisource; this is so far not possible by wikibase client. Il the same time, such a retrieval is completely transparent for wikidata server, that only works once, when updating the local linked page or when visualizing the page.

So far I can't do the same into Author and ns0 pages, since there's a conflict between it.source code to save page data (using onlyinclude) and the new code (using onlyinclude too), I hope to solve such a conflict. 


2014-07-19 23:13 GMT+02:00 Alex Brollo <>:

I admit that I didn't consider so far works by multiple authors; nevertheless a simple convention "put work page as subpage of first author" should solve the issue. Consider that I'm only thinking about a comfortable location for those works - they contain a #property:author call that retrieves the whole list of authors from the work element. 

As soon as I'll find some molti-author items into it.source I'll try in practice. 

Did you take a look to the code of out test work pages? I post this by bot:

*''Autore'': {{#property:autore}}
*''Titolo'': {{#property:titolo}}
*''Genere artistico'': {{#property:genere artistico}}
*''Lingua originale'': {{#property:lingua originale}}
*''Data di creazione'': {{#property:P571}}
*''Edizione'': {{#property:edizione}}

|autore= {{subst:#property:autore}}
|titolo= {{subst:#property:titolo}}
|genere artistico= {{subst:#property:genere artistico}}
|lingua originale= {{subst:#property:lingua originale}}
|data di creazione= {{subst:#property:P571}}
|edizione= {{subst:#property:edizione}}
[[Categoria:Opere di {{BASEPAGENAME}}|{{BASEPAGENAME}}]] [[Categoria:Opere]]

subst: into onlyinclude section transform the code into:

|autore= Silvio Pellico
|titolo= Le mie prigioni
|genere artistico= memorie
|lingua originale= italiano
|data di creazione=
|edizione= Le mie prigioni (Bocca, 1832)

So, the page converts into a normal template returning any data wrapped into switch; {{Autore:Silvio Pellico/Le mie prigioni|edizione}} returns Le mie prigioni (Bocca, 1832).


2014-07-19 20:46 GMT+02:00 Luiz Augusto <>:

Your idea is very interesting, but how to deal with works made by two or more authors?

[[WORKTITLE]] pointing to [[NewCustomNS:WORKTITLE]] containing a {{magicWikidataTemplate}} that automatically embebeds metadata from the associated [[d:QXXX]] page (including authorship metadata automagicallybeing set as categories) makes more sense to me. 

On Sat, Jul 19, 2014 at 10:20 AM, Alex Brollo <> wrote:
Wikidata property values are effectively retrieved by #property inclusion syntax, but it work only when used into the wikisource page directly linked to a wikidata element. 

An effective management of a  "book" (best, a literary work) needs creation of two different elements ("work" and "edition"); ns0 wikisource pages can be linked to "edition" wikidata element just as Author: pages are linked to author's wikidata element; on the contrary, presently there's no wikisource page that could be  linked to "work" wikidata element, so the data of the latter can't be retrieved into wikisource by #property inclusion syntax.

I'm testing a strange idea: to create wikisource "work" pages as subpages of author's page. It seems a nonsense location, but it has a long series of advantages and few disadvantages IMHO:

* omonimies decrease sharply;
* there's a logical and implicit link between author and his works;
* work pages can be very simply self-categorized as [[Category:Works by {{BASEPAGENAME}}]]
* joining {{#property:...}} and {{subst:#property:...}} codes, such work pages both show data and run as templates to access the data from any other page.
* the code can be completely standardized and can be easily created/updated by bot, simply posting the same base code into any work page, new or old. 

Tests are going on working using and its related wikidata elements. 

Alex brollo

Wikisource-l mailing list

Wikisource-l mailing list