Supermariofan67

Joined February 4, 2017
m
Text replacement - "[Cc]haracter-infobox" to "character infobox"
m (Text replacement - "[Cc]haracter-infobox" to "character infobox")
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{User:{{PAGENAME}}/Status}}
{{User:{{PAGENAME}}/Status}}
{{br}} {{br}}
{{br}} {{br}}
{{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}}}}}}
{{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}}}}}}
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 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}}.


Line 12: Line 12:
{{userbox|border=#C0C8FF|mainbkgd=#F0F8FF|codebkgd=#C0C8FF|codecolor=#000000|code=<span style="font-size:12pt">'''sprite-1'''</span>|msg=This user is a n00b on ripping sprites.}}
{{userbox|border=#C0C8FF|mainbkgd=#F0F8FF|codebkgd=#C0C8FF|codecolor=#000000|code=<span style="font-size:12pt">'''sprite-1'''</span>|msg=This user is a n00b on ripping sprites.}}
{{userbox|border=#FFFF88|mainbkgd=#c4daff|codebkgd=#adccff|codecolor=black|code=PNG|msg=This user applies [[User:Wildgoosespeeder/PNG Monstrous|PNG Monstrous]], [https://imageoptim.com/mac ImageOptim], or pngout/zopflipng to all PNGs he uploads.}}
{{userbox|border=#FFFF88|mainbkgd=#c4daff|codebkgd=#adccff|codecolor=black|code=PNG|msg=This user applies [[User:Wildgoosespeeder/PNG Monstrous|PNG Monstrous]], [https://imageoptim.com/mac ImageOptim], or pngout/zopflipng to all PNGs he uploads.}}
{{userbox|border=#FFFF88|mainbkgd=#FFFF88|codebkgd=#FFFF00|codecolor=black|code=[[File:Penguin.png|40px]]|msg=This user uses GNU/Linux!}}
{{userbox|border=#FFFF88|mainbkgd=#FFFF88|codebkgd=#FFFF00|codecolor=black|code=[[File:SMG Penguin Artwork.png|40px]]|msg=This user uses GNU/Linux!}}
{{userbox|border=#BB0000|mainbkgd=#BB0000|codebkgd=#FFB3B3|codecolor=black|code=[[File:Babypeachsimple.png|40px]]|msg=This user's least favorite character is [[Baby Peach]].}}
{{userbox|border=#BB0000|mainbkgd=#BB0000|codebkgd=#FFB3B3|codecolor=black|code=[[File:Babypeachsimple.png|40px]]|msg=<font color="white>This user's least favorite character is [[Baby Peach]].</font>}}
{{userbox|border=#00BB00|mainbkgd=#00BB00|codebkgd=#FFB3B3|codecolor=black|code=[[File:Yoshi - Mario Party 10.png|40px]]|msg=This user's favorite character is [[Yoshi]].}}
{{userbox|border=#00BB00|mainbkgd=#00BB00|codebkgd=#FFB3B3|codecolor=black|code=[[File:Yoshi - Mario Party 10.png|40px]]|msg=This user's favorite character is [[Yoshi]].}}
{{userbox|border=#888888|mainbkgd=#888888|codebkgd=#6EF7A7|codecolor=black|code=[[File:Wii console.png|40px]]|msg=This user's favorite console is the Wii.}}
{{userbox|border=#888888|mainbkgd=#888888|codebkgd=#6EF7A7|codecolor=black|code=[[File:Wii console.png|40px]]|msg=This user's favorite console is the Wii.}}
{{userbox|border=#6EF7A7|mainbkgd=#C5FCDC|codebkgd=#6EF7A7|codecolor=black|code=[[File:Super Mario Galaxy NA Box Art.jpg|40px]]|msg=This user thinks that [[Super Mario Galaxy]] is the best video game ever made.}}
{{userbox|border=#6EF7A7|mainbkgd=#C5FCDC|codebkgd=#6EF7A7|codecolor=black|code=[[File:Super Mario Galaxy NA Box Art.jpg|40px]]|msg=This user thinks that [[Super Mario Galaxy]] is the best ''Mario'' game ever made.}}
{{userbox|border=#6EF7A7|mainbkgd=#C5FCDC|codebkgd=#6EF7A7|codecolor=black|code=[[File:Mario_Series_Logo.PNG|40px]]|msg=This user thinks that ''[[Super Mario (series)|Super Mario]]'' is the best video game series ever established.}}
{{userbox|border=#6EF7A7|mainbkgd=#C5FCDC|codebkgd=#6EF7A7|codecolor=black|code=[[File:Mario Series Logo.svg|40px]]|msg=This user thinks that ''[[Super Mario (series)|Super Mario]]'' is the best video game series ever established.}}
{{userbox|border=#DDDDFF|mainbkgd=#DDDDFF|codebkgd=#000080|codecolor#000000|code=[[File:music.gif]]|msg=This user's favorite music genre is trance.}}
{{userbox|border=#DDDDFF|mainbkgd=#DDDDFF|codebkgd=#000080|codecolor#000000|code=[[File:music.gif]]|msg=This user's favorite music genre is trance.}}
|}
|}
==Gallery of my favorite images from the wiki==
<gallery>
MKW Mii Trick Side.png|T-pose for dominance
SMG2 Fearsome Fleet Green Star 2.png
</gallery>


==Tech Stuff==
==Tech Stuff==
Line 44: Line 50:


===Sorting Galleries===
===Sorting Galleries===
I'm working on a simple Java program to automatically sort galleries. Once I know it always works properly and has no strange bugs, I will release it on GitHub. In the meantime, if you see any galleries that need to be sorted alphabetically, let me know and I'll take care of it.
I have made a simple Java program/script to automatically sort galleries alphabetically. It is now [https://github.com/tsweet64/mw-editing-tools on GitHub] if anyone is interested. However, please note that I have not extensively tested it, and if you use it, you should double-check the result to make sure nothing was removed/broken in the gallery. Please tell me about any bugs.


===Tricks with imagemagick===
===Tricks with imagemagick===
Line 59: Line 65:


===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 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>
This should be equivalent to running [[User:Wildgoosespeeder/PNG Monstrous|PNG Monstrous]] with the pngout and zopflipng options enabled, but will also preserve the iCCP chunk to hopefully prevent color changes to images with gamma adjustment. 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 65: Line 71:
#!/bin/sh</nowiki><br><nowiki>
#!/bin/sh</nowiki><br><nowiki>
mkdir optimized</nowiki><br><nowiki>
mkdir optimized</nowiki><br><nowiki>
parallel 'pngout '{}' './optimized/{.}.png' ; zopflipng --lossy_transparent -m -y './optimized/{.}.png' './optimized/{.}.png'' ::: "$(find * -maxdepth 0 -type f -name "*.png" -o -name "*.PNG" -o -name "*.bmp" -o -name "*.BMP")"</nowiki>
parallel 'pngout -kiCCP,gAMA,cHRM '{}' './optimized/{.}.png' ; zopflipng --lossy_transparent --keepchunks=iCCP,gAMA,cHRM -m -y './optimized/{.}.png' './optimized/{.}.png'' ::: "$(find * -maxdepth 0 -type f -name "*.png" -o -name "*.PNG" -o -name "*.bmp" -o -name "*.BMP")"</nowiki>
|
|
|}
|}
Line 79: Line 85:
parallel mogrify -path trimmed -quality 95 -trim '{}' ::: "$(find * -maxdepth 0 -type f -name "*.png" -o -name "*.jpg" -o -name "*.jpeg" -o -name "*.PNG" -o -name "*.JPG")"</nowiki><br><nowiki>
parallel mogrify -path trimmed -quality 95 -trim '{}' ::: "$(find * -maxdepth 0 -type f -name "*.png" -o -name "*.jpg" -o -name "*.jpeg" -o -name "*.PNG" -o -name "*.JPG")"</nowiki><br><nowiki>
cd trimmed</nowiki><br><nowiki>
cd trimmed</nowiki><br><nowiki>
parallel 'pngout '{}' ; zopflipng --lossy_transparent -m -y '{}' '{}'' ::: "$(find * -maxdepth 0 -type f -name "*.png" -o -name "*.PNG")"
parallel 'pngout -kiCCP,gAMA,cHRM '{}' ; zopflipng --lossy_transparent --keepchunks=iCCP,gAMA,cHRM -m -y '{}' '{}'' ::: "$(find * -maxdepth 0 -type f -name "*.png" -o -name "*.PNG")"
</nowiki>
</nowiki>
|
|
Line 93: Line 99:
New Super Mario Bros box.png|''[[New Super Mario Bros.]]'' (Wii U VC)
New Super Mario Bros box.png|''[[New Super Mario Bros.]]'' (Wii U VC)
Super Mario Galaxy NA Box Art.jpg|''[[Super Mario Galaxy]]''
Super Mario Galaxy NA Box Art.jpg|''[[Super Mario Galaxy]]''
Mariobox-noscale.jpg|''[[New Super Mario Bros. Wii]]''
NSMBW NA Box Art.jpg|''[[New Super Mario Bros. Wii]]''
SMAS.jpg|''[[Super Mario All Stars]]'' (Wii)
SMAS.jpg|''[[Super Mario All Stars]]'' (Wii)
Smg2boxart.png|''[[Super Mario Galaxy 2]]''
Smg2boxart.png|''[[Super Mario Galaxy 2]]''
Line 100: Line 106:
SMR Logo Final.png|''[[Super Mario Run]]''
SMR Logo Final.png|''[[Super Mario Run]]''
SuperMarioOdyssey - NA boxart.jpg|''[[Super Mario Odyssey]]''
SuperMarioOdyssey - NA boxart.jpg|''[[Super Mario Odyssey]]''
Box NA-Super Mario 3D All-Stars.png|''[[Super Mario 3D All-Stars]]''
</gallery>
</gallery>
===''Mario Kart'' series===
===''Mario Kart'' series===
<gallery>
<gallery>
SMK BoxCover1.jpg|''[[Super Mario Kart]]'' (Wii U VC)
SMK NA Box Cover.jpg|''[[Super Mario Kart]]'' (Wii U VC)
MK64 Cover.png|''[[Mario Kart 64]]'' (Wii VC)
MK64 Cover.png|''[[Mario Kart 64]]'' (Wii VC)
Mkwii.jpg|''[[Mario Kart Wii]]''
Mkwii.jpg|''[[Mario Kart Wii]]''
Box NA - Mario Kart 8.jpg|''[[Mario Kart 8]]''
MK8 NA Box Art.jpg|''[[Mario Kart 8]]''
Mario Kart Tour Logo.png|''[[Mario Kart Tour]]''
</gallery>
</gallery>
===''Donkey Kong'' series===
===''Donkey Kong'' series===
<gallery>
<gallery>
Line 120: Line 129:
YWW NA Boxart.png|''[[Yoshi's Woolly World]]''
YWW NA Boxart.png|''[[Yoshi's Woolly World]]''
SSB Ultimate box art.png|''[[Super Smash Bros. Ultimate]]''
SSB Ultimate box art.png|''[[Super Smash Bros. Ultimate]]''
SM 2 Box Art.png|''[[Super Mario Maker 2]]''
SMM2 Box Art.png|''[[Super Mario Maker 2]]''
</gallery>
</gallery>


Line 133: Line 142:
*Made {{tem|fa-archive}} easier to use and consistent with similar templates
*Made {{tem|fa-archive}} easier to use and consistent with similar templates
*Cropped to content and compressed many artwork images
*Cropped to content and compressed many artwork images
*'''Replaced a massive number of low-quality ''[[Super Mario Galaxy 2]]'' screenshots'''
*'''Replaced a massive number of low-quality ''[[Super Mario Galaxy]]'', ''[[Super Mario Galaxy 2]]'', and ''[[Mario Kart Wii]]'' screenshots'''
*Wrote most of [[MarioWiki:Image optimization]]