User talk:Perhelion/cleanup.js
User:Perhelion/cleanup.js is not performed, cleanup is done by User:Sarang/cleanup.js
Currently
see also User talk:Sarang/cleanup.js
Cleanup
editThe cleanup script formats and standardizes the file description (the {{Information}} standard template)
Parameter names are unified to lower case, understroke to space.
The sequence of parameters is the same as it is displayed:
- description
- date
- source
- author
- [permission]
- [other versions]
- [other fields]
date should be in the standard format, whenever possible: yyy-mm-dd (e.g. 2021-01-13), without the time
source can be {{Own}}, {{Own using}}, {{ Own based | filename | by = username | d = size }}
- Please avoid to generate a list item (with a "*") – {{Own based}} can do it, either horizontal or vertical
author can be {{U|username}}, or {{Ut}}, {{Uw}}, {{Uwt}} to avoid the redlink with {{U}};
- {{AutVec}} can specify both users when a bitmap image has been vectorized
- Note: author is always a user, without its talk space
- {{Attrib}}s can be added here
- Please avoid list constructions like
- filename : user_1
- derivative: user_2
permission the parameter should be removed when a == int:license-header ==
exists
other versions can be removed if empty
other fields for different more descriptions, as e.g. {{Image generation}}
Derivatives and vectorizings
editThere are different possibilities to show that a drawing uses other drawings, depending on the individual relation
- with
source={{Own based|filename
, eventuallly mentioning its creator withby=user
, and displaying the file[s]- that will be the best form for drawings inspired by other drawings in Commons. As many file names and users as needed can be specified.
- with
source={{Own using}}
and followed by e.g. one or more external links- that will be the best form for drawings inspired by other drawings, when they can be linked with a URL.
- with
source={{Derived from| file1 | file2 |... |b1=u1|b2=u2 | ... }}
and possible displaying the file[s]. - with additional {{Attrib}} or {{Attribs}} (as many as needed) mainly when elements of other drawings are used.
- with author={{AutVec}} for mere vectorisations, specifying both authors [and the original raster image].
- with {{Retouched}} when it is really a small modification of another file, as e.g. another color, or text translation of an SVG
- becomes integrated into Image generation/File generation description.
In general only one of these possibilities will be the best solution. See also {{Derivatives}} to show other files originating on a file.
Users using User:Perhelion/simpleSVGcheck.js
edit- 1997kB
- 2147483647
- 4nn1l2*
- AntiCompositeNumber *
- AtomicMario
- ARR8
Begoon- Berrely
- BrianYWH
- Carnby
- Clpo13 *
- CptViraj *
- D6283
- Dvorapa
- EduardoFP7
- Eiim
- Ezarate *
- Fredddie
- Grolltech
- Hbf878
- Hello71
- Huntster*
- Janbery
- Jayprakash12345
- Jmarchn
- Jonteemil
- Kirilloparma
- Liuxinyu970226
- Macucal
- Michel Bakni
- NikNaks
- Niridya
Perhelion*- Pokechu22
- Premeditated
- RaFaDa20631
- RogueScholar
- Samuel Wiki
- Senator2029
- Shyamal
- The Eloquent Peasant
- Thibaut120094
- User456541
- Vulphere
- Wallroth
- Yeeno
- علاء *
- the testversion (with cleanup):
- the sandbox (currently unavailable):
The present cleanup performs the change to that layout, when it is a chemical structure. There are different possibilities to recognize that fact; 100% working is when either
- the topic id specified with "s=sf" or "s=eq", or
- the File Description contains the license
{{PD-chem}}
, it may even be a comment surrounded with <!-- -->.
It is possible to change the license after the script has made its suggestions, then leave it e.g. clicking on the highlighted validator field and return to the edit. Now the script is performed again and generates now the code for FGD. Normally all the other edits are not changed, but sometimes this second run may alter what has been done. When the second run of the script destroys previous edits, it will be useful to copy some parts before leaving and paste it the second run.
A simple preview won't cause a new script performance, but other leavings (e.g. to check a link) will. In such cases it is recommended to copy the content, to have the possibility to paste it when the edits got lost. -- sarang♥사랑 20:05, 26 December 2020 (UTC)
Removal of obsolete entries
editGalleries
editWhen the files in the file list for a gallery are prefixed with "File:" (or "Image:"), this useless namespace is removed.
Technical basics to 1=
editThere happened a substantial misunderstanding and severe misinterpretion of template documentation.
- Disambiguation:
- Every parameter specification in every template consists of two parts, the parameter name and the parameter value.
- It is essential to know the difference between these two parts to understand template documentation.
- Parameter names can always be specified empty (=no value), in most cases without consequence - like not done.
- Parameter values are either optional, suggested or required.
- Parameters are either named or positional.
- Named parameters can only be specified by a name (or alias), an equal sign and the value: the name is necessary.
- Positional parameters can be specified either by their position, or by their number followed by an equal sign prepending the parameter value:
- The 'parameter name' of a positional parameter is represented by a numeric value.
- While the name of a named parameter is always necessary for its specification, the name of a positional parameter (=the position number) is only necessary when
- the parameter is specified outside its positional order, or
- the parameter value contains free equal signs,
- otherwise it might be used – but it is not necessary.
- When a template documentation calls a parameter 'required' it depends the parameter value;
- a parameter name (or position number) can only be either necessary or not necessary.
- It is complete nonsense to tell a parameter name (or position number) "required" —required can only be a parameter value.
I hope that this may help for better understanding -- sarang♥사랑 21:53, 24 September 2021 (UTC)
When the value is a text string without any equal sign, templates as e.g. Law of 9/22:
{{en|1=descriptionianal text}}
get the useless "1=" removed. It works also when templates are transcluded – when they have a 1=
it will be ignored.
Chemical structures and equations
editTo get the File generation description when the script is not able to detect the chemical nature of the file, just change the license to {{PD-chem}}
.
To tell that it is an equation, set {{PD-chem}}|s=eq}
or{{PD-chem|t=eq}}
and the script will know.
Make these as an edit and continue to the script by clicking the first W3C-icon above.
To enable the abbreviating use of ((T|Legtab}}, which allows only two parameters, workarounds had been invented to allow
- Legend-lines (or empty legends with the
line=
parameter) - bordered boxes (legends with the
border=
parameter) - striped boxes (legends with the
stripe=
parameter) - lined boxes (legends with the
line=
parameter)
For these expansions a more complicated parameter 1, normally the box color, can be interpreted.
Stripes performed with a file from SVG stripe texture overlays are rather easy:
a box color as e.g. #F00
expanded by a 2-char-prefix B)#F00
will be striped by the file SVGstripesB.svg
Border definitions (for lines and borders) are bit more complicated.
Borders are defined with the three values border-color, border-width and border-style, in any sequence:
- border-color can be expressed by any valid color definition
- border-width expresses the line width with any measurement, preferable e.g. "2px".
- border-style can be solid, dotted, dashed, double, groove, ridge, inset, outset, hidden, none.
It had been thought but not performed to allow abbreviations and defaults for width and style.
It is easy to differ between the defined borders: parameter 1 containing no space is just a color code, eventually striped;
with two spaces it is only a "line"; with three spaces it's a bordered color box (sequence:color border
);
and with four spaces it's a color box containing a line
(sequence:color line
, with two spaces after color
).