![]() | New sources script I'm pleased to announce that an improved user script targeted at rendering cited sources more consistent and congruent with Wikipedia naming conventions is now live, and resides at the same namespace as the previous version of the script. It has been built and testing mainly using Firefox and Safari, is much more comprehensive in its action and may take longer to run. Suggestions and features requests will be most welcome. |
Please leave a . |
Main objectives, as applied to reference sections or otherwise within citation templates, are as follows:
|journal=
, |website=
, |work=
and |publisher=
fields (
CS1 errors)|work=
and |publisher=
is identical, the two are merged (i.e. one of them is discarded).|work=
|publisher=
and |location=
; please check that the desired one is retained.The rationale and principles applied are as follows:
|url=
are protected; this protection extends to any linking text (e.g.: whether "http://time.com", or "[http://money.cnn.com/2008/02/18/news/newsmakers/siklos_calhoun.fortune/index.htm Siklos, Richard. “Made to Measure” ''Fortune Magazine'', February 20, 2008]");.com
, .org
, .net
, etc are classed as 'publisher' and unitalicised|via=
is used for
Self-published sources such as Youtube or Vimeo|work=
, |newspaper=
or |journal=
<–> |publisher=
); '|work=
' is used to achieve italicisation when switching from |publisher=
as the script cannot customise to the citation template being used).|title=
renders the title with double quote marks, extra double quote marks bounding the title will be removed.|journal=
, |work=
, |newspaper=
, |periodical=
, where correctly used to denote journals or other works that ought to render as italicised (per
WP:ITALIC) will not be disturbed.|publisher=The New York Times Company
" is removed for |work=The New York Times
, "|publisher=Time Inc.
" is removed for |work=Time
).|title=
" mistakenly contains an URL, it will be blanked with a commented <!--ACTUAL ARTICLE TITLE BELONGS HERE! original text: [url]-->;|url=
(e.g. chapter, journal, magazine, newspaper, publisher, title, work, via) contain hyperlinked text, the URL part is removed, leaving only the text; the strings http://
and www.
are systematically removed in any event;''
) or bold ('''
) wikimarkup in: |<param>n=
publisher and periodical parameters.This function attempts to generate unique names for citations and adds "name=<string>" to the <ref> tag. The unique name is generated in two possible ways and in the following order:
|date=
within the url of the citation and suffixes it to the domain name in the format; it further appends the first "word" (alphabetical string) found after the date string such that the string is <domainname>yyyymmmdd-<word>
.It will therefore not work if no unique identifier strings or dates can be found.
When faced with citations without names where the |date=
is populated, the script will prefix the domain name with the date
|publisher=
field.importScript('User:Ohconfucius/script/Sources.js'); // [[User:Ohconfucius/script/Sources.js]]
Disclaimer: Use at your own risk and make sure you check the edit changes before you save.
Link to script code: User:Ohconfucius/script/Sources.js
Speed of script execution may vary depending on browser.
Should the script stall when working on large articles, press <continue>
on the pop-up menu – once is usually sufficient.
Some examples of what the script does on its own follow: [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]
Once you are in edit mode, there are [FOUR] buttons from this script in the toolbox in the left margin:
|publisher=
)|publisher=
) which was italicised may lose italicisation due to automatic removal of the toggle if it is not included in the dictionary of journals and periodicals within the script.Users are expected to exercise careful judgement in the context of each article in which they run this script. Use at your own risk and make sure you check the edit changes before you save. It's not my fault if someone misuses this script.
![]() | New sources script I'm pleased to announce that an improved user script targeted at rendering cited sources more consistent and congruent with Wikipedia naming conventions is now live, and resides at the same namespace as the previous version of the script. It has been built and testing mainly using Firefox and Safari, is much more comprehensive in its action and may take longer to run. Suggestions and features requests will be most welcome. |
Please leave a . |
Main objectives, as applied to reference sections or otherwise within citation templates, are as follows:
|journal=
, |website=
, |work=
and |publisher=
fields (
CS1 errors)|work=
and |publisher=
is identical, the two are merged (i.e. one of them is discarded).|work=
|publisher=
and |location=
; please check that the desired one is retained.The rationale and principles applied are as follows:
|url=
are protected; this protection extends to any linking text (e.g.: whether "http://time.com", or "[http://money.cnn.com/2008/02/18/news/newsmakers/siklos_calhoun.fortune/index.htm Siklos, Richard. “Made to Measure” ''Fortune Magazine'', February 20, 2008]");.com
, .org
, .net
, etc are classed as 'publisher' and unitalicised|via=
is used for
Self-published sources such as Youtube or Vimeo|work=
, |newspaper=
or |journal=
<–> |publisher=
); '|work=
' is used to achieve italicisation when switching from |publisher=
as the script cannot customise to the citation template being used).|title=
renders the title with double quote marks, extra double quote marks bounding the title will be removed.|journal=
, |work=
, |newspaper=
, |periodical=
, where correctly used to denote journals or other works that ought to render as italicised (per
WP:ITALIC) will not be disturbed.|publisher=The New York Times Company
" is removed for |work=The New York Times
, "|publisher=Time Inc.
" is removed for |work=Time
).|title=
" mistakenly contains an URL, it will be blanked with a commented <!--ACTUAL ARTICLE TITLE BELONGS HERE! original text: [url]-->;|url=
(e.g. chapter, journal, magazine, newspaper, publisher, title, work, via) contain hyperlinked text, the URL part is removed, leaving only the text; the strings http://
and www.
are systematically removed in any event;''
) or bold ('''
) wikimarkup in: |<param>n=
publisher and periodical parameters.This function attempts to generate unique names for citations and adds "name=<string>" to the <ref> tag. The unique name is generated in two possible ways and in the following order:
|date=
within the url of the citation and suffixes it to the domain name in the format; it further appends the first "word" (alphabetical string) found after the date string such that the string is <domainname>yyyymmmdd-<word>
.It will therefore not work if no unique identifier strings or dates can be found.
When faced with citations without names where the |date=
is populated, the script will prefix the domain name with the date
|publisher=
field.importScript('User:Ohconfucius/script/Sources.js'); // [[User:Ohconfucius/script/Sources.js]]
Disclaimer: Use at your own risk and make sure you check the edit changes before you save.
Link to script code: User:Ohconfucius/script/Sources.js
Speed of script execution may vary depending on browser.
Should the script stall when working on large articles, press <continue>
on the pop-up menu – once is usually sufficient.
Some examples of what the script does on its own follow: [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]
Once you are in edit mode, there are [FOUR] buttons from this script in the toolbox in the left margin:
|publisher=
)|publisher=
) which was italicised may lose italicisation due to automatic removal of the toggle if it is not included in the dictionary of journals and periodicals within the script.Users are expected to exercise careful judgement in the context of each article in which they run this script. Use at your own risk and make sure you check the edit changes before you save. It's not my fault if someone misuses this script.