diff --git a/calculate-sha256sum@rcalixte/CHANGELOG.md b/calculate-sha256sum@rcalixte/CHANGELOG.md new file mode 100644 index 00000000..58d99ae8 --- /dev/null +++ b/calculate-sha256sum@rcalixte/CHANGELOG.md @@ -0,0 +1,4 @@ + +### 1.0 + +* Initial release diff --git a/calculate-sha256sum@rcalixte/README.md b/calculate-sha256sum@rcalixte/README.md new file mode 100644 index 00000000..821a9465 --- /dev/null +++ b/calculate-sha256sum@rcalixte/README.md @@ -0,0 +1,18 @@ +CALCULATE SHA256SUM +=================== + +Calculate the sha256sum for a single file. + +DESCRIPTION +----------- + +This is an action to calculate the sha256sum for a specific file. +This is particularly useful for verifying ISOs for example. + +DEPENDENCIES +------------ + +The following programs must be installed and available: + +* `sha256sum` to calculate the hash of file +* `zenity` to display the dialog with the result diff --git a/calculate-sha256sum@rcalixte/calculate-sha256sum@rcalixte.nemo_action.in b/calculate-sha256sum@rcalixte/calculate-sha256sum@rcalixte.nemo_action.in new file mode 100644 index 00000000..e1ed7dd2 --- /dev/null +++ b/calculate-sha256sum@rcalixte/calculate-sha256sum@rcalixte.nemo_action.in @@ -0,0 +1,7 @@ +[Nemo Action] +_Name=Calculate sha256sum +_Comment=Calculate the sha256sum for this file +Exec= +Selection=s +Extensions=nodirs; +Dependencies=sha256sum;zenity; diff --git a/calculate-sha256sum@rcalixte/files/calculate-sha256sum@rcalixte/calculate-sha256sum@rcalixte.sh b/calculate-sha256sum@rcalixte/files/calculate-sha256sum@rcalixte/calculate-sha256sum@rcalixte.sh new file mode 100644 index 00000000..8a513927 --- /dev/null +++ b/calculate-sha256sum@rcalixte/files/calculate-sha256sum@rcalixte/calculate-sha256sum@rcalixte.sh @@ -0,0 +1,11 @@ +#! /bin/bash + +FILENAME="$1" +BASENAME="$(/usr/bin/basename "$FILENAME")" +TITLE="SHA256SUM FOR ${BASENAME}" + +( + HASH=$(/usr/bin/sha256sum "${FILENAME}" | /usr/bin/cut -f1 -d' ') + exec 1>&- + /usr/bin/zenity --title="${TITLE}" --info --text="${HASH}" --no-wrap +) | /usr/bin/zenity --title="Calculating sha256sum for ${FILENAME}..." --progress --auto-close --no-cancel --pulsate diff --git a/calculate-sha256sum@rcalixte/files/calculate-sha256sum@rcalixte/icon.png b/calculate-sha256sum@rcalixte/files/calculate-sha256sum@rcalixte/icon.png new file mode 100644 index 00000000..d9fcb73c Binary files /dev/null and b/calculate-sha256sum@rcalixte/files/calculate-sha256sum@rcalixte/icon.png differ diff --git a/calculate-sha256sum@rcalixte/files/calculate-sha256sum@rcalixte/metadata.json b/calculate-sha256sum@rcalixte/files/calculate-sha256sum@rcalixte/metadata.json new file mode 100644 index 00000000..d5f86344 --- /dev/null +++ b/calculate-sha256sum@rcalixte/files/calculate-sha256sum@rcalixte/metadata.json @@ -0,0 +1,7 @@ +{ + "description": "Calculate the sha256sum for a single file", + "uuid": "calculate-sha256sum@rcalixte", + "name": "Calculate sha256sum", + "author": "rcalixte", + "version": "1.0" +} diff --git a/calculate-sha256sum@rcalixte/files/calculate-sha256sum@rcalixte/po/calculate-sha256sum@rcalixte.pot b/calculate-sha256sum@rcalixte/files/calculate-sha256sum@rcalixte/po/calculate-sha256sum@rcalixte.pot new file mode 100644 index 00000000..1889e3a5 --- /dev/null +++ b/calculate-sha256sum@rcalixte/files/calculate-sha256sum@rcalixte/po/calculate-sha256sum@rcalixte.pot @@ -0,0 +1,31 @@ +# Calculate sha256sum +# Copyright (C) 2023 +# Rick Calixte <10281587+rcalixte@users.noreply.github.com>, 2023. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: 1.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2023-11-26 22:48-0500\n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: en\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.4\n" + +#. metadata.json->description +msgid "Calculate the sha256sum for a single file" +msgstr "" + +#. metadata.json->name +#. Name +msgid "Calculate sha256sum" +msgstr "" + +#. Comment +msgid "Calculate the sha256sum for this file" +msgstr "" diff --git a/calculate-sha256sum@rcalixte/info.json b/calculate-sha256sum@rcalixte/info.json new file mode 100644 index 00000000..48ccc0fc --- /dev/null +++ b/calculate-sha256sum@rcalixte/info.json @@ -0,0 +1,3 @@ +{ + "author": "rcalixte" +}