Benutzer:MisterSynergy

aus Wikipedia, der freien Enzyklopädie
Zur Navigation springen Zur Suche springen
Babel – Benutzerinformationen
de-N Dieser Benutzer spricht Deutsch als Muttersprache.
en-4 This user has near native speaker knowledge of English.
Benutzer nach Sprache

Same as User:MisterSynergy at Wikimedia (confirmation).

Projects at beta dewiki[Bearbeiten | Quelltext bearbeiten]

Wikidata identifier comparison module for database links/norm data templates[Bearbeiten | Quelltext bearbeiten]

General description[Bearbeiten | Quelltext bearbeiten]

  • The aim is to develop a Wikipedia Lua module that compares local data given in template parameters with corresponding data at Wikidata. In the articles transcluding those templates, it adds maintenance categories based on the outcome of the comparison.
  • It is intended to be included in the code of database link or norm data templates, or via other modules directly. This allows to add a sophisticated identifier comparison functionality to database link/norm data templates with a rather simple modification (add a call of this module).
  • The module does not display content from Wikidata, or builds links from the identifiers taken from Wikidata. It only throws maintenance categories in case this is appropriate.
  • In a first step, only "external identifier" properties are being considered, and comparisons for all other property types are not being performed.
  • There is related discussion at dewiki at [1].

How to use[Bearbeiten | Quelltext bearbeiten]

In order to add the comparison functionality to an existing database link template, add the following code to the template:

{{#invoke:Wikidata/ValueComparison|compareValues|eigenschaft=P235781|lokaler_identifikator={{{1|}}}|kat_fehlt_lokal=Kategorie:P235781 fehlt lokal|kat_fehlt_in_wd=Kategorie:P235781 fehlt in Wikidata|kat_wd_verschieden=Kategorie:P235781 verschieden}}

In this scenario, local parameter values given in the template parameter |1= is being compared to the values of property Property:P235781 in the Wikidata item connected to the Wikipedia page transcluding the template. The maintenance categories used are defined in the parameters |kat_fehlt_lokal, |kat_fehlt_in_wd=, and |kat_wd_verschieden=.

Test scenario[Bearbeiten | Quelltext bearbeiten]

Tests von Modul:Wikidata/ValueComparison werden auf Pseudo-Artikelseiten mit der Vorlage:Modell-Datenbanklink durchgeführt nach folgendem Schema:

Situation in Wikidata Situation in Wikipedia
Objekt-Ebene Aussagen-Ebene Rückgabewert ID-Parameter nicht angegeben
od.
ID-Parameter leer
ID-Parameter lokal befüllt
kein Objekt verbunden Ja: Wikidata-Vergleich Test7 Ja: Wikidata-Vergleich Test10
Objekt verbunden keine Aussage vorhanden Ja: Wikidata-Vergleich Test8 Nein: Wikidata-Vergleich Test11
Aussage(n) vorhanden kein Wert Ja: Wikidata-Vergleich Test9 Nein: Wikidata-Vergleich Test12
unbekannter Wert Ja: Wikidata-Vergleich Test13 Nein: Wikidata-Vergleich Test14
genau ein Wert Nein: Wikidata-Vergleich Test3 gleich wie Wikidata-Wert Ja: Wikidata-Vergleich Test1
anders als Wikidata-Wert Nein: Wikidata-Vergleich Test2
mehr als ein Wert Nein: Wikidata-Vergleich Test4 lokaler Wert in Wikidata enthalten Ja: Wikidata-Vergleich Test5
lokaler Wert nicht in Wikidata enthalten Nein: Wikidata-Vergleich Test6

Weitere Tests mit dieser Vorlage:

Tests über andere Vorlagen:

Aufruf über ein anderes Modul:

Genutzte Pseudo-Wartungskategorien:

Grundsätzlich wäre auch eine Kategorisierung in diese Kategorien möglich:

Legende:

  • Ja: Situation okay, keine Wartungskategorisierung erwünscht
  • Nein: Situation nicht okay, Wartungskategorisierung erwünscht

Related pages in beta-dewiki[Bearbeiten | Quelltext bearbeiten]

There is also a considerable amount of items and a custom property at beta wikidata, see [2].

Open questions[Bearbeiten | Quelltext bearbeiten]

  • Naming of the module (page title): should it be in "Module:Wikidata/*" namespace? Which title is appropriate? Also consider potential future functionality (other property types than "external identifier")
  • Naming of functions: consider potential future functionality (other property types than "external identifier")
  • Logging to Lua console (activate or deactivate?)
  • Documentation?
  • Language (all en by default)
  • variable naming conventions
  • There is quite some spaghetti code which should better be improved
  • Add class="error" style="display:none" to maintenance categories
  • Named identifiers parameters (as opposed to numbered ones)
  • ......