Wikipedia:WikiProject User scripts/Requests
This page is for requests for new user scripts or help with modifications to existing user scripts. Please first look through the existing scripts and recently fulfilled requests. Also see Old unfullfilled requests.
This page has archives. Sections older than 90 days may be automatically archived by Lowercase sigmabot III. |
RFPP Admin templater script
It would be great to have something to speed up work at WP:RFPP. Something that would appear next to each of the headings / articles on the page with an option to add a template to that section. And then after selecting the type of template (i.e. semi, full, e.t.c) it would then ask you for the time to add as a parameter before posting to the section. I imagine it shouldnt be that hard as I have seen similar useful scripts for AFD and other such places. Intended for use on Chrome with monobook ·Add§hore· Talk To Me! 16:08, 16 January 2013 (UTC)
- See User:Addshore/doRFPP.js for a start but I have no idea how to add this in line with each header on the page. This just adds tabs to the edit window, sure it does save a bit of time but not as much as having them next to section headers! ·Add§hore· Talk To Me! 16:42, 18 January 2013 (UTC)
script to hide the "feet" part of convert template while reading an article
Hello. I am looking for a script that would hide the "feet" part of measures displayed by the convert template. I couldn't find it as a gadget in the preferences page, and couldn't find it either there, but I still hope it exists somewhere. Regards, Freewol (talk) 11:02, 19 February 2013 (UTC)
- There are a lot of different outputs of
{{convert}}
and it emits nothing that marks itself as coming from the template, so this job is quite complex as it requires pattern matching against the entire page and replacing text as opposed to just toggling the display style of an element. It would also require some kind of check to see if the feet measurement was paired with a metric measurement before it removed that content. I think what you're asking for is very possible if the infrastructure was in place to support it, but as is the scope of work is probably too large for a volunteer to take on for a user script. If the template wrapped the values in spans with appropriate classes, it would be a simple thing to hide all instances based on user preference. This would require a change to{{convert}}
and other templates like it that output two values and then a simple gadget or user preference could handle the display. It's a cool idea at any rate, and is at least possible if enough people wanted it. — Bility (talk) 17:23, 5 April 2013 (UTC)
Listas parram adding for Biography Wikiproject tag
A large number of entries for the listas param could be constructed from the page name.
Much appreciated if a user script could be written to do this. Sfan00 IMG (talk) 15:13, 5 April 2013 (UTC)
- There are a lot of different forms an article title can take. Consider these articles:
- Confucius: No spaces found, don't put anything in listas.
- Albert Camus: A space is found, the order is swapped and a comma inserted to produce "Camus, Albert".
- Arthur Conan Doyle: More logic, this time the string should be split on the second space.
- Brian De Palma: Same as above, except this time we want to split on the first space. Maybe a list of middle words like "de", "von", etc. could inform this logic.
- Georg Wilhelm Friedrich Hegel: More words, need to split on the third space.
- Augustine of Hippo: New logic is required, perhaps looking for the "[text] of [text]" pattern.
- Frederick William I of Prussia: Different pattern requires expanding the logic to include spaces in the text on either side of "of". Also, currently sorted as "Frederick William 01 Of Prussia", would that require attempting to find roman numerals and convert them to numbers?
- Alexandra Feodorovna (Alix of Hesse): More logic, perhaps to remove anything in parentheses altogether?
- List of major biblical figures: Maybe don't include a listas for articles starting with "List of".
- E. T. A. Hoffmann: Normally initials would be counted as one word and sorted correctly, but this one has spaces between each letter. Maybe check for single letters or single letters followed by a period?
- Casimir II the Just: Don't know (currently sorted as "Casimir Ii Of Poland").
- Boleslaus I, Duke of Bohemia: I don't think a script can determine this (it is currently being sorted as "Boleslaus I Of Bohemia").
- Frankie Goes to Hollywood: Probably shouldn't get a listas, but no way to determine that.
- So these were examples found in the first 100 transclusions of
{{WikiProject Biography}}
, just to get an idea of what would go into an accurate listas generator. From the above I would suggest including these rules:- Look for spaces, if none are found don't input a listas, otherwise
- Look for "List of" in the beginning and don't input a listas if found, otherwise
- Look for and remove anything in parentheses, then
- Look for a "[text] of [text]" pattern and use the only the text to the left of the "of", then
- Use a list of nobiliary particles (e.g. "von", "de", "zu", etc.) to split a name on the space before the particle, or if no particles are found
- Split a name on the last space.
- I think this will hit a large portion of the names, and for corner cases, yes it will input an incorrect sort, but then you do what you're doing now which is make up your own manually. Thoughts? Also, how do you normally add this template? Copy/paste from somewhere? Some other script? — Bility (talk) 18:11, 5 April 2013 (UTC)
- The intent was that this generated the intended listas= portion + a name which could be edited in the relevant point in the tmeplate used. The user would still have to save the page manually, so that a second check it was correct could be made.Sfan00 IMG (talk) 20:41, 5 April 2013 (UTC)
- Right, what I'm asking is would the script input the entire template, or would it fill in the listas parameter of the template that is already in the edit box? If you're currently copy/pasting a blank template in or manually typing it out, then the script could insert the whole thing for you while it generates the listas, but if you already have an "insert template" button or something the new script would either need to be integrated into that one or fired afterward. Either way I think it's doable with the logic above. — Bility (talk) 22:21, 5 April 2013 (UTC)
- The intent was that this generated the intended listas= portion + a name which could be edited in the relevant point in the tmeplate used. The user would still have to save the page manually, so that a second check it was correct could be made.Sfan00 IMG (talk) 20:41, 5 April 2013 (UTC)
- The latter, the template concerned is already on the pages concerned. Sfan00 IMG (talk) 07:42, 6 April 2013 (UTC)