User:Bargioni/moreIdentifiers

From Wikidata
Jump to navigation Jump to search

moreIdentifiers is a User script based on a brilliant idea of user:Epìdosis. It allows you to add authority control IDs from VIAF (VIAF ID (P214)) with few edits; practically, it adds a box before the section Identifiers, allowing you to choose which IDs should be added to the item. It is thought to be customizeable (by default it works only for items having instance of (P31)human (Q5), but the configuration could be easily changed).

Installation

[edit]

To use this gadget, import the User:Bargioni/moreIdentifiers.js page by adding the following code to your common.js page:

// [[User:Bargioni/moreIdentifiers.js]]
importScript( 'User:Bargioni/moreIdentifiers.js' );

Configuration

[edit]

The tool is configured by creating a js-page (for example moreIdentifiers_conf.js) in your usernamespace and loading it from your common.js before the loading of moreIdentifiers:

// [[User:Bargioni/moreIdentifiers defaultconf.js]]
// [[User:Bargioni/moreIdentifiers.js]]
importScript( 'User:Bargioni/moreIdentifiers defaultconf.js' );
importScript( 'User:Bargioni/moreIdentifiers.js' );

You can substitute "User:Bargioni/moreIdentifiers defaultconf.js" with your personal configuration, of course. You can start your personal configuration by copying the content of the default config and modify it as you wish.

  • accepted_P31: moreIdentifiers box will appear only in items having at least one of these instance of (P31) values
    • please note that VIAF "Geographic Names" and "Corporate Names" clusters contain many errors, so setting city (Q515) or organization (Q43229) is not advised, while human (Q5) is ideal because "Personal Names" clusters are generally OK
    • accepted_P31 may be set to "any", which will make it appear on all items with a VIAF ID. This should only be used by advanced users given the high probability of introducing errors for some types of data.
      • if you notice an error in VIAF (e.g. a cluster contains one or more entries which should not be in it), please click on ⚡ symbol which appears after each label: your browser will open a new tab or window, showing a precompiled report of the VIAF error in Wikidata:VIAF/cluster/conflating specific entries; just save the section and your report will be added
      • if the error is more complex, please report it with a proper explanation in Wikidata:VIAF/cluster/conflating entities
  • unwanted_cluster_sources: you can hide single IDs if you are not interested in adding them; you can add the VIAF codes as in the example ("RERO"), separating them with commas
  • autoreload: you can set it "true" in order to have the page reloaded after the addition of IDs; otherwise, keep it "false"
  • autoreload_timeout: you can specify the number of milliseconds to be waited before the page reloads (works only if you have set autoreload to "true", otherwise it is irrelevant)

The format of the configuration is like this:

moreIdentifiers_props = {
	"accepted_P31": [
		"5",
		"8436",
		"164950",
		"21070568",
		"13002315",
		"4271324",
	],
	"unwanted_cluster_sources": ["RERO"],
	"autoreload" : false,
	"autoreload_timeout" : 1000
};

Hints and caveats

[edit]
  • moreIdentifiers helps you to add properties whose quality depends on you, of course. Please verify what you save: VIAF links may contain errors, or modifications applied by moreIdentifiers can be wrong
  • Remember that moreIdentifiers only shows properties not already present in the item (note: if the item contains more VIAF clusters, and each VIAF cluster contains an ID by VIAF member X, and the item also contains one ID of VIAF member X, moreIdentifiers will not give the option to add IDs of VIAF member X from VIAF)
  • Sometimes moreIdentifiers shows strikethrough IDs: it is not possible adding them as they are certainly wrong, because of VIAF errors or obsolescence
  • If you are interested in VIAF and authority control in general, please consider joining WikiProject Authority control going here.

Appendix: viaf.js

[edit]

To use viaf.js add the following code to your common.js page:

// [[User:Bargioni/viaf.js]]
importScript( 'User:Bargioni/viaf.js' );

viaf.js allows you to see which VIAF members are included in a given VIAF cluster passing the mouse on the value of P214; you can also see if the VIAF cluster has been abandoned or redirected to another cluster.

See also

[edit]