Permalink
Browse files

script updates

  • Loading branch information...
1 parent 963702a commit 3a650b0f7e537561bc0fa773b81acac506478854 @Wolfgang-Spraul Wolfgang-Spraul committed Apr 8, 2013
View
@@ -73,8 +73,8 @@ ssl certs from startssl.com
* list all files in the database
~# mysql openclipart -e "select full_path, filename from ocal_files;"
- * list all pd_issue uploads
- ~# mysql openclipart -e "select full_path, filename from ocal_files where upload_tags like '%pd_issue%';"
+ * delete all pd_issue uploads (svgs and related pngs)
+ ~# mysql openclipart --disable-column-names -e "select concat(full_path, filename) from ocal_files where upload_tags like '%pd_issue%';" | ./svg_delete.sh
* manually adding an upload for existing user
mysql> INSERT INTO `ocal_files`
@@ -122,7 +122,7 @@ ssl certs from startssl.com
~# cat filelist.txt | tar -cj -T - -f filelist.tar.bz2
* adhoc release (bz2 tarball of all .svgs)
- ~# find people/ -iname '*.svg' -print0|tar -cj --null -T - -f /srv/www/openclipart.org/adhoc_release_all_svgs_`date +%Y-%m-%d`.tar.bz2
+ ~# find people/ -iname '*.svg' -print0|tar -cj --null -T - -f /srv/www/openclipart.org/htdocs/adhoc_release_all_svgs_`date +%Y-%m-%d`.tar.bz2
* number of uploads in one year
~# mysql openclipart -e 'select upload_date from ocal_files;'|grep ^2013|wc -l
@@ -139,7 +139,7 @@ ssl certs from startssl.com
~# find people/ -type f -name '*.svg' -print0 | xargs -0 stat --format '%y %n' | grep ^2008 | wc -l
* validate xml of all svgs
- ~# find people/ -iname '*.svg' -print0|xargs -0 -I {} sh -c "xmlstarlet val --list-bad \"{}\"" 2>/dev/null > svgs_with_invalid_xml.txt
+ ~# find people/ -iname '*.svg' -print0|xargs -0 -I {} bash -c "xmlstarlet val --list-bad \"{}\"" 2>/dev/null > svgs_with_invalid_xml.txt
* find id for filename
~# mysql openclipart -e 'select id from ocal_files where concat(full_path,filename) = "people/helen.ray92/jsa.svg";'
@@ -150,8 +150,36 @@ ssl certs from startssl.com
* update one element (which must already exist)
~# xmlstarlet ed -u '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:title' -v updated_title _filename_
- * backup metadata
- ~# find people/ -iname '*.svg' -print0 | xargs -0 -I {} sh -c "xmlstarlet sel -t -c /svg:svg/svg:metadata {} > {}.upload-metadata"
+ * extract metadata
+ ~# find people/ -iname '*.svg' -print0 | xargs -0 -I {} bash -c "xmlstarlet sel -N svg=http://www.w3.org/2000/svg -t -c /svg:svg/svg:metadata \"{}\" > \"{}.upload-metadata\""
+ ~# find people/ -name '*.upload-metadata' -size 0 -exec rm {} \;
+
+ * tarball metadata
+ ~# find people/ -name '*.upload-metadata' -print0 | tar -cj --null -T - -f upload_metadata.tar.bz2
+
+ * delete extracted metadata
+ ~# find people/ -name '*.upload-metadata' -exec rm {} \;
+
+ * replace common adobe entities
+ ~# sed -e 's|&ns_flows;|http://ns.adobe.com/Flows/1.0/|' -e 's|&ns_flows;|http://ns.adobe.com/Flows/1.0/|' -e 's|&ns_extend;|http://ns.adobe.com/Extensibility/1.0/|' -e 's|&ns_ai;|http://ns.adobe.com/AdobeIllustrator/10.0/|' -e 's|&ns_graphs;|http://ns.adobe.com/Graphs/1.0/|' -e 's|&ns_vars;|http://ns.adobe.com/Variables/1.0/|' -e 's|&ns_imrep;|http://ns.adobe.com/ImageReplacement/1.0/|' -e 's|&ns_sfw;|http://ns.adobe.com/SaveForWeb/1.0/|' -e 's|&ns_custom;|http://ns.adobe.com/GenericCustomNamespace/1.0/|' -e 's|&ns_adobe_xpath;|http://ns.adobe.com/XPath/1.0/|' -e 's|&ns_svg;|http://www.w3.org/2000/svg|' -e 's|&ns_xlink;|http://www.w3.org/1999/xlink|'
+
+ * find non-UTF-8 files
+ ~# find people/ -name '*.svg' -print0 | xargs -0 grep "encoding=" | grep -v -i "UTF-8" > encoding_not_utf8.txt
+
+ * convert list of files from ISO-8859-1 to UTF-8
+ ~# cat filelist.txt | sed -e 's/:.*//' | xargs -I {} ./xml_ISO8859-1_to_UTF8.sh {} 2>&1 | tee log.txt
+
+ * find files with namespace-entities
+ ~# find people/ -name '*.svg' -print0 | xargs -0 grep -l '&ns_' > namespace_entities.txt
+
+ * resolve entity references
+ ~# cat filelist.txt | xargs -I {} ./xml_noent.sh {} 2>&1 | tee log.txt
+
+ * process selected files with ocalmeta_all.php
+ ~# cat filelist.txt | awk 'NR > 0 && NR <= 10' | ./ocalmeta_all.php 2>&1 | tee meta.log
+
+ * update metadata in all svgs
+ ~# ./ocalmeta_db2files.sh 2>&1 | tee ocalmeta.log
In addition to github.com/openclipart/openclipart.git, the following
repos are used:
@@ -163,6 +191,24 @@ repos are used:
https://github.com/jcubic/json-rpc.git
git://github.com/rubys/venus.git
+--- xml
+ * common namespaces in svg vector graphics
+
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://web.resource.org/cc/"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:xap="http://ns.adobe.com/xap/1.0/"
+ xmlns:xapGImg="http://ns.adobe.com/xap/1.0/g/img/"
+ xmlns:xapMM="http://ns.adobe.com/xap/1.0/mm/"
+ xmlns:xapTPg="http://ns.adobe.com/xap/1.0/t/pg/"
+ xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#"
+ xmlns:xapG="http://ns.adobe.com/xap/1.0/g/"
+ xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/"
+
--- filesystem
People and uploaded files in /srv/www/openclipart.org/htdocs/people
View
@@ -0,0 +1,69 @@
+#!/usr/bin/php
+<?php
+# in each stdin line, tab-separated: file id link title date description creator comma_separated_tags
+
+$fields = array();
+$tags = array();
+
+print "Start time: ".date('r'."\n");
+
+$linenum = 0;
+$f = fopen('php://stdin', 'r');
+while ($line = fgets($f)) {
+ $linenum++;
+ $fields = explode("\t", $line);
+ $num_fields = sizeof($fields);
+ if ($num_fields != 8)
+ printf("Unexpected line ".$linenum.": ".$line);
+ else {
+ # prepare for shell processing
+ $filename = str_replace("'", "'\''", $fields[0]);
+ $id = $fields[1];
+ $link = str_replace("'", "'\''", htmlspecialchars($fields[2]));
+ $title = str_replace("'", "'\''", htmlspecialchars($fields[3]));
+ $date = $fields[4];
+ $date[10] = 'T';
+ $date = htmlspecialchars($date);
+ $description = str_replace("'", "'\''", htmlspecialchars($fields[5]));
+ $creator = str_replace("'", "'\''", htmlspecialchars($fields[6]));
+ $tags_str = str_replace("'", "'\''", htmlspecialchars($fields[7]));
+
+ print("l".$linenum." - Updating metadata in '".$filename."'\n");
+ $cmd = "./ocalmeta_empty.sh '".$filename."'";
+ system($cmd, $retval);
+ if ($retval) print("#E code ".$retval.": ".$cmd."\n");
+
+ $cmd = "./ocalmeta_dc.sh '".$filename."' title '".$title."'";
+ system($cmd, $retval);
+ if ($retval) print("#E code ".$retval.": ".$cmd."\n");
+
+ $cmd = "./ocalmeta_dc.sh '".$filename."' date '".$date."'";
+ system($cmd, $retval);
+ if ($retval) print("#E code ".$retval.": ".$cmd."\n");
+
+ $cmd = "./ocalmeta_dc.sh '".$filename."' description '".$description."'";
+ system($cmd, $retval);
+ if ($retval) print("#E code ".$retval.": ".$cmd."\n");
+
+ $cmd = "./ocalmeta_dc.sh '".$filename."' source 'http://openclipart.org/detail/".$id."/".$link."'";
+ system($cmd, $retval);
+ if ($retval) print("#E code ".$retval.": ".$cmd."\n");
+
+ $cmd = "./ocalmeta_creator.sh '".$filename."' '".$creator."'";
+ system($cmd, $retval);
+ if ($retval) print("#E code ".$retval.": ".$cmd."\n");
+
+ $tags = explode(",", $tags_str);
+ for ($i = 0; $i < sizeof($tags); $i++) {
+ $tags[$i] = trim($tags[$i]);
+ if ($tags[$i] != "") {
+ $cmd = "./ocalmeta_tag.sh '".$filename."' '".$tags[$i]."'";
+ system($cmd, $retval);
+ if ($retval) print("#E code ".$retval.": ".$cmd."\n");
+ }
+ }
+ }
+}
+fclose($f);
+print "End time: ".date('r')."\n";
+?>
@@ -1,4 +1,4 @@
#!/bin/bash
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work' -t elem -n dc:creator -v '' $1
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:creator' -t elem -n cc:Agent -v '' $1
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:creator/cc:Agent' -t elem -n dc:title -v $2 $1
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work' -t elem -n dc:creator -v '' "$1"
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:creator' -t elem -n cc:Agent -v '' "$1"
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:creator/cc:Agent' -t elem -n dc:title -v "$2" "$1"
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+mysql openclipart -e 'drop table if exists _tmp_svglist; create table _tmp_svglist(id int(11),link varchar(255),upload_description mediumtext, upload_name varchar(255), upload_date datetime, upload_tags mediumtext, user_name varchar(255), path varchar(255), key(path)) as (select id, link, upload_description, upload_name, upload_date, upload_tags, user_name, concat(full_path,filename) as path from ocal_files);'
+
+find people/ -iname '*.svg' -print0 | xargs -0 -I {} mysql openclipart --disable-column-names -e "select path, id, link, upload_name, upload_date, upload_description, user_name, upload_tags from _tmp_svglist a where path = \"{}\";" | ./ocalmeta_all.php
+
+mysql openclipart -e 'drop table _tmp_svglist;'
View
@@ -1,2 +1,2 @@
#!/bin/bash
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work' -t elem -n dc:$2 -v $3 $1
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work' -t elem -n dc:$2 -v "$3" "$1"
View
@@ -1,30 +1,49 @@
#!/bin/bash
+# abort if not a valid xml file
+xmlstarlet val -q "$1" || xmlstarlet val -e "$1" || exit 0
+
+# verify that there is a default namespace
+# todo: maybe we can select the default namespace like this? /*/namespace::*[name()='']
+xmlstarlet sel -Q -t -i "/svg" -f "$1" && \
+ xmlstarlet ed -L -s '/svg' -t attr -n xmlns -v 'http://www.w3.org/2000/svg' "$1"
+
+# verify explicit namespaces in <svg>
+xmlstarlet sel -Q -N svg="http://www.w3.org/2000/svg" -t -i '/svg:svg/namespace::svg' -f "$1" || \
+ xmlstarlet ed -L -N svg="http://www.w3.org/2000/svg" -s '/svg:svg' -t attr -n xmlns:svg -v 'http://www.w3.org/2000/svg' "$1"
+xmlstarlet sel -Q -t -i '/svg:svg/namespace::dc' -f "$1" || \
+ xmlstarlet ed -L -s '/svg:svg' -t attr -n xmlns:dc -v 'http://purl.org/dc/elements/1.1/' "$1"
+xmlstarlet sel -Q -t -i '/svg:svg/namespace::cc' -f "$1" || \
+ xmlstarlet ed -L -s '/svg:svg' -t attr -n xmlns:cc -v 'http://web.resource.org/cc/' "$1"
+xmlstarlet sel -Q -t -i '/svg:svg/namespace::rdf' -f "$1" || \
+ xmlstarlet ed -L -s '/svg:svg' -t attr -n xmlns:rdf -v 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' "$1"
+
# delete all metadata
-xmlstarlet ed -L -d '/svg:svg/svg:metadata' $1
+xmlstarlet ed -L -d '/svg:svg/svg:metadata' "$1"
-xmlstarlet ed -L -s '/svg:svg' -t elem -n metadata -v '' $1
-xmlstarlet ed -L -s '/svg:svg/svg:metadata' -t elem -n rdf:RDF -v '' $1
+# metadata/RDF
+xmlstarlet ed -L -s '/svg:svg' -t elem -n metadata -v '' "$1"
+xmlstarlet ed -L -s '/svg:svg/svg:metadata' -t elem -n rdf:RDF -v '' "$1"
# cc:Work
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF' -t elem -n cc:Work -v '' $1
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work' -t elem -n dc:format -v 'image/svg+xml' $1
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work' -t elem -n dc:type -v '' $1
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:type' -t attr -n rdf:resource -v 'http://purl.org/dc/dcmitype/StillImage' $1
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work' -t elem -n cc:license -v '' $1
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work/cc:license' -t attr -n rdf:resource -v 'http://creativecommons.org/licenses/publicdomain/' $1
-
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work' -t elem -n dc:publisher -v '' $1
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:publisher' -t elem -n cc:Agent -v '' $1
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:publisher/cc:Agent' -t attr -n rdf:about -v 'http://openclipart.org/' $1
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:publisher/cc:Agent' -t elem -n dc:title -v 'Open Clip Art Library' $1
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF' -t elem -n cc:Work -v '' "$1"
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work' -t elem -n dc:format -v 'image/svg+xml' "$1"
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work' -t elem -n dc:type -v '' "$1"
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:type' -t attr -n rdf:resource -v 'http://purl.org/dc/dcmitype/StillImage' "$1"
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work' -t elem -n cc:license -v '' "$1"
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work/cc:license' -t attr -n rdf:resource -v 'http://creativecommons.org/licenses/publicdomain/' "$1"
+
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work' -t elem -n dc:publisher -v '' "$1"
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:publisher' -t elem -n cc:Agent -v '' "$1"
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:publisher/cc:Agent' -t attr -n rdf:about -v 'http://openclipart.org/' "$1"
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:publisher/cc:Agent' -t elem -n dc:title -v 'Open Clip Art Library' "$1"
# cc:License
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF' -t elem -n cc:License -v '' $1
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:License' -t attr -n rdf:about -v 'http://creativecommons.org/licenses/publicdomain/' $1
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:License' -t elem -n cc:permits -v '' $1
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:License' -t elem -n cc:permits -v '' $1
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:License' -t elem -n cc:permits -v '' $1
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:License/cc:permits[1]' -t attr -n rdf:resource -v 'http://creativecommons.org/ns#Reproduction' $1
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:License/cc:permits[2]' -t attr -n rdf:resource -v 'http://creativecommons.org/ns#Distribution' $1
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:License/cc:permits[3]' -t attr -n rdf:resource -v 'http://creativecommons.org/ns#DerivativeWorks' $1
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF' -t elem -n cc:License -v '' "$1"
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:License' -t attr -n rdf:about -v 'http://creativecommons.org/licenses/publicdomain/' "$1"
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:License' -t elem -n cc:permits -v '' "$1"
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:License' -t elem -n cc:permits -v '' "$1"
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:License' -t elem -n cc:permits -v '' "$1"
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:License/cc:permits[1]' -t attr -n rdf:resource -v 'http://creativecommons.org/ns#Reproduction' "$1"
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:License/cc:permits[2]' -t attr -n rdf:resource -v 'http://creativecommons.org/ns#Distribution' "$1"
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:License/cc:permits[3]' -t attr -n rdf:resource -v 'http://creativecommons.org/ns#DerivativeWorks' "$1"
View
@@ -1,9 +1,9 @@
#!/bin/bash
-xmlstarlet sel -Q -t -i '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:subject' -f t2.svg || \
- xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work' -t elem -n dc:subject -v '' $1
+xmlstarlet sel -Q -t -i '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:subject' -f "$1" || \
+ xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work' -t elem -n dc:subject -v '' "$1"
-xmlstarlet sel -Q -t -i '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:subject/rdf:Bag' -f t2.svg || \
- xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:subject' -t elem -n rdf:Bag -v '' $1
+xmlstarlet sel -Q -t -i '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:subject/rdf:Bag' -f "$1" || \
+ xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:subject' -t elem -n rdf:Bag -v '' "$1"
-xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:subject/rdf:Bag' -t elem -n rdf:li -v $2 $1
+xmlstarlet ed -L -s '/svg:svg/svg:metadata/rdf:RDF/cc:Work/dc:subject/rdf:Bag' -t elem -n rdf:li -v "$2" "$1"
@@ -6,6 +6,12 @@
<url><loc>http://openclipart.org/collections</loc></url>
<url><loc>http://openclipart.org/collections-browse</loc></url>
<url><loc>http://openclipart.org/bydate</loc></url>
+ <url><loc>http://openclipart.org/faq</loc></url>
+ <url><loc>http://openclipart.org/about</loc></url>
+ <url><loc>http://openclipart.org/participate</loc></url>
+ <url><loc>http://openclipart.org/request</loc></url>
+ <url><loc>http://openclipart.org/showcase</loc></url>
+ <url><loc>http://openclipart.org/docs/api</loc></url>
<url><loc>http://openclipart.org/packages-famous-people</loc></url>
<url><loc>http://openclipart.org/packages-presidents</loc></url>
View
@@ -0,0 +1,26 @@
+#!/usr/bin/php
+<?php
+# each stdin line contains the path to one .svg file
+
+$f = fopen('php://stdin', 'r');
+while ($line = rtrim(fgets($f))) {
+ if (substr($line, -4, 4) != ".svg") {
+ print "Not .svg: ".$line;
+ continue;
+ }
+ $path_parts = pathinfo($line);
+
+ # delete .svg file
+ $cmd = "rm ".escapeshellarg($path_parts['dirname']."/".$path_parts['filename'].".svg");
+ system($cmd, $retval);
+ if ($retval) {
+ # let's be careful, don't delete pngs if there was an error
+ continue;
+ }
+
+ # delete related .png files
+ $cmd = "rm -f ".escapeshellarg($path_parts['dirname'])."/*px-".escapeshellarg($path_parts['filename']).".png";
+ system($cmd, $retval);
+}
+fclose($f);
+?>
@@ -0,0 +1,4 @@
+#!/bin/bash
+mv "$1" "$1.ISO8859_1"
+cat "$1.ISO8859_1" | sed -e 's/encoding="ISO-8859-1"/encoding="UTF-8"/i' | iconv -f ISO-8859-1 -t UTF-8 > "$1"
+ls -la "$1.ISO8859_1" "$1"
View
@@ -0,0 +1,4 @@
+#!/bin/bash
+mv "$1" "$1.before_noent"
+xmllint --noent "$1.before_noent" > "$1"
+ls -la "$1.before_noent" "$1"

0 comments on commit 3a650b0

Please sign in to comment.