From 35b05b785eb05350eb653f4c7923665a8836ece4 Mon Sep 17 00:00:00 2001 From: Mario Voigt Date: Thu, 14 Oct 2021 23:46:36 +0200 Subject: [PATCH] fix different meta glitches --- extensions/fablabchemnitz/000_validate.sh | 86 ++++++++++-------- .../ellipse_by_five_points/meta.json | 20 ++++ extensions/fablabchemnitz/hex_tiles/meta.json | 20 ++++ .../ids_to_text/ids_to_text.inx | 29 ++++-- .../fablabchemnitz/ids_to_text/ids_to_text.py | 91 +++++++++++++++---- .../fablabchemnitz/ids_to_text/meta.json | 20 ++++ .../fablabchemnitz/ifs_fractals/meta.json | 20 ++++ .../fablabchemnitz/inset_alignment/meta.json | 4 +- .../fablabchemnitz/layer_clip/meta.json | 2 +- .../fablabchemnitz/meta_explanation.json | 2 +- .../purge_duplicate_path_nodes/meta.json | 4 +- .../remove_duplicate_guides/meta.json | 4 +- .../fablabchemnitz/set_view_box/meta.json | 4 +- extensions/fablabchemnitz/tuckbox/meta.json | 4 +- .../fablabchemnitz/vektorkollektor/meta.json | 4 +- 15 files changed, 234 insertions(+), 80 deletions(-) create mode 100644 extensions/fablabchemnitz/ellipse_by_five_points/meta.json create mode 100644 extensions/fablabchemnitz/hex_tiles/meta.json create mode 100644 extensions/fablabchemnitz/ids_to_text/meta.json create mode 100644 extensions/fablabchemnitz/ifs_fractals/meta.json diff --git a/extensions/fablabchemnitz/000_validate.sh b/extensions/fablabchemnitz/000_validate.sh index 7b8e0cf8..f6353e1d 100755 --- a/extensions/fablabchemnitz/000_validate.sh +++ b/extensions/fablabchemnitz/000_validate.sh @@ -1,13 +1,46 @@ #!/bin/bash -echo "Validating inx files with xmllint. Only errors are printed to console" -for folder in */ ; do xmllint --noout --relaxng ./inkscape.extension.rng $folder*.inx > /dev/null 2>> 000_xmllint.out; done; grep -v "validates\|warning: failed to load external entity" 000_xmllint.out; rm 000_xmllint.out +clear +echo "--> Validating inx files with xmllint. Only errors are printed to console" +for folder in */ ; do + xmllint --noout --relaxng ./inkscape.extension.rng ${folder}*.inx > /dev/null 2>> 000_xmllint.out +done +grep -v "validates\|warning: failed to load external entity" 000_xmllint.out; rm 000_xmllint.out -echo "Count of inx files:" +#complete set of meta information +AGGLOMERATED_JSON="" +for folder in */ ; do + if [[ ! -f "${folder}/meta.json" ]]; then + echo "meta.json missing for ${folder}" + else + echo ${AGGLOMERATED_JSON} > /tmp/prevJson + AGGLOMERATED_JSON=$(jq -s ".[0] + .[1]" /tmp/prevJson ${folder}/meta.json) + + #DEBUG + #cat ${folder}/meta.json | jq + fi +done +#print overall json +#echo $AGGLOMERATED_JSON | jq + +echo "--> Show unique license kinds used:" +echo $AGGLOMERATED_JSON | jq -r '.[]|{license}|.[]' | sort | uniq -c + +echo "--> show unique list of involved contributors (thanks/credits):" +#echo $AGGLOMERATED_JSON | jq -r '.[]|{main_authors}|.[]|.[]' | sort | uniq -c +echo $AGGLOMERATED_JSON | jq -r '.[]|{main_authors}|.[]|.[]' | sort | uniq + +#show extensions which are in gallery +GALLERY_EXTENSIONS=$(echo $AGGLOMERATED_JSON | jq -r '.[]|{inkscape_gallery_url}|.[]' | sort | grep -v "null") +for GALLERY_EXTENSION in ${GALLERY_EXTENSIONS}; do + EXTENSION=$(echo ${AGGLOMERATED_JSON} | jq -r '.[]|select(.inkscape_gallery_url=="'$GALLERY_EXTENSION'")|{name}|.[]') +done + +echo "--> Count of inx files:" INX=$(find ./ -type f -name "*.inx" | wc -l) echo INX: $INX -echo "Count of extension folders:" +echo "--> Count of extension folders:" FOLDERS=$(ls -d */ | wc -l) echo FOLDERS: $FOLDERS @@ -24,40 +57,21 @@ echo if [[ $REPLY =~ ^[Yy]$ ]]; then echo "Building Inkscape gallery extension zip files" TARGETDIR="../000_Inkscape_Gallery" - mkdir -p $TARGETDIR > /dev/null - - #list of extensions which are uploaded at Inkscape gallery by us at the moment - for EXTENSION in \ - "animate_order" \ - "cleanup_styles" \ - "contour_scanner_and_trimmer" \ - "convert_to_polylines" \ - "create_links" \ - "dxf2papercraft" \ - "dxf_dwg_importer" \ - "imagetracerjs" \ - "inventory_sticker" \ - "move_path_node" \ - "remove_empty_groups" \ - "offset_paths" \ - "papercraft_unfold" \ - "paperfold" \ - "primitive" \ - "slic3r_stl_input" \ - "split_and_break_bezier_at_t" \ - "styles_to_layers" \ - "ungrouper_and_element_migrator_filter" \ - "unwind_paths" \ - "vpypetools" - do + mkdir -p $TARGETDIR > /dev/null 2>&1 + + #show extensions which are in gallery + GALLERY_EXTENSIONS=$(echo $AGGLOMERATED_JSON | jq -r '.[]|{inkscape_gallery_url}|.[]' | sort | grep -v "null") + for GALLERY_EXTENSION in ${GALLERY_EXTENSIONS}; do + EXTENSION="$(echo ${AGGLOMERATED_JSON} | jq -r '.[]|select(.inkscape_gallery_url=="'$GALLERY_EXTENSION'")|{path}|.[]')" EXTRA="" if [[ $EXTENSION == "styles_to_layers" ]] || [[ $EXTENSION == "ungrouper_and_element_migrator_filter" ]]; then EXTRA="${EXTRA} apply_transformations/" - elif [[ $EXTENSION == "styles_to_layers" ]] || [[ $EXTENSION == "ungrouper_and_element_migrator_filter" ]]; then - EXTRA="${EXTRA} remove_empty_groups/" - fi - ZIPFILE=$TARGETDIR/$EXTENSION.zip - rm $ZIPFILE > /dev/null + elif [[ $EXTENSION == "styles_to_layers" ]] || [[ $EXTENSION == "ungrouper_and_element_migrator_filter" ]]; then + EXTRA="${EXTRA} remove_empty_groups/" + fi + ZIPFILE=$TARGETDIR/$EXTENSION.zip + rm $ZIPFILE > /dev/null 2>&1 + echo "--> creating $ZIPFILE" zip -r $ZIPFILE $EXTENSION/ 000_about_fablabchemnitz.svg $EXTRA - done + done fi diff --git a/extensions/fablabchemnitz/ellipse_by_five_points/meta.json b/extensions/fablabchemnitz/ellipse_by_five_points/meta.json new file mode 100644 index 00000000..dd0d28df --- /dev/null +++ b/extensions/fablabchemnitz/ellipse_by_five_points/meta.json @@ -0,0 +1,20 @@ +[ + { + "name": "Ellipse By Five Points", + "id": "fablabchemnitz.de.ellipse_by_five_points", + "path": "ellipse_by_five_points", + "original_name": "Ellipse by 5 Points", + "original_id": "org.pernsteiner.inkscape.ellipse_5pts", + "license": "BSD-2-Clause License", + "license_url": "http://www.pernsteiner.org/inkscape/ellipse_5pts/inkscape-ellipse_5pts-0.1.1.zip", + "comment": "bugfixed and ported to Inkscape v1 manually by Mario Voigt", + "source_url": "https://gitea.fablabchemnitz.de/FabLab_Chemnitz/mightyscape-1.X/src/branch/master/extensions/fablabchemnitz/ellipse_by_five_points", + "fork_url": "http://www.pernsteiner.org/inkscape/ellipse_5pts/", + "documentation_url": "https://stadtfabrikanten.org/display/IFM/Ellipse+by+Five+Points", + "inkscape_gallery_url": null, + "main_authors": [ + "pernsteiner.org/Stuart Pernsteiner", + "github.com/vmario89" + ] + } +] \ No newline at end of file diff --git a/extensions/fablabchemnitz/hex_tiles/meta.json b/extensions/fablabchemnitz/hex_tiles/meta.json new file mode 100644 index 00000000..92b4f5f8 --- /dev/null +++ b/extensions/fablabchemnitz/hex_tiles/meta.json @@ -0,0 +1,20 @@ +[ + { + "name": "Hex Tiles", + "id": "fablabchemnitz.de.hex_tiles", + "path": "hex_tiles", + "original_name": "Hex tiles", + "original_id": "phillips.effect.hexlayoutguides", + "license": "GNU GPL v2", + "license_url": "https://sourceforge.net/p/razorfoss/svn/HEAD/tree/trunk/Inkscape/LayoutGuides/HexLayoutGuides.py", + "comment": "", + "source_url": "https://gitea.fablabchemnitz.de/FabLab_Chemnitz/mightyscape-1.X/src/branch/master/extensions/fablabchemnitz/hex_tiles", + "fork_url": "https://sourceforge.net/p/razorfoss/svn/HEAD/tree/trunk/Inkscape/LayoutGuides/", + "documentation_url": "https://stadtfabrikanten.org/display/IFM/Hex+Tiles", + "inkscape_gallery_url": null, + "main_authors": [ + "Luke Phillips:lukerazor@hotmail.com", + "github.com/vmario89" + ] + } +] \ No newline at end of file diff --git a/extensions/fablabchemnitz/ids_to_text/ids_to_text.inx b/extensions/fablabchemnitz/ids_to_text/ids_to_text.inx index 5b0bd50f..ba4b330c 100644 --- a/extensions/fablabchemnitz/ids_to_text/ids_to_text.inx +++ b/extensions/fablabchemnitz/ids_to_text/ids_to_text.inx @@ -2,31 +2,40 @@ Ids To Text fablabchemnitz.de.ids_to_text + + + + + + + + 10 - 255 - Roboto - + 255 + Roboto + - - + + + 0 false + false -