Commons:Commons SVG Checker/Documentation
SVG is a very popular and high quality format for graphics on Wikimedia project. Nevertheless Wikimedia doesn't deliver SVG files but provides rendered PNG files by default. To generate PNG files from SVG it internally relies on librsvg. As implementation of complex standards get never completed there is no full support of SVG and bugs are present as well.
To simplify resolving well known issues with librsvg the Commons SVG Checker parses the SVG data for the problematic structures and prints a report with useful hints.
Usage
[edit]First of all Commons SVG Checker requires to load its JS that contains its logic to work. If the load request for JS is not given in the URL while retrieving Commons:Commons SVG Checker page a button shows up on the first lines of the page. After clicking that button the page is reloaded including the missing JS.
There after three sections appear. The File loading section provides two input fields with a button beneath. The first is for referencing files available on Commons by providing its page name (e.g. File:Example.svg). The second input field opens a file menu after clicking on it and provides the option to load files from local file system to the checker. Each input field has an execute button. After clicking on that a check of the select SVG file is executed. Results of the check are provided in section Analyser Log providing hints of possible issues and some meta information. With a short transmission delay as well the SVG file is rendered as PNG in the Preview. (It is sent to a service providing librsvg setup very similar to Wikimedia). Each time the check is executed the previous results get deleted.
Features
[edit]- Can access files on Commons
- Files on Commons can be referenced via URL parameter
- Also local files can be used and no upload to commons is necessary
- Metrics available via Pageviews Analysis
- Written in JS the programming language of Wikipedia scripters
- Uses XML processor so it is easily extensible with simple code
Retrieve version of SVG renderer used to create preview images here.
Known Issues
[edit]- Poor URL encoding
- File:Flag_of_the_Tuvan_People's_Republic_(1930-1933).svg // Namespace
- Lots of typos...
- ...
Tests
[edit]- https://upload.wikimedia.org/wikipedia/commons/archive/a/a5/20051009221429!Map_of_USA_with_state_names.svg T5537 // cannot be uploaded
- https://upload.wikimedia.org/wikipedia/commons/archive/8/80/20160217195201!Map_Ubaid_culture-en.svg data:; // cannot be uploaded
- T7792 - partly fixed
- T11420
- T32033
- T35245
- T43422
- T43424
- T43426
- T55899
- T65236
T65703fixed- T68672
T117530fixed- TXXX https://bugzilla.gnome.org/show_bug.cgi?id=645201