User:Bargioni/UseAsRef
UseAsRef is a User script written in collaboration with User:Epìdosis. It allows you to add references to statements on the basis of external IDs and, from the second version, also on the basis of other properties (described by source (P1343), official website (P856), official blog URL (P1581), curriculum vitae URL (P8214), terms of service URL (P7014), privacy policy URL (P7101), described at URL (P973), Academia.edu profile URL (P5715), full work available at URL (P953), exact match (P2888), online catalog URL (P8768)).
The first version (User:Bargioni/UseAsRef 1.0.js) was released in February 2021, the second version (User:Bargioni/UseAsRef.js) in October 2021.
Installation
editTo use this gadget add the following code to your common.js page:
importScript( 'User:Bargioni/UseAsRef.js' );
Functioning
edit- add to the item all the statements that will need a reference and all the IDs or other properties (see list above) you want to use as reference
- reload the item
- click on the "copy this as ref" icon in the property you want to use as reference; you will see a notification of the action and the icon of the copied ID will have a green boundary; if you copy many properties in a row, the gadget will consider the last one copied (only the one with the green boundary)
- click on the "paste copied ref" icon in the statement(s) you want to reference; you will see a notification of the edit(s) and the icon(s) of the referenced statement(s) will have a red boundary; you cannot paste the reference into a statement you are editing
- if you want to use another property as reference, click on its "copy this as ref" icon and then click on the "paste copied ref" icons in the statements you want to reference
- in order to see all references added, you can reload the item
The functioning is also showed in two Youtube videos: the first shows the functioning with external IDs; the second gives a general presentation of the gadget and shows the functioning with other statements.
Hints and caveats
edit- the references from external-IDs are constructed in the following way:
- stated in (P248) = value of applicable 'stated in' value (P9073) present in the external ID used as reference (if P9073 is absent[1], you will get an error message asking you to add it to the property; you will also be asked to add Wikidata item of this property (P1629), if it's absent too)
- external ID used as reference = value of the external ID used as reference
- subject named as (P1810) = value of the qualifier P1810 read from the external ID used as reference (if is has it; otherwise, absent)
- retrieved (P813) = present day
- the exclusion of ISBN-13 (P212), ISNI (P213), VIAF ID (P214), ISSN (P236), Freebase ID (P646), ISIL (P791), ISBN-10 (P957), Norwegian organisation number (P2333), Google Knowledge Graph ID (P2671), P7859 (P7859) from the number of external IDs usable as references is deliberate
- the references from other properties (see list above) are constructed in the following way:
References
edit- ↑ At the moment about 60% of external IDs have P9073. Please see the following queries:
- external-IDs with both P1629 and P9073 (gadget works)
- external-IDs with P1629 without P9073 (gadget doesn't work until P9073 is added)
- external-IDs without P1629 and P9073 (gadget doesn't work until P1629 and P9073 are added)
See also
edit- User:Bargioni/moreIdentifiers - to add VIAF members' IDs from VIAF clusters