RazrFalcon / svgcleaner

svgcleaner could help you to clean up your SVG files from the unnecessary data.
GNU General Public License v2.0
1.63k stars 94 forks source link

removes unicode-text #192

Open JoKalliauer opened 5 years ago

JoKalliauer commented 5 years ago

$ svgcleaner Input.svg.txt Output.svg.txt --allow-bigger-file --indent 1 --no-defaults

removes all unicode-character in text ("                         "), maybe similar to #169

Input

Input.svg.txt

<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 1624.5 882.26" xmlns="http://www.w3.org/2000/svg">
 <text transform="scale(.99127 1.0088)" x="680.0743" y="111.6791" font-family="Symbol" font-size="86.249" stroke-width="13.22"><tspan x="680.0743" y="111.6791"></tspan></text>
 <text transform="scale(.99127 1.0088)" x="940.742" y="111.6791" font-family="Symbol" font-size="86.249" stroke-width="13.22"><tspan x="940.742" y="111.6791"></tspan></text>
 <text transform="scale(.99127 1.0088)" x="1187.7" y="111.6791" font-family="Symbol" font-size="86.249" stroke-width="13.22"><tspan x="1187.7" y="111.6791"></tspan></text>
 <text transform="scale(.67101 1.4903)" x="1195.4126" y="93.851" font-family="Symbol" font-size="120.79" stroke-width="8.9501"><tspan x="1195.4078 1888.0665" y="93.851"></tspan></text>
 <text transform="scale(.99127 1.0088)" x="680.0743" y="387.6467" font-family="Symbol" font-size="86.249" stroke-width="13.22"><tspan x="680.0743" y="387.6467"></tspan></text>
 <text transform="scale(.99127 1.0088)" x="940.742" y="387.6467" font-family="Symbol" font-size="86.249" stroke-width="13.22"><tspan x="940.742" y="387.6467"></tspan></text>
 <text transform="scale(.99127 1.0088)" x="1187.7" y="387.6467" font-family="Symbol" font-size="86.249" stroke-width="13.22"><tspan x="1187.7" y="387.6467"></tspan></text>
 <text transform="scale(.67101 1.4903)" x="1195.4126" y="280.663" font-family="Symbol" font-size="120.79" stroke-width="8.9501"><tspan x="1195.4078 1888.0665" y="280.663"></tspan></text>
 <text transform="scale(.99011 1.01)" x="-1.1" y="780.0922" font-family="Symbol" font-size="86.491" stroke-width="13.2"><tspan x="-1.1" y="780.0922"></tspan></text>
 <text transform="scale(.99011 1.01)" x="126.562" y="780.0922" font-family="Symbol" font-size="86.491" stroke-width="13.2"><tspan x="126.5644 191.2137" y="780.0922"></tspan></text>
 <text transform="scale(.99011 1.01)" x="342.2854" y="780.0922" font-family="Symbol" font-size="86.491" stroke-width="13.2"><tspan x="342.2854" y="780.0922"></tspan></text>
 <text transform="scale(.99011 1.01)" x="540.2784" y="780.0922" font-family="Symbol" font-size="86.491" stroke-width="13.2"><tspan x="540.2784" y="780.0922"></tspan></text>
 <text transform="scale(.9901 1.01)" x="403.5323" y="709.5439" font-family="Symbol" font-size="86.49" stroke-width="13.2"><tspan x="403.5323" y="709.5439"></tspan></text>
 <text transform="scale(.99011 1.01)" x="403.7264" y="856.9334" font-family="Symbol" font-size="86.491" stroke-width="13.2"><tspan x="403.7264" y="856.9334"></tspan> <tspan x="403.7264" y="790.3924"></tspan></text>
 <text transform="scale(.9901 1.01)" x="716.214" y="709.5439" font-family="Symbol" font-size="86.49" stroke-width="13.2"><tspan x="716.214" y="709.5439"></tspan></text>
 <text transform="scale(.99011 1.01)" x="716.4212" y="856.9334" font-family="Symbol" font-size="86.491" stroke-width="13.2"><tspan x="716.4212" y="856.9334"></tspan> <tspan x="716.4212" y="790.3924"></tspan> <tspan x="759.2418" y="780.1022"></tspan></text>
 <text transform="scale(.99011 1.01)" x="962.0451" y="780.0922" font-family="Symbol" font-size="86.491" stroke-width="13.2"><tspan x="962.0451" y="780.0922"></tspan></text>
 <text transform="scale(.9901 1.01)" x="815.5845" y="709.5439" font-family="Symbol" font-size="86.49" stroke-width="13.2"><tspan x="815.5845" y="709.5439"></tspan></text>
 <text transform="scale(.99011 1.01)" x="815.8028" y="856.9334" font-family="Symbol" font-size="86.491" stroke-width="13.2"><tspan x="815.8028" y="856.9334"></tspan> <tspan x="815.8028" y="790.3924"></tspan></text>
 <text transform="scale(.9901 1.01)" x="1138.7764" y="709.5439" font-family="Symbol" font-size="86.49" stroke-width="13.2"><tspan x="1138.7764" y="709.5439"></tspan></text>
 <text transform="scale(.9901 1.01)" x="1138.7764" y="856.8647" font-family="Symbol" font-size="86.49" stroke-width="13.2"><tspan x="1138.7764" y="856.8647"></tspan></text>
 <text transform="scale(.9901 1.01)" x="1138.7764" y="790.3343" font-family="Symbol" font-size="86.49" stroke-width="13.2"><tspan x="1138.7764" y="790.3343"></tspan></text>
 <text transform="scale(.99139 1.0087)" x="1213.3713" y="782.6938" font-family="Symbol" font-size="87.142" stroke-width="13.22"><tspan x="1213.3713" y="782.6938"></tspan></text>
 <text transform="scale(.99139 1.0087)" x="1423.9851" y="721.6227" font-family="Symbol" font-size="87.142" stroke-width="13.22"><tspan x="1423.9851" y="721.6227"></tspan></text>
 <text transform="scale(.84646 1.1814)" x="1503.3658" y="624.9125" font-family="Symbol" font-size="96.72" stroke-width="11.29"><tspan x="1503.3661 1843.5959" y="624.9125"></tspan></text>
