User:Supermariofan67: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
No edit summary
Line 1: Line 1:
{{User:Supermariofan67/Status}}
{{User:{{PAGENAME}}/Status}}
{{User NIWA|nwiki=Supermariofan67|strategywiki=Supermariofan67|dkwiki=Supermariofan67}}
{{br}} {{br}}
{{Character-infobox|image=[[File:Mario Artwork - Super Mario 3D World.png|170px]]|first_appearance=4 February 2017|latest_appearance={{Special:Contributions/Supermariofan67|limit=1}}'''Edit count''': {{Special:Editcount/Supermariofan67}}}}
{{Character-infobox|image=[[File:Mario Artwork - Super Mario 3D World.png|170px]]|first_appearance=4 February 2017|latest_appearance={{Special:Contributions/{{PAGENAME}}|limit=1}}'''Edit count''': {{Special:Editcount/{{PAGENAME}}}}}}
'''{{PAGENAME}}''' is a [[MarioWiki:User|User]] of the Super Mario Wiki. He has a [[Wii U]] and [[Switch]] and is a fan of the [[Super Mario (series)|''Super Mario'' series]] and [[Mario Kart (series)|Mario Kart series]]. He rewrites/expands articles, adds/replaces images, and performs various other file maintenance.
I am '''{{PAGENAME}}''', a [[MarioWiki:User|User]] of the Super Mario Wiki. I have a [[Wii U]] and [[Switch]] with the games listed at the bottom of this page. I am a fan of the [[Super Mario (series)|''Super Mario'' series]] and [[Mario Kart (series)|Mario Kart series]]. You will most likely find me doing various file and page maintenance, adding/replacing images, and sometimes rewriting/expanding articles. I often make shell scripts or use command line utilities to automate some of this work, such as optimizing or cropping images, or sorting stuff. I share some of these tips below for anyone who is interested. If you also do this type of work, I encourage you to become familiar with some basic {{wp|regular expressions}} and how to use them with your favorite text editor, such as {{wp|Notepad++}}, {{wp|Visual Studio Code}}, {{wp|Vim}}, or even the wiki's built-in editor. I also recommend learning the basics of your operating system's shell scripting language, as well as some utilities like {{wp|ImageMagick}}, {{wp|ffmpeg}}, and {{wp|GIMP}}.
 
