-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
*/target/** | ||
.settings/ | ||
.project | ||
.classpath |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
digital-preservation-migration-image-imagemagick-image2txt (2.0.0) unstable; urgency=low | ||
|
||
* Added SCAPE Component annotations to Taverna Workflow. | ||
|
||
-- SCAPE project <hsilva@keep.pt> Thu, 05 Dec 2013 12:02:10 +0000 | ||
|
||
digital-preservation-migration-image-imagemagick-image2txt (1.0.2) unstable; urgency=low | ||
|
||
* Initial Release. | ||
|
||
-- SCAPE project <hsilva@keep.pt> Thu, 01 Jan 2013 12:02:10 +0000 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<components xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://scape-project.eu/component" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://scape-project.eu/component toolwrapper-data/src/main/resources/component-1.1_draft.xsd" schemaVersion="1.1"> | ||
<component xsi:type="MigrationAction" profile="http://purl.org/DP/components#MigrationAction" profileVersion="1.0" name="digital-preservation-migration-image-imagemagick-image2txt" author="Hélder Silva"> | ||
<license name="Apache-2.0" type="FLOSS" uri="http://opensource.org/licenses/Apache-2.0"/> | ||
<migrationPath> | ||
<fromMimetype>image/bmp</fromMimetype> | ||
<toMimetype>text/plain</toMimetype> | ||
</migrationPath> | ||
<migrationPath> | ||
<fromMimetype>image/gif</fromMimetype> | ||
<toMimetype>text/plain</toMimetype> | ||
</migrationPath> | ||
<migrationPath> | ||
<fromMimetype>image/vnd.microsoft.icon</fromMimetype> | ||
<toMimetype>text/plain</toMimetype> | ||
</migrationPath> | ||
<migrationPath> | ||
<fromMimetype>image/jpeg</fromMimetype> | ||
<toMimetype>text/plain</toMimetype> | ||
</migrationPath> | ||
<migrationPath> | ||
<fromMimetype>image/png</fromMimetype> | ||
<toMimetype>text/plain</toMimetype> | ||
</migrationPath> | ||
<migrationPath> | ||
<fromMimetype>image/tiff</fromMimetype> | ||
<toMimetype>text/plain</toMimetype> | ||
</migrationPath> | ||
<migrationPath> | ||
<fromMimetype>image/jp2</fromMimetype> | ||
<toMimetype>text/plain</toMimetype> | ||
</migrationPath> | ||
</component> | ||
</components> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<tool xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://scape-project.eu/tool" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://scape-project.eu/tool toolwrapper-data/src/main/resources/tool-1.1_draft.xsd" schemaVersion="1.1" name="ImageMagick" version="2.0.0" homepage="http://www.imagemagick.org/script/convert.php"> | ||
<license name="Apache-2.0" type="FLOSS" uri="http://opensource.org/licenses/Apache-2.0"/> | ||
<installation> | ||
<operatingSystem operatingSystemName="Debian"> | ||
<packageManager type="Dpkg"> | ||
<config>imagemagick</config> | ||
<source>deb http://scape.keep.pt/apt stable main</source> | ||
</packageManager> | ||
<dependency name="imagemagick"> | ||
<license name="Apache-2.0" type="FLOSS" uri="http://opensource.org/licenses/Apache-2.0"/> | ||
</dependency> | ||
</operatingSystem> | ||
<operatingSystem operatingSystemName="Ubuntu"> | ||
<packageManager type="Dpkg"> | ||
<config>imagemagick</config> | ||
<source>deb http://scape.keep.pt/apt stable main</source> | ||
</packageManager> | ||
<dependency name="imagemagick"> | ||
<license name="Apache-2.0" type="FLOSS" uri="http://opensource.org/licenses/Apache-2.0"/> | ||
</dependency> | ||
</operatingSystem> | ||
</installation> | ||
<operations> | ||
<operation name="digital-preservation-migration-image-imagemagick-image2txt"> | ||
<description>Converts any ImageMagick supported image format to Text</description> | ||
<command>/usr/bin/convert ${input} txt:${output}</command> | ||
<inputs> | ||
<input name="input" required="true"> | ||
<description>Reference to input file</description> | ||
</input> | ||
<parameter name="params" required="false"> | ||
<description>Additional conversion parameters</description> | ||
</parameter> | ||
</inputs> | ||
<outputs> | ||
<output name="output" required="true"> | ||
<description>Reference to output file</description> | ||
<extension>txt</extension> | ||
</output> | ||
</outputs> | ||
</operation> | ||
</operations> | ||
</tool> |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/bin/bash | ||
|
||
cd `dirname $0` | ||
|
||
usage(){ | ||
echo -e "Usage: $0 TOOLSPECS_DIR|TOOLSPEC TOOLWRAPPER_BASE_DIR DEBIAN_OUTPUT_DIRECTORY MAINTAINER_EMAIL | ||
\twhere: | ||
\t TOOLSPECS_DIR|TOOLSPEC > path to the directory where the toolspecs are | ||
\t or absolute path to a specific toolspec | ||
\t TOOLWRAPPER_BASE_DIR > path to the toolwrapper base directory | ||
\t DEBIAN_OUTPUT_DIRECTORY > path to the directory where the Debian packages are going to be copied | ||
\t MAINTAINER_EMAIL > e-mail of the Debian package maintainer" | ||
} | ||
|
||
echo -e "[WARN] This script only aplies to toolspecs with 1 operation (as the others need extra parameters for Debian package generation.\nDo you want to procede? [yN]" | ||
read anwser | ||
case $anwser in | ||
[yY]) | ||
;; | ||
*) | ||
exit 1 | ||
;; | ||
esac | ||
|
||
if [ $# -ne 4 ]; then | ||
usage | ||
exit 1 | ||
fi | ||
|
||
if [ -d $1 ]; then | ||
LS_EXPRESSION="$1/*.xml" | ||
else | ||
if [ -f $1 ]; then | ||
LS_EXPRESSION="$1" | ||
else | ||
usage | ||
exit 2 | ||
fi | ||
fi | ||
|
||
|
||
TOOLWRAPPER_BASE_DIR=$(readlink -m $2) | ||
DEBIAN_OUTPUT_DIRECTORY=$(readlink -m $3) | ||
MAINTAINER_EMAIL=$4 | ||
|
||
for i in $(ls $LS_EXPRESSION); | ||
do | ||
TOOLSPEC_PATH=$i | ||
TOOLSPEC_SCRIPT_PATH=`echo $TOOLSPEC_PATH | sed 's#\.[a-zA-Z]\+#.sh#'` | ||
CHANGELOG_PATH=`echo $TOOLSPEC_PATH | sed 's#\.[a-zA-Z]\+#.changelog#'` | ||
COMPONENT_PATH=`echo $TOOLSPEC_PATH | sed 's#\.[a-zA-Z]\+#.component#'` | ||
TEMP_FOLDER=$(mktemp -d) | ||
$TOOLWRAPPER_BASE_DIR/toolwrapper-bash-generator/bin/generate.sh -t $TOOLSPEC_PATH -o $TEMP_FOLDER -c $COMPONENT_PATH | ||
if [ -e $TOOLSPEC_SCRIPT_PATH ]; then | ||
cp $TOOLSPEC_SCRIPT_PATH "$TEMP_FOLDER/install/" | ||
fi | ||
$TOOLWRAPPER_BASE_DIR/toolwrapper-bash-debian-generator/bin/generate.sh -t $TOOLSPEC_PATH -i $TEMP_FOLDER -o $TEMP_FOLDER -e $MAINTAINER_EMAIL -ch $CHANGELOG_PATH | ||
if [ $? -eq 0 ]; then | ||
for i in $(find $TEMP_FOLDER -name *.deb); | ||
do | ||
cp $i $DEBIAN_OUTPUT_DIRECTORY | ||
done | ||
fi | ||
#rm -rf $TEMP_FOLDER | ||
done | ||
|
||
exit 0 |