</svg>

Input

Output

The output is: Output.svg.txt

<?xml version="1.0" encoding="UTF-8"?>
<svg viewBox="0 0 1624.5 882.26" xmlns="http://www.w3.org/2000/svg">
 <text font-family="Symbol" font-size="86.249" stroke-width="13.22" transform="matrix(.99127 0 0 1.0088 0 0)" x="680.0743" y="111.6791"><tspan x="680.0743" y="111.6791"/></text>
 <text font-family="Symbol" font-size="86.249" stroke-width="13.22" transform="matrix(.99127 0 0 1.0088 0 0)" x="940.742" y="111.6791"><tspan x="940.742" y="111.6791"/></text>
 <text font-family="Symbol" font-size="86.249" stroke-width="13.22" transform="matrix(.99127 0 0 1.0088 0 0)" x="1187.7" y="111.6791"><tspan x="1187.7" y="111.6791"/></text>
 <text font-family="Symbol" font-size="120.79" stroke-width="8.9501" transform="matrix(.67101 0 0 1.4903 0 0)" x="1195.4126" y="93.851"><tspan x="1195.4078 1888.0665" y="93.851"/></text>
 <text font-family="Symbol" font-size="86.249" stroke-width="13.22" transform="matrix(.99127 0 0 1.0088 0 0)" x="680.0743" y="387.6467"><tspan x="680.0743" y="387.6467"/></text>
 <text font-family="Symbol" font-size="86.249" stroke-width="13.22" transform="matrix(.99127 0 0 1.0088 0 0)" x="940.742" y="387.6467"><tspan x="940.742" y="387.6467"/></text>
 <text font-family="Symbol" font-size="86.249" stroke-width="13.22" transform="matrix(.99127 0 0 1.0088 0 0)" x="1187.7" y="387.6467"><tspan x="1187.7" y="387.6467"/></text>
 <text font-family="Symbol" font-size="120.79" stroke-width="8.9501" transform="matrix(.67101 0 0 1.4903 0 0)" x="1195.4126" y="280.663"><tspan x="1195.4078 1888.0665" y="280.663"/></text>
 <text font-family="Symbol" font-size="86.491" stroke-width="13.2" transform="matrix(.99011 0 0 1.01 0 0)" x="-1.1" y="780.0922"><tspan x="-1.1" y="780.0922"/></text>
 <text font-family="Symbol" font-size="86.491" stroke-width="13.2" transform="matrix(.99011 0 0 1.01 0 0)" x="126.562" y="780.0922"><tspan x="126.5644 191.2137" y="780.0922"/></text>
 <text font-family="Symbol" font-size="86.491" stroke-width="13.2" transform="matrix(.99011 0 0 1.01 0 0)" x="342.2854" y="780.0922"><tspan x="342.2854" y="780.0922"/></text>
 <text font-family="Symbol" font-size="86.491" stroke-width="13.2" transform="matrix(.99011 0 0 1.01 0 0)" x="540.2784" y="780.0922"><tspan x="540.2784" y="780.0922"/></text>
 <text font-family="Symbol" font-size="86.49" stroke-width="13.2" transform="matrix(.9901 0 0 1.01 0 0)" x="403.5323" y="709.5439"><tspan x="403.5323" y="709.5439"/></text>
 <text font-family="Symbol" font-size="86.491" stroke-width="13.2" transform="matrix(.99011 0 0 1.01 0 0)" x="403.7264" y="856.9334"><tspan x="403.7264" y="856.9334"/> <tspan x="403.7264" y="790.3924"/></text>
 <text font-family="Symbol" font-size="86.49" stroke-width="13.2" transform="matrix(.9901 0 0 1.01 0 0)" x="716.214" y="709.5439"><tspan x="716.214" y="709.5439"/></text>
 <text font-family="Symbol" font-size="86.491" stroke-width="13.2" transform="matrix(.99011 0 0 1.01 0 0)" x="716.4212" y="856.9334"><tspan x="716.4212" y="856.9334"/> <tspan x="716.4212" y="790.3924"/> <tspan x="759.2418" y="780.1022"/></text>
 <text font-family="Symbol" font-size="86.491" stroke-width="13.2" transform="matrix(.99011 0 0 1.01 0 0)" x="962.0451" y="780.0922"><tspan x="962.0451" y="780.0922"/></text>
 <text font-family="Symbol" font-size="86.49" stroke-width="13.2" transform="matrix(.9901 0 0 1.01 0 0)" x="815.5845" y="709.5439"><tspan x="815.5845" y="709.5439"/></text>
 <text font-family="Symbol" font-size="86.491" stroke-width="13.2" transform="matrix(.99011 0 0 1.01 0 0)" x="815.8028" y="856.9334"><tspan x="815.8028" y="856.9334"/> <tspan x="815.8028" y="790.3924"/></text>
 <text font-family="Symbol" font-size="86.49" stroke-width="13.2" transform="matrix(.9901 0 0 1.01 0 0)" x="1138.7764" y="709.5439"><tspan x="1138.7764" y="709.5439"/></text>
 <text font-family="Symbol" font-size="86.49" stroke-width="13.2" transform="matrix(.9901 0 0 1.01 0 0)" x="1138.7764" y="856.8647"><tspan x="1138.7764" y="856.8647"/></text>
 <text font-family="Symbol" font-size="86.49" stroke-width="13.2" transform="matrix(.9901 0 0 1.01 0 0)" x="1138.7764" y="790.3343"><tspan x="1138.7764" y="790.3343"/></text>
 <text font-family="Symbol" font-size="87.142" stroke-width="13.22" transform="matrix(.99139 0 0 1.0087 0 0)" x="1213.3713" y="782.6938"><tspan x="1213.3713" y="782.6938"/></text>
 <text font-family="Symbol" font-size="87.142" stroke-width="13.22" transform="matrix(.99139 0 0 1.0087 0 0)" x="1423.9851" y="721.6227"><tspan x="1423.9851" y="721.6227"/></text>
 <text font-family="Symbol" font-size="96.72" stroke-width="11.29" transform="matrix(.84646 0 0 1.1814 0 0)" x="1503.3658" y="624.9125"><tspan x="1503.3661 1843.5959" y="624.9125"/></text>
</svg>

Output


Copyright Lizense: below threshold of originallity Author: TU Wien Source: https://commons.wikimedia.org/wiki/File:HydraulischerWechselsprung.svg