From 4f6193dcdc8ce729500cab3e59b2c9d8ac9f0708 Mon Sep 17 00:00:00 2001 From: Johannes Kalliauer Date: Mon, 23 Jan 2023 17:06:11 -0500 Subject: [PATCH 1/2] WSL folder --- Folder.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 Folder.txt diff --git a/Folder.txt b/Folder.txt new file mode 100644 index 0000000..4b25900 --- /dev/null +++ b/Folder.txt @@ -0,0 +1 @@ +cd /mnt/c/Users/jokal/Dokumente_tooMuch/GitHub/cleanupSVG/ \ No newline at end of file From 7e7edb302c95f72bd8dfbe3a2a16179724f76e4c Mon Sep 17 00:00:00 2001 From: Johannes Kalliauer Date: Fri, 27 Jan 2023 14:32:32 -0500 Subject: [PATCH 2/2] simplified T35245 --- .gitignore | 1 + T35245singleXcoordinate.sh | 39 +++----------------------------------- svgo.config.js | 8 ++++---- 3 files changed, 8 insertions(+), 40 deletions(-) diff --git a/.gitignore b/.gitignore index f637f60..9b41624 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.xml *.png *.svg +*.xsvg diff --git a/T35245singleXcoordinate.sh b/T35245singleXcoordinate.sh index 3165e21..742c9ac 100755 --- a/T35245singleXcoordinate.sh +++ b/T35245singleXcoordinate.sh @@ -1,27 +1,17 @@ #!/bin/bash -export minfilesize=0 #1..min file size (1...no line breaks) -export meta=0 #0 removes metadata -export outputType="svg" #just to not get asked by Inkscape -export file=min.svg # just used for debugging -export i=min.svg # just used for debugging - -#./ScourFull.sh #damit man einzeilTags hat -###./einzeilTags.sh - for file in *.svg;do -## == Remove scecial characters in filename == +## == Remove special characters in filename == -#export i=$file #i will be overritan later, just for debugging export new="${file//[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\.\_\+]/}" if [ $new == '*.svg' ]; then #new has to be controlled because it might have "-" which confuses bash - echo "no file, (or filename does not contain any default latin character (a-z) )" + echo "no file, (or filename does not contain any default Latin character (a-z) )" break fi export tmp=${new%.svg} -#If you want to overwrite the exisiting file, without any backup, delete the following three lines +#If you want to overwrite the existing file, without any backup, delete the following three lines export i=${tmp}T.svg cp ./"${file}" $i mv ./"${file}" ./${tmp}1.xml @@ -29,7 +19,6 @@ mv ./"${file}" ./${tmp}1.xml echo echo $i start: -# sed -ri "s///g" $i # remove multipe x-koordinates in text (solves librsvg-Bug) sed -ri "s///g" $i # remove multipe x-koordinates in text (solves librsvg-Bug) @@ -42,25 +31,3 @@ echo $i finish done -# -#./CleanerFull.sh #wegen Inkscape-Bug -# -##./PosibleUngroup.sh -#./UngroupByInkscape.sh #for removing the groups and increasing font-size -##./einzeilTags.sh -#./Rounding.sh #for removing rounding errors -# -# -##./CleanerFull.sh -#./IskartOptimizer.sh #for reducing file size -# -#./svg2validsvg.sh #for correcting the png-files and adding DTD -##./cleaner4compression.sh -##./o4compression.sh #https://github.com/svg/svgo/issues/1001 -##./scour4compression.sh #https://github.com/scour-project/scour/issues/202 -##./CleanerFull.sh -##./RasterOptimizer.sh -#./fontReplace.sh #for replacing Arial with Liberation Sans -##./validBycleaner.sh -##./svg2validsvg.sh -##./validByScour.sh diff --git a/svgo.config.js b/svgo.config.js index 8509fe1..a740ec1 100644 --- a/svgo.config.js +++ b/svgo.config.js @@ -17,10 +17,10 @@ module.exports = { name: 'cleanupEnableBackground', active: true }, - { +/* { name: 'cleanupIDs', active: true - }, + },*/ /* { name: 'cleanupListOfValues',//https://github.com/svg/svgo/issues/1402 },*/ @@ -78,10 +78,10 @@ module.exports = { name: 'moveGroupAttrsToElems', active: true }, - { +/* { name: 'removeAttrs', active: false - }, + },*/ { name: 'removeComments', active: true