I also edit on [https://wiibrew.org/wiki/Special:Contributions/Supermariofan67 WiiBrew Wiki] (so far just to clean up after a vandal) and [https://wiki.archlinux.org/index.php/Special:Contributions/Supermariofan67 ArchWiki], though I'm not nearly as active on those wikis as I am here.
 
{{userboxtop}}
{{userboxtop}}
{{BBL-UBX|lang=en|lvl=n|border=#6ef7a7|mainbkgd=#c5fcdc|codebkgd=#6ef7a7|}}
{{BBL-UBX|lang=en|lvl=n|border=#6ef7a7|mainbkgd=#c5fcdc|codebkgd=#6ef7a7|}}
Line 25: Line 28:


===Some common confusion about SMG/2 images===
===Some common confusion about SMG/2 images===
To clarify some definitions: upscaling isn't the same as rendering above native resolution. An image is ''upscaled'' when the file's resolution is higher than the resolution of its content (for example, when a game is rendered at 1x native resolution but screenshot in Dolphin's full screen mode, or if the image is artificially resized with an image editor.) This causes unnecessary file bloat and should usually be discouraged. However, this is not the same as setting the emulator to ''render above native resolution'' (in multiples of the native resolution via the Auto setting in Dolphin.) This produces images whose actual content is in high resolution, and thus does not waste file size. According to {{user|Wildgoosespeeder}}'s [[User:Wildgoosespeeder/sandbox|screenshot guide]], it is acceptable to capture Wii screenshots above 1x native resolution due to Dolphin's inconsistencies with producing native resolution screenshots without upscaling or stretching (read that guide for more info). For SMG/2, I follow that guide to produce 1920x1048, above native screenshots.  
To clarify some definitions: upscaling isn't the same as rendering above native resolution. An image is ''upscaled'' when the file's resolution is higher than the resolution of its content (for example, when a game is rendered at 1x native resolution but screenshot in Dolphin's full screen mode, or if the image is artificially resized with an image editor.) This causes unnecessary file bloat and should usually be discouraged. However, this is not the same as setting the emulator to ''render above native resolution'' (in multiples of the native resolution via the Auto setting in Dolphin.) This produces images whose actual content is in high resolution, and thus does not waste file size. According to {{user|Wildgoosespeeder}}'s [[User:Wildgoosespeeder/sandbox|screenshot guide]], it is acceptable to capture Wii screenshots above 1x native resolution due to Dolphin's inconsistencies with producing native resolution screenshots without upscaling or stretching (read that guide for more info). For SMG/2, I follow that guide to produce 1920x1048, above native screenshots.<br>
 
I usually replace an SMG/2 image if:
I usually replace an SMG/2 image if:
* Its aspect ratio is not a multiple of the game's normal widescreen aspect ratio, such as 1920x1054.
* Its aspect ratio is not a multiple of the game's normal widescreen aspect ratio, such as 1920x1054.
Line 34: Line 38:
===Moving Images===
===Moving Images===
* I follow [[User:Trig Jegman#Occasionally used terminology|Trig Jegman's guidelines and abbreviations]] when moving images. However, I additionally may use the abbreviation '''UTS''', meaning "underscore to space." Within articles, MediaWiki usually treats spaces and underscores the same, but generally images should be linked with spaces, such as if "File:Image Name.png" were linked in an article as "File:Image_Name.png," similar to how File: is preferred over Image:, or how File: is unnecessary in galleries. So I will often quickly fix those (RIF and UTS) when passing through a page to change filenames. Both of these can easily be done with the wiki's find and replace function (the button in the top-right corner of the editing box).
* I follow [[User:Trig Jegman#Occasionally used terminology|Trig Jegman's guidelines and abbreviations]] when moving images. However, I additionally may use the abbreviation '''UTS''', meaning "underscore to space." Within articles, MediaWiki usually treats spaces and underscores the same, but generally images should be linked with spaces, such as if "File:Image Name.png" were linked in an article as "File:Image_Name.png," similar to how File: is preferred over Image:, or how File: is unnecessary in galleries. So I will often quickly fix those (RIF and UTS) when passing through a page to change filenames. Both of these can easily be done with the wiki's find and replace function (the button in the top-right corner of the editing box).
* Here is a tip to find images with special characters that may need to be renamed. With a list of image names in a text editor such as Notepad++ or VScode, search for the regex <code><nowiki>[^a-zA-Z\d\s:\[\]\.\-\']</nowiki></code>. This will highlight any characters other than letters, numbers, wiki syntax, hyphens, and apostrophies, making it easier to identify images that may need renaming, such as [[:File:YWW ★-S Shiny Platinum Yoshi.jpg]].
* Here is a tip to find images with special characters that may need to be renamed. With a list of image names in a text editor such as Notepad++ or VScode, search for the regex <code><nowiki>[^a-zA-Z\d\s:\[\]\.\-\']</nowiki></code>. This will highlight any characters other than letters, numbers, wiki syntax, hyphens, and apostrophies, making it easier to identify images that may need [[User:Trig Jegman#Occasionally used terminology|technical renaming]], such as [[:File:YWW ★-S Shiny Platinum Yoshi.jpg]].


===Sort galleries alphabetically===
===Sort galleries alphabetically===
To sort a gallery alphabetically, put the code contents in a text file and run the command <code>awk -F'|' '{ print $NF "|" $0 }' filename | sort -t '|' -k1 | cut -d '|' -f2-4</code> on it. This sorts alphabetically by the contents of the last text field, with text fields, in this case, separated by "|", therefore grabbing the display names of links. By default, this will ignore special characters, such as <code><nowiki>[[</nowiki></code>, which is generally desired. If you want to sort all characters literally, run <code>export LC_ALL=C</code> first.
To sort a gallery alphabetically, put the code contents in a text file and run the command <code>awk -F'|' '{ print $NF "|" $0 }' filename | sort -t '|' -k1 | cut -d '|' -f2-4</code> on it. This sorts alphabetically by the contents of the last text field, with text fields, in this case, separated by "|", therefore grabbing the display names of links. By default, this will ignore special characters, such as <code><nowiki>[[</nowiki></code>, which is generally desired. If you want to sort all characters literally, run <code>export LC_ALL=C</code> first. Note that if a gallery has multiple entries for a particular subject, this will sort the bare text, such as <code><nowiki>Goomba2.png|Goomba</nowiki></code> above the linked text, such as <code><nowiki>Goomba2.png|[[Goomba]]</nowiki></code>, so that should be manually checked.


===Tricks with imagemagick===
===Tricks with imagemagick===
Line 48: Line 52:
* [https://imagemagick.org/script/command-line-processing.php How to use ImageMagick]
* [https://imagemagick.org/script/command-line-processing.php How to use ImageMagick]
* [https://imagemagick.org/script/convert.php ImageMagick functions]
* [https://imagemagick.org/script/convert.php ImageMagick functions]
* [https://youtube.com/watch?v=D8pcvkRsx1gA video by Luke Smith explaining ImageMagick.]
* [https://youtube.com/watch?v=D8pcvkRsx1g A video by Luke Smith explaining ImageMagick.]
{{br}}
{{br}}


===A script to automatically optimize all PNGs in a folder===
===A script to automatically optimize all PNGs in a folder===
This should be equivalent to running [[User:Wildgoosespeeder/PNG Monstrous|PNG Monstrous]] with the pngout and zopflipng options enabled. Additionally, it will convert BMPs to PNGs and uncapitalize file extensions. This script requires zopflipng, pngout, and GNU Parallel. It will run {{wp|PNGOUT|pngout}} and {{wp|Zopfli|zopflipng}} on all pngs, PNGs, bmps, and BMPs in the current directory and output the compressed images to the ./optimized directory with a lowercase .png filename. Zopfli uses the <code>-m</code> ("<code>compress more: use more iterations</code>") and <code>--lossy_transparent</code> ("<code>remove colors behind alpha channel 0. No visual difference, removes hidden information.</code>") options. It will compress multiple images in parallel, up to the number of CPU cores in your computer. This script is intended for Unix-like operating systems, such as Linux and MacOS. You will need to install Zopflipng and GNU Parallel with your package manager (for MacOS, use the [https://brew.sh/ Brew] package manager). I'm not sure about Windows, but you can probably use this in the {{wp|Windows Subsystem for Linux}}, or maybe find a way to port this to a native PowerShell script. You will probably need to download pngout [https://web.archive.org/web/20190602193301/http://advsys.net/ken/utils.htm manually] and place it in in a directory in your PATH, such as ~/bin, as it is not available in most package managers. With the required programs installed, just put this code in a text file saved in ~/bin or in the folder where your PNGs are, <code>chmod +x</code> it, and it should work. If not, you can just manually run the two commands while in the folder with the PNGs. It's less convenient, but it would do the same thing.<br>
This should be equivalent to running [[User:Wildgoosespeeder/PNG Monstrous|PNG Monstrous]] with the pngout and zopflipng options enabled. Additionally, it will convert BMPs to PNGs and uncapitalize file extensions. This script requires zopflipng, pngout, and GNU Parallel. It will run {{wp|PNGOUT|pngout}} and {{wp|Zopfli|zopflipng}} on all pngs, PNGs, bmps, and BMPs in the current directory and output the compressed images to the ./optimized directory with a lowercase .png filename. Zopfli uses the <code>-m</code> ("<code>compress more: use more iterations</code>") and <code>--lossy_transparent</code> ("<code>remove colors behind alpha channel 0. No visual difference, removes hidden information.</code>") options. It will compress multiple images in parallel, up to the number of CPU cores in your computer. This script is intended for Unix-like operating systems, such as Linux and MacOS. You will need to install Zopflipng and GNU Parallel with your package manager (for MacOS, use the [https://brew.sh/ Brew] package manager). I'm not sure about Windows, but you can probably use this in the {{wp|Windows Subsystem for Linux}}, or maybe find a way to port this to a native PowerShell script. You will probably need to download pngout [https://web.archive.org/web/20190602193301/http://advsys.net/ken/utils.htm manually] and place it in in a directory in your PATH, such as ~/bin, as it is not available in most package repositories (though it is [https://aur.archlinux.org/packages/pngout/ in the AUR]). With the required programs installed, just put this code in a text file saved in ~/bin or in the folder where your PNGs are, <code>chmod +x</code> it, and it should work. If not, you can just manually run the two commands while in the folder with the PNGs. It's less convenient, but it would do the same thing.<br>
{|
{|
|style="background:#f8f9fa; font-family:monospace; font-size:14px"|
|style="background:#f8f9fa; font-family:monospace; font-size:14px"|
Line 116: Line 120:
</gallery>
</gallery>


==Big projects he has completed==
==Big projects I have completed==
*[https://www.mariowiki.com/index.php?title=Princess_Peach%27s_Castle&diff=2129255&oldid=2120072 Rewrote] part of the [[Peach's Castle]] article
*[https://www.mariowiki.com/index.php?title=Princess_Peach%27s_Castle&diff=2129255&oldid=2120072 Rewrote] part of the [[Peach's Castle]] article
*[https://www.mariowiki.com/index.php?title=List_of_Super_Mario_Galaxy_glitches&curid=85499&diff=2139460&oldid=2054074 Rewrote] [[List of Super Mario Galaxy glitches]]
*[https://www.mariowiki.com/index.php?title=List_of_Super_Mario_Galaxy_glitches&curid=85499&diff=2139460&oldid=2054074 Rewrote] [[List of Super Mario Galaxy glitches]]