Benutzer:SVGWorkaroundBot
- Commons:c:User:SVGWorkaroundBot (With bot-flag on commons)
Dieser Benutzer ist ein Bot ohne Bot-Flag. Er wird von JoKalliauer betrieben.
|
Operator: JoKalliauer (talk • Contributions (global) • E-Mail • Log • blocks (empty) • xtools • created pages (commons) • Meta-Right-Logbook • uploaded Pictures (commons) • registration • SUL • page-moves • File-Log • Review-Logbook • Special:ListUsers • created redirections • subpages • other Wikis)
Tasks/Function overview: Will repair some c:Librsvg_bugs: phab:T32033, phab:T35245, phab:T55899, phab:T68672, phab:T184369, phab:T193929, phab:T194192
Operation (Automatic, Supervised, or Manual): Manually assisted or Supervised (depening on number of files)
When/Edit period(s): have to be started manually for each file
Maximum edit rate/Estimated number of pages affected: 6 edits per minute
en:Programming language(s): en:Shell script using en:Sed
en:Source code available: c:User:SVGWorkaroundBot/source
Time filed/last updated: 22:05, 14 October 2018 (UTC)
Links to relevant discussions:
- Updating Librsvg: phab:T193352 (phab:T40010#4432887 reports which famous bugs are fixed meanwile)
- c:Librsvg_bugs and c:Category:Pictures_showing_a_librsvg_bug show some bugs
- most pictures contained such bugs, can be found here: c:Category:Pictures_showing_a_librsvg_bug_(overwritten_with_a_workaround) (they were prozessed externally)
- in many Grafic-Labs such as c:Commons:Graphic_Lab/Illustration_workshop are commonly requests about librsvgbugs
- many editors know Commons:Commons:Commons_SVG_Checker, but it only reports mistakes, but cannot solve them, which is useless if you have a file such as File:WI_Area_Codes.svg that has ~1MB, and newer bugs such as phab:T184369, phab:T193929, phab:T194192 are unchecked.
Function details: Some Librsvg-Bugs should be repaired:
- phab:T68672
sed -i "s/<style>/<style type=\"text\/css\">/"
(f.e. File:Cityfone_logo.svg) - phab:T32033
sed -ri 's/stroke-dasharray=\"([[:digit:]\., ]*)([[:digit:]\.]+) ([[:digit:]\., ]+)\"/stroke-dasharray=\"\1\2,\3\"/g'
(f.e. File:EKG-Reto_001.svg) - phab:T55899
sed -ri "s/<mask([[:alnum:] =\"]*) maskUnits=\"userSpaceOnUse\"( id=\"[[:alnum:]_]+\"|)>/<mask\1\2>/g"
(f.e. File:SVG_mask.svg) - phab:T184369
sed -ri "s/font-family=\"'([-[:alnum:] ]*)'(|,[-[:lower:]]+)\"/font-family=\'\1\'/g"
(f.e. File:T184369.svg) - phab:T35245 one of the following:
sed -ri "s/<tspan([-[:alnum:]\.\"\#\ =]*) x=\"([-[:digit:]\.]+)( |,)([-[:digit:]\. ,]+)\"([-[:alnum:]\.\"\#\ =]*)>/<tspan x=\"\2\" \1 \5>/g"
(f.e. File:WI_Area_Codes.svg)sed -ri "s/<tspan([-[:alnum:]\.\"\#\ =]*) x=\"([-[:digit:]\.]+)( |,)([-[:digit:]\. ,]+)\"([-[:alnum:]\.\"\#\ =]*)>([[:alnum:]])/<tspan x=\"\2\" \1 \5>\6<\/tspan><tspan x=\"\4\" \1 \5>/g"
(f.e. File:Kalliauer_et_al_2018_Acta_Mechanica_Fig11.svg)
- phab:T193929
sed -i "s/ xlink:href=\"data:image\/jpg;base64,/ xlink:href=\"data:image\/jpeg;base64,/g"
(f.e. File:Barents_Sea_map_hr.svg) - phab:T194192
sed -ri "s/<svg([-[:alnum:]=\" ]*) viewBox=\"0,0,([[:digit:]\.]*),([[:digit:]\.]*)\"/<svg\1 viewBox=\"0 0 \2 \3\"/g"
(f.e. File:WikiImplementationBug_T194192.svg) - remove CDATA
sed -ri -e ':a' -e 'N' -e '$!ba' -e "s/<\!\[CDATA\[([[:alnum:]=+\/\t\n[:space:]@:;\(\)\"\,\'\{\}\-])*\t\]\]>[[:space:]]*//g"
(f.e. File:Map-Awala_Yalimpo.svg) - remove jpeg in metadata
sed -ri -e ':a' -e 'N' -e '$!ba' -e "s/<xapGImg:image>([[:alnum:][:space:]\/+])*={0,2}[[:space:]]*<\/xapGImg:image>//g"
(f.e. File:Harta_dialectului_lemosin.svg) - add mimetype:
sed -i "s/ xlink:href=\"data:;base64,\/9j\/4AAQSkZJRgABAgAAZABkAAD\/7AARRHVja3kAAQAEAAAAHgAA/ xlink:href=\"data:image\/jpeg;base64,\/9j\/4AAQSkZJRgABAgAAZABkAAD\/7AARRHVja3kAAQAEAAAAHgAA/"
(f.e. File:Asia.svg)sed -ri "s/ xlink:href=\"data:;base64,( |)iVBORw0KGgoAAAANSUhEUgAA/ xlink:href=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAA/"
(f.e. File:Historical_map_of_Georgia_1267_BC.svg) - Replaced "href" with "xlink:href" (f.e. File:Eliandthethirteenthconfession_logo.svg done by User:TilmannR)