This template does not require a rating on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||
|
The contents of the Template:LoC catalog record page were merged into Template:LCCN on 25 March 2016. For the contribution history and old versions of the redirected page, please see its history; for the discussion at that location, see its talk page. |
I saw your request on the Wikipedia:Help desk. Unfortunately Wikipedia does not have string manipulation capabilities currently. So the only way to convert '89-456' to '89000456' would be a massive switch containing every possible input combination of digits and the resulting output digits. The most efficient way would be to have the numbers before and after the dash as separate parameters (i.e. |89|456) and then logic to convert the 'after dash' number into the 'leading zeros' form, but even that would require a switch with one-hundred thousand conditions (0 to 99999)... which is probably not computationally feasible. Finally, you could do it as three parameters (i.e. |89|000|456) and then combine different elements for the link and display. I made the second parameter optional, but I'm not sure if it is precisely what you wanted. {{LCCN|89000456}} now produces: LCCN 89-456... Wikipedia automatically numbers external links if no text is included. Is that what you wanted? I don't think so because that's what a blank second parameter would produce also. -- CBDunkerson 12:18, 4 April 2006 (UTC)
I've asked that a function be written to handle the number conversion automatically. This implementation is far too klunky for regular people to use. A simple function built into the software should solve the problem, and it's not without precedent. We already have things like
ISBN
0-123-4567-89 and urlencode: ({{urlencode: ≠/ab ?c 132}}
outputs %E2%89%A0%2Fab+%3Fc+132
, for instance).
See Bugzilla: 8160: ParserFunction for Library of Congress Control Numbers (LCCN)
Vote for it if you like the idea. — Omegatron 16:10, 5 December 2006 (UTC)
Hi, I tried and failed to use the template to access this resource: [1]. The "sa " prefix on the LCCN confuses the template. Anyone know the fix for this? John Vandenberg 22:46, 24 February 2007 (UTC)
Could this template be updated to use the LCCN Permalink ( LCCN Permalink FAQ) instead of performing a search at http://catalog.loc.gov? It may be that the permalink feature wasn't available when this template was created, or perhaps there's another reason that permalinks wouldn't be suitable. Quale ( talk) 10:05, 17 February 2008 (UTC)
Instead of dealing with all of the stupid parameters in this template, why not just make a single-parameter template to handle 6, 8, 10, and however many digits? It's lame having to do {{lccn|12||345678}}
instead of just {{lccn|1234567}}
; thus, {{
lccn8}}
. And, better yet, why not just code this template to detect the # of digits and adjust the output accordingly (if it's even necessary)?
LCCN
1234567890 and
LCCN
123456 work fine anyway so it should probably be moved to {{
lccn1}}
or whatever. —
Eekerz (
t)
09:04, 20 April 2010 (UTC)
Hi. The instructions say "number after the dash is not 6 digits long, enough zeroes to make it so". I tried that with LCCN 83-0 – 051 (the zero is added) but get no link. Any help? Thanks. - SusanLesch ( talk) 18:56, 4 May 2010 (UTC)
You can use padleft to fill the missing zeros. {{padleft:{{{3}}}|6|0}}. When using #expr you can convert a given number 89-456 to 89000456: {{#expr:{{{1|0}}}*0}}{{padleft:{{#expr:0*{{{1|0}}}*-1}}|6|0}}: 80.143.88.200 ( talk) 19:24, 29 October 2010 (UTC)
What exactly would be needed to cleanup that backlog? This seems to be very bot-friendly. Headbomb { talk / contribs / physics / books} 01:19, 22 March 2012 (UTC)
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Since 2003, the Library of Congress started normalizing LCCNs according to these rules, with the motivation that having half a million standard for controls numbers was a bit silly. So if you find some old source with an old-style LCCN on it (i.e. LCCN 85-2), when you follow the link you are presented with the normalized (modern) LCCN (i.e. LCCN 85000002). I think this is a bit confusing for those who aren't intimately familiar with LCCNs. But worse if you take a source with a new-style LCCN, such as LCCN 85000002, it will be erroneously be displayed as LCCN 85-2 on Wikipedia, and you will be taken to a page that says LCCN 85000002, which will lead to great puzzlement as to why Wikipedia displays things as LCCN 85-2. Therefore I think we should just bite the bullet and embrace the modern LoC's standard for our own articles. Headbomb { talk / contribs / physics / books} 01:56, 22 March 2012 (UTC)
source_ext_id
that can be applied to all such things so that editors who detest them can make them invisible with their own CSS. PS: Because this template is an LCCN template, it has to do one LCCN format or the other. The third option that Carrite wants cannot be an RfC option, since this template can't do nothing. The way to pursue that option is to take the template to
WP:TFD for deletion. (I predict a "keep" result.) —
SMcCandlish
Talk⇒ ɖ∘¿¤þ
Contrib.
09:26, 26 March 2012 (UTC)Alright, normally I wouldn't close this myself, since I initiated the discussion, but since it's been open for over a week and no one objected, I'm going to close this and get the various templates updated to use the new style. Headbomb { talk / contribs / physics / books} 16:03, 31 March 2012 (UTC)
{{ Citation/identifier}} duplicates this and other templates. Why not just use it as a core so we only do updates in one place? ---— Gadget850 (Ed) talk 12:42, 30 April 2012 (UTC)
{{LCCN|unk81||031593}} LCCN unk8-1 works, but {{LCCN|unk81031593}} LCCN unk8-103159 does not work. Template gets confused and removes last number.
Nothing seems to be using legacy mode anymore, I suggest we delete it to clean up the template. Secondly, newer LCCN's do not work with this template, but they do with {{ lccn8}}. Time to fix this template to work with new ones too? AManWithNoPlan ( talk) 23:36, 19 January 2015 (UTC)
See
Headbomb { talk / contribs / physics / books} 17:06, 29 October 2016 (UTC)
The Library of Congress's Chronicling America project uses LCCNs, but many of these LCCNs are not recognized by lccn.loc.gov. This seems to be because the LCCN server only serves up results for LoC holdings, and LCCNs starting with "sn" are part of CONSER and "may or may not be in LC". As a result, even though there is a responsive LoC page for these LCCNs, this template frequently points to an empty search results page instead.
Would it be feasible for this template to take parameter to specify that it should link out to chroniclingamerica.loc.gov rather than lccn.loc.gov? -- Visviva ( talk) 18:00, 23 December 2019 (UTC)
Update: as {{ LCCN8}} is a better fit for my current use case (lists of newspapers), I've posted on Template talk:LCCN8#Adding_option_for_Chronicling_America and prepared a possible solution here. However, I would imagine I'm not the only one to get tripped up by this issue, so it might be good if there was a fix for {{ LCCN}} as well. -- Visviva ( talk) 19:05, 23 December 2019 (UTC)
https://www.loc.gov/item/
instead of the current https://lccn.loc.gov/
, in much the same way as
Library of Congress Control Number (LCCN) (bibliographic) (P1144) at Wikidata does. This would mean your examples would link as:
LCCN
sn90-51192 and
LCCN
sn82-14988. I shall try to look at this in the not too distant future but I notice there is code in there for some sort of non-ID lookup so not sure how to handle that just yet (I should probably add some tracking for such usage and see if anything is using that to begin with). —
Uzume (
talk)
22:46, 11 May 2024 (UTC)This template does not require a rating on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | ||||||||
|
The contents of the Template:LoC catalog record page were merged into Template:LCCN on 25 March 2016. For the contribution history and old versions of the redirected page, please see its history; for the discussion at that location, see its talk page. |
I saw your request on the Wikipedia:Help desk. Unfortunately Wikipedia does not have string manipulation capabilities currently. So the only way to convert '89-456' to '89000456' would be a massive switch containing every possible input combination of digits and the resulting output digits. The most efficient way would be to have the numbers before and after the dash as separate parameters (i.e. |89|456) and then logic to convert the 'after dash' number into the 'leading zeros' form, but even that would require a switch with one-hundred thousand conditions (0 to 99999)... which is probably not computationally feasible. Finally, you could do it as three parameters (i.e. |89|000|456) and then combine different elements for the link and display. I made the second parameter optional, but I'm not sure if it is precisely what you wanted. {{LCCN|89000456}} now produces: LCCN 89-456... Wikipedia automatically numbers external links if no text is included. Is that what you wanted? I don't think so because that's what a blank second parameter would produce also. -- CBDunkerson 12:18, 4 April 2006 (UTC)
I've asked that a function be written to handle the number conversion automatically. This implementation is far too klunky for regular people to use. A simple function built into the software should solve the problem, and it's not without precedent. We already have things like
ISBN
0-123-4567-89 and urlencode: ({{urlencode: ≠/ab ?c 132}}
outputs %E2%89%A0%2Fab+%3Fc+132
, for instance).
See Bugzilla: 8160: ParserFunction for Library of Congress Control Numbers (LCCN)
Vote for it if you like the idea. — Omegatron 16:10, 5 December 2006 (UTC)
Hi, I tried and failed to use the template to access this resource: [1]. The "sa " prefix on the LCCN confuses the template. Anyone know the fix for this? John Vandenberg 22:46, 24 February 2007 (UTC)
Could this template be updated to use the LCCN Permalink ( LCCN Permalink FAQ) instead of performing a search at http://catalog.loc.gov? It may be that the permalink feature wasn't available when this template was created, or perhaps there's another reason that permalinks wouldn't be suitable. Quale ( talk) 10:05, 17 February 2008 (UTC)
Instead of dealing with all of the stupid parameters in this template, why not just make a single-parameter template to handle 6, 8, 10, and however many digits? It's lame having to do {{lccn|12||345678}}
instead of just {{lccn|1234567}}
; thus, {{
lccn8}}
. And, better yet, why not just code this template to detect the # of digits and adjust the output accordingly (if it's even necessary)?
LCCN
1234567890 and
LCCN
123456 work fine anyway so it should probably be moved to {{
lccn1}}
or whatever. —
Eekerz (
t)
09:04, 20 April 2010 (UTC)
Hi. The instructions say "number after the dash is not 6 digits long, enough zeroes to make it so". I tried that with LCCN 83-0 – 051 (the zero is added) but get no link. Any help? Thanks. - SusanLesch ( talk) 18:56, 4 May 2010 (UTC)
You can use padleft to fill the missing zeros. {{padleft:{{{3}}}|6|0}}. When using #expr you can convert a given number 89-456 to 89000456: {{#expr:{{{1|0}}}*0}}{{padleft:{{#expr:0*{{{1|0}}}*-1}}|6|0}}: 80.143.88.200 ( talk) 19:24, 29 October 2010 (UTC)
What exactly would be needed to cleanup that backlog? This seems to be very bot-friendly. Headbomb { talk / contribs / physics / books} 01:19, 22 March 2012 (UTC)
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
Since 2003, the Library of Congress started normalizing LCCNs according to these rules, with the motivation that having half a million standard for controls numbers was a bit silly. So if you find some old source with an old-style LCCN on it (i.e. LCCN 85-2), when you follow the link you are presented with the normalized (modern) LCCN (i.e. LCCN 85000002). I think this is a bit confusing for those who aren't intimately familiar with LCCNs. But worse if you take a source with a new-style LCCN, such as LCCN 85000002, it will be erroneously be displayed as LCCN 85-2 on Wikipedia, and you will be taken to a page that says LCCN 85000002, which will lead to great puzzlement as to why Wikipedia displays things as LCCN 85-2. Therefore I think we should just bite the bullet and embrace the modern LoC's standard for our own articles. Headbomb { talk / contribs / physics / books} 01:56, 22 March 2012 (UTC)
source_ext_id
that can be applied to all such things so that editors who detest them can make them invisible with their own CSS. PS: Because this template is an LCCN template, it has to do one LCCN format or the other. The third option that Carrite wants cannot be an RfC option, since this template can't do nothing. The way to pursue that option is to take the template to
WP:TFD for deletion. (I predict a "keep" result.) —
SMcCandlish
Talk⇒ ɖ∘¿¤þ
Contrib.
09:26, 26 March 2012 (UTC)Alright, normally I wouldn't close this myself, since I initiated the discussion, but since it's been open for over a week and no one objected, I'm going to close this and get the various templates updated to use the new style. Headbomb { talk / contribs / physics / books} 16:03, 31 March 2012 (UTC)
{{ Citation/identifier}} duplicates this and other templates. Why not just use it as a core so we only do updates in one place? ---— Gadget850 (Ed) talk 12:42, 30 April 2012 (UTC)
{{LCCN|unk81||031593}} LCCN unk8-1 works, but {{LCCN|unk81031593}} LCCN unk8-103159 does not work. Template gets confused and removes last number.
Nothing seems to be using legacy mode anymore, I suggest we delete it to clean up the template. Secondly, newer LCCN's do not work with this template, but they do with {{ lccn8}}. Time to fix this template to work with new ones too? AManWithNoPlan ( talk) 23:36, 19 January 2015 (UTC)
See
Headbomb { talk / contribs / physics / books} 17:06, 29 October 2016 (UTC)
The Library of Congress's Chronicling America project uses LCCNs, but many of these LCCNs are not recognized by lccn.loc.gov. This seems to be because the LCCN server only serves up results for LoC holdings, and LCCNs starting with "sn" are part of CONSER and "may or may not be in LC". As a result, even though there is a responsive LoC page for these LCCNs, this template frequently points to an empty search results page instead.
Would it be feasible for this template to take parameter to specify that it should link out to chroniclingamerica.loc.gov rather than lccn.loc.gov? -- Visviva ( talk) 18:00, 23 December 2019 (UTC)
Update: as {{ LCCN8}} is a better fit for my current use case (lists of newspapers), I've posted on Template talk:LCCN8#Adding_option_for_Chronicling_America and prepared a possible solution here. However, I would imagine I'm not the only one to get tripped up by this issue, so it might be good if there was a fix for {{ LCCN}} as well. -- Visviva ( talk) 19:05, 23 December 2019 (UTC)
https://www.loc.gov/item/
instead of the current https://lccn.loc.gov/
, in much the same way as
Library of Congress Control Number (LCCN) (bibliographic) (P1144) at Wikidata does. This would mean your examples would link as:
LCCN
sn90-51192 and
LCCN
sn82-14988. I shall try to look at this in the not too distant future but I notice there is code in there for some sort of non-ID lookup so not sure how to handle that just yet (I should probably add some tracking for such usage and see if anything is using that to begin with). —
Uzume (
talk)
22:46, 11 May 2024 (UTC)