User talk:Perhelion/cleanup.js

Latest comment: 2 years ago by Sarang in topic Removal of obsolete entries

0Currently User:Perhelion/cleanup.js is not performed, cleanup is done by User:Sarang/cleanup.js 0
see also User talk:Sarang/cleanup.js

Cleanup edit

The 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 basedfilenameby = usernamed = 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 edit

There 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 with by=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

  1. 1997kB
  2. 2147483647
  3. 4nn1l2*
  4. AntiCompositeNumber *
  5. AtomicMario
  6. ARR8
  7. Begoon
  8. Berrely
  9. BrianYWH
  10. Carnby
  11. Clpo13 *
  12. CptViraj *
  13. D6283
  14. Dvorapa
  15. EduardoFP7
  16. Eiim
  17. Ezarate *
  18. Fredddie
  19. Grolltech
  20. Hbf878
  21. Hello71
  22. Huntster*
  23. Janbery
  24. Jayprakash12345
  25. Jmarchn
  26. Jonteemil
  27. Kirilloparma
  28. Liuxinyu970226
  29. Macucal
  30. Michel Bakni
  31. NikNaks
  32. Niridya
  33. Perhelion *
  34. Pokechu22
  35. Premeditated
  36. RaFaDa20631
  37. RogueScholar
  38. Samuel Wiki
  39. Senator2029
  40. Shyamal
  41. The Eloquent Peasant
  42. Thibaut120094
  43. User456541
  44. Vulphere
  45. Wallroth
  46. Yeeno
  47. علاء *

- the testversion (with cleanup):

  1. Kalliauer
  2. Minorax*
  3. Mrmw
  4. Petrus3743
  5. RicHard-59
  6. Smokefoot
  7. Vanisaac

- the sandbox (currently unavailable):

  1. Sarang

- sarang사랑 14:00, 16 December 2020 (UTC)Reply

File generation description edit

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)Reply

Removal of obsolete entries edit

Galleries edit

When the files in the file list for a gallery are prefixed with "File:" (or "Image:"), this useless namespace is removed.

Technical basics to 1= edit

There 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
  1. the parameter is specified outside its positional order, or
  2. 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)Reply

Language templates edit

When the value is a text string without any equal sign, templates as e.g. {{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. Law of 9/22:

Chemical structures and equations edit

To 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.

Legtab expansions edit

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).

Return to the user page of "Perhelion/cleanup.js".