# HG changeset patch # User František Kučera # Date 1579454286 -3600 # Node ID 22ed5647b235d6aee124f639d61c9c515b3da7c8 # Parent ab48ad4ecb91d11a98922de32da63a56a81fce70 streamlets: include streamlet-common.sh from the directory where the actual streamlet resides (not where is the symlink, if any) diff -r ab48ad4ecb91 -r 22ed5647b235 streamlet-examples/cloc --- a/streamlet-examples/cloc Sun Jan 19 18:00:31 2020 +0100 +++ b/streamlet-examples/cloc Sun Jan 19 18:18:06 2020 +0100 @@ -25,7 +25,7 @@ # Optional prefix can be added to attribute names: --option 'prefix' 'my_prefix_' -. "$(dirname "$0")/streamlet-common.sh" +. "$(dirname "$(realpath "$0")")/streamlet-common.sh" processMessage_WAITING_FOR_OUTPUT_ATTRIBUTES_METADATA() { clocFields=() diff -r ab48ad4ecb91 -r 22ed5647b235 streamlet-examples/exiftool --- a/streamlet-examples/exiftool Sun Jan 19 18:00:31 2020 +0100 +++ b/streamlet-examples/exiftool Sun Jan 19 18:18:06 2020 +0100 @@ -25,7 +25,7 @@ # - "available_attributes" – list of available attributes (each file may have different) separated by line-breaks (TODO: return as an array of strings, when this data type is implemented) -. "$(dirname "$0")/streamlet-common.sh" +. "$(dirname "$(realpath "$0")")/streamlet-common.sh" processMessage_WAITING_FOR_OUTPUT_ATTRIBUTES_METADATA() { streamletFields=() diff -r ab48ad4ecb91 -r 22ed5647b235 streamlet-examples/exiv2 --- a/streamlet-examples/exiv2 Sun Jan 19 18:00:31 2020 +0100 +++ b/streamlet-examples/exiv2 Sun Jan 19 18:18:06 2020 +0100 @@ -23,7 +23,7 @@ # Two additional attributes are provided by this streamlet: "Image height" and "Image width" (they are extracted from "Image size"). -. "$(dirname "$0")/streamlet-common.sh" +. "$(dirname "$(realpath "$0")")/streamlet-common.sh" processMessage_WAITING_FOR_OUTPUT_ATTRIBUTES_METADATA() { streamletFields=() diff -r ab48ad4ecb91 -r 22ed5647b235 streamlet-examples/hash --- a/streamlet-examples/hash Sun Jan 19 18:00:31 2020 +0100 +++ b/streamlet-examples/hash Sun Jan 19 18:18:06 2020 +0100 @@ -30,7 +30,7 @@ # --scriptlet hash --option "sha1" --as "sha1" --option "sha256" --as "sha256" -. "$(dirname "$0")/streamlet-common.sh" +. "$(dirname "$(realpath "$0")")/streamlet-common.sh" processMessage_WAITING_FOR_OUTPUT_ATTRIBUTES_METADATA() { hashTypes=() diff -r ab48ad4ecb91 -r 22ed5647b235 streamlet-examples/inode --- a/streamlet-examples/inode Sun Jan 19 18:00:31 2020 +0100 +++ b/streamlet-examples/inode Sun Jan 19 18:18:06 2020 +0100 @@ -19,7 +19,7 @@ # This streamlet provides a single attribute: inode number of given file -. "$(dirname "$0")/streamlet-common.sh" +. "$(dirname "$(realpath "$0")")/streamlet-common.sh" processMessage_WAITING_FOR_OUTPUT_ATTRIBUTES_METADATA() { send OUTPUT_ATTRIBUTE_METADATA "${outputAttributeAliases[0]-inode}" "integer" diff -r ab48ad4ecb91 -r 22ed5647b235 streamlet-examples/lines_count --- a/streamlet-examples/lines_count Sun Jan 19 18:00:31 2020 +0100 +++ b/streamlet-examples/lines_count Sun Jan 19 18:18:06 2020 +0100 @@ -21,7 +21,7 @@ # Directories are reported a 0 lines and with a null flag (will be supported in further Relational pipes versions). -. "$(dirname "$0")/streamlet-common.sh" +. "$(dirname "$(realpath "$0")")/streamlet-common.sh" processMessage_WAITING_FOR_OUTPUT_ATTRIBUTES_METADATA() { send OUTPUT_ATTRIBUTE_METADATA "${outputAttributeAliases[0]-lines_count}" "integer" diff -r ab48ad4ecb91 -r 22ed5647b235 streamlet-examples/mime_type --- a/streamlet-examples/mime_type Sun Jan 19 18:00:31 2020 +0100 +++ b/streamlet-examples/mime_type Sun Jan 19 18:18:06 2020 +0100 @@ -20,7 +20,7 @@ # It calls the tool file. -. "$(dirname "$0")/streamlet-common.sh" +. "$(dirname "$(realpath "$0")")/streamlet-common.sh" processMessage_WAITING_FOR_OUTPUT_ATTRIBUTES_METADATA() { send OUTPUT_ATTRIBUTE_METADATA "${outputAttributeAliases[0]-mime_type}" "string" diff -r ab48ad4ecb91 -r 22ed5647b235 streamlet-examples/pdfinfo --- a/streamlet-examples/pdfinfo Sun Jan 19 18:00:31 2020 +0100 +++ b/streamlet-examples/pdfinfo Sun Jan 19 18:18:06 2020 +0100 @@ -22,7 +22,7 @@ # List of available attributes can be obtained by directly calling the pdfinfo command on a PDF file. -. "$(dirname "$0")/streamlet-common.sh" +. "$(dirname "$(realpath "$0")")/streamlet-common.sh" processMessage_WAITING_FOR_OUTPUT_ATTRIBUTES_METADATA() { pdfFields=() diff -r ab48ad4ecb91 -r 22ed5647b235 streamlet-examples/pdftotext --- a/streamlet-examples/pdftotext Sun Jan 19 18:00:31 2020 +0100 +++ b/streamlet-examples/pdftotext Sun Jan 19 18:18:06 2020 +0100 @@ -20,7 +20,7 @@ # n.b. the plain text content must fit into memory and shell variable and command-line argument (it usually will) -. "$(dirname "$0")/streamlet-common.sh" +. "$(dirname "$(realpath "$0")")/streamlet-common.sh" processMessage_WAITING_FOR_OUTPUT_ATTRIBUTES_METADATA() { send OUTPUT_ATTRIBUTE_METADATA "${outputAttributeAliases[0]-pdftotext}" "string" diff -r ab48ad4ecb91 -r 22ed5647b235 streamlet-examples/tesseract --- a/streamlet-examples/tesseract Sun Jan 19 18:00:31 2020 +0100 +++ b/streamlet-examples/tesseract Sun Jan 19 18:18:06 2020 +0100 @@ -20,7 +20,7 @@ # Languages can be specified by: --option "language" "eng" --option "language" "ces" -. "$(dirname "$0")/streamlet-common.sh" +. "$(dirname "$(realpath "$0")")/streamlet-common.sh" processMessage_WAITING_FOR_OUTPUT_ATTRIBUTES_METADATA() { tesseractLanguage="";