mw wiki file download
Releasev0.35.0 · cfeceb67
mw wiki file download FILE [flags]Download a wiki filename (with or without File:) or a file-description URL. File-description URLs infer –wiki when it is omitted. The default format, original, preserves the uploaded bytes.
–format png or jpeg downloads MediaWiki’s rendered preview and encodes the requested format locally. SVG rendering happens on the wiki; local conversion accepts PNG, JPEG, GIF and WebP previews. Conversion exports a single still image. PNG preserves transparency; JPEG uses a white background.
–width sets the exact converted width in pixels and preserves the aspect ratio, even when the wiki returns a larger thumbnail. The default is the source width, or 1024 pixels when unknown. Large images may require a smaller width.
The default output filename is based on the wiki filename with the converted extension. Existing files require –overwrite. Use –output - to write file bytes to standard output.
Guide: mw help guides wiki files
Options
Section titled “Options”Global options
Section titled “Global options”Examples
Section titled “Examples”# Convert a Commons SVG preview to PNGmw wiki file download 'https://commons.wikimedia.org/wiki/File:Logo_of_a-wikimedia-cli.svg' --format png --width 1024 --output logo.png# Download the original uploaded filemw wiki file download 'Logo_of_a-wikimedia-cli.svg' --wiki commons.wikimedia.orgSee also
Section titled “See also”Page views: —Sessions: —