Wikidata:Property proposal/Concise Literary Encyclopedia

Concise Literary Encyclopedia edit

Originally proposed at Wikidata:Property proposal/Authority control

DescriptionID in Concise Literary Encyclopedia
RepresentsConcise Literary Encyclopedia (Q4239850)
Data typeExternal identifier
Allowed values[0-9]\-[0-9]+
Example 1Tajik literature (Q2371311)7-3342
Example 2Tamil literature (Q10549089)7-3642
Example 3Adam de la Halle (Q4214)1-0803
Sourcehttp://feb-web.ru/feb/kle/kle-abc/default.asp
Number of IDs in source>12 000
Expected completenesseventually complete (Q21873974)
Formatter URLsee below – WRONG FORMAT, MISSING "$1"
See alsoWikidata:Property proposal/Literary Encyclopedia (1929-1939)

Motivation edit

Russian-language encyclopedia of world literature (despite its name, it is quite large, 12 thousand articles). It is legally available on the website of Fundamental Electronic Library. I am not sure about the format of IDs: links looks like http://feb-web.ru/feb/kle/kle-abc/ke1/ke1-0803.htm, where 1 is the volume and 0803 is the article in it. One could do something like ke1/ke1-0803, which would repeat volume twice and look unnatural, or just use 1-0803 and do not have a simple formatter URL (it still quite easy to format it in Wikipedias). See also: Wikidata:Property proposal/Literary Encyclopedia (1929-1939). Wikisaurus (talk) 20:11, 16 October 2020 (UTC)[reply]

Discussion edit

@ArthurPSmith: what do you think about the possible use of https://wikidata-externalid-url.toolforge.org ? Pamputt (talk) 15:19, 27 November 2020 (UTC)[reply]
@Pamputt, Epìdosis: Sure, this is similar to many cases it handles already. ArthurPSmith (talk) 22:03, 27 November 2020 (UTC)[reply]
Perfect ArthurPSmith. Could you explain a little bit (or point to a help page) how to create a new rule for this case? I am not familiar with wikidata-externalid-url. Pamputt (talk) 07:47, 28 November 2020 (UTC)[reply]
@Pamputt: The main page of the tool (linked above) is the only help page I have on it; a rule like this would most likely need to be hard-coded in the PHP as has been done for most of the listed properties on that page. I guess the main documentation is the code itself (which isn't very complicated) - see the github link. ArthurPSmith (talk) 13:52, 29 November 2020 (UTC)[reply]
@ArthurPSmith: ok, thanks. I created a pull request for this case. Could you validate it so that I can make sure it works properly before I create this property. Or could you tell me precisely which steps I should follow (first property creation, then pull request? or something else?) Pamputt (talk) 17:09, 29 November 2020 (UTC)[reply]
@Pamputt: As you can tell the code won't work until we know the property ID, so generally the property is created first! But yes, that's the general idea. A couple of thoughts on the request - (1) are we sure these are only 1-digit prefixes? Or do we want all the digits before the '-'? (I just checked the wikipedia article on this and it looks like just 9 volumes, so 1 digit should work). (2) Generally a URL prefix (and suffix) is supplied so you only need to set $link_string to the rewritten id portion - i.e. "ke" . $first_digit . "/ke$id" and then include the other pieces in the formatter URL directly. ArthurPSmith (talk) 14:20, 30 November 2020 (UTC)[reply]
@ArthurPSmith: for the point (1), I come to the same conclusion as you (maximum is 9). For the point (2), it is not clear to me. Do you mean the PHP code that I have written should be different? If so, I guess I will need your help ;) Pamputt (talk) 14:38, 30 November 2020 (UTC)[reply]
@Pamputt: Yes, happy to help - for now all you should need is that the formatter URL should look like "https://wikidata-externalid-url.toolforge.org?p=XXXX&url_prefix=http://feb-web.ru/feb/kle/kle-abc/&url_suffix=.htm&id=$1" ArthurPSmith (talk) 15:07, 30 November 2020 (UTC)[reply]

@Wikisaurus, Epìdosis, ArthurPSmith:   Done Concise Literary Encyclopedia ID (P8896) Pamputt (talk) 16:00, 30 November 2020 (UTC)[reply]

  • And the wikidata-externalid-url app is updated; unfortunately the Wikidata UI takes a while to register formatter URL's so we can't easily test it for a few hours I think. You can try it by hand though (worked for me). ArthurPSmith (talk) 16:31, 30 November 2020 (UTC)[reply]