Skip to content

Commit

Permalink
Merge branch 'version_2_with_components'
Browse files Browse the repository at this point in the history
  • Loading branch information
luis100 committed Mar 20, 2014
2 parents b303653 + 7e23c7e commit 4d50a83
Show file tree
Hide file tree
Showing 137 changed files with 9,113 additions and 1,158 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
*/target/**
.settings/
.project
.classpath
10 changes: 10 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
toolwrapper (2.0.0) unstable; urgency=low
* Ability to generate SCAPE Components (Taverna workflow with
semantic annotations)
* The toolspec and componentspec (if provided) are now availble
inside the Debian Package (look for them at /usr/share/OP_NAME/)
* Added toolwrapper component, toolwrapper-component-uploader, that
eases the process of uploading a Component to the myExperiment site

-- SCAPE project <hsilva@keep.pt> Mon, 17 Feb 2014 13:00:00 +0000

toolwrapper (1.0.1) unstable; urgency=low

* The temporary folder used to build the Debian package wasn't
Expand Down
436 changes: 356 additions & 80 deletions README.md

Large diffs are not rendered by default.

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>
8 changes: 0 additions & 8 deletions bash-debian-generator/.classpath

This file was deleted.

23 changes: 0 additions & 23 deletions bash-debian-generator/.project

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions bash-debian-generator/.settings/org.eclipse.jdt.core.prefs

This file was deleted.

4 changes: 0 additions & 4 deletions bash-debian-generator/.settings/org.eclipse.m2e.core.prefs

This file was deleted.

17 changes: 0 additions & 17 deletions bash-debian-generator/bin/generate.sh

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions bash-generator/.classpath

This file was deleted.

23 changes: 0 additions & 23 deletions bash-generator/.project

This file was deleted.

4 changes: 0 additions & 4 deletions bash-generator/.settings/org.eclipse.core.resources.prefs

This file was deleted.

5 changes: 0 additions & 5 deletions bash-generator/.settings/org.eclipse.jdt.core.prefs

This file was deleted.

4 changes: 0 additions & 4 deletions bash-generator/.settings/org.eclipse.m2e.core.prefs

This file was deleted.

17 changes: 0 additions & 17 deletions bash-generator/bin/generate.sh

This file was deleted.

4 changes: 2 additions & 2 deletions bin/generateDebianPackages4AllToolspecs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ do
TOOLSPEC_SCRIPT_PATH=`echo $TOOLSPEC_PATH | sed 's#\.[a-zA-Z]\+#.sh#'`
CHANGELOG_PATH=`echo $TOOLSPEC_PATH | sed 's#\.[a-zA-Z]\+#.changelog#'`
TEMP_FOLDER=$(mktemp -d)
$TOOLWRAPPER_BASE_DIR/bash-generator/bin/generate.sh -t $TOOLSPEC_PATH -o $TEMP_FOLDER
$TOOLWRAPPER_BASE_DIR/toolwrapper-bash-generator/bin/generate.sh -t $TOOLSPEC_PATH -o $TEMP_FOLDER
if [ -e $TOOLSPEC_SCRIPT_PATH ]; then
cp $TOOLSPEC_SCRIPT_PATH "$TEMP_FOLDER/install/"
fi
$TOOLWRAPPER_BASE_DIR/bash-debian-generator/bin/generate.sh -t $TOOLSPEC_PATH -i $TEMP_FOLDER -o $TEMP_FOLDER -e $MAINTAINER_EMAIL -ch $CHANGELOG_PATH
$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
Expand Down
67 changes: 67 additions & 0 deletions bin/generateDebianPackages4AllToolspecsWithComponents.sh
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
Loading

0 comments on commit 4d50a83

Please sign in to comment.