Skip to content

Commit

Permalink
add calculate-sha256sum@rcalixte (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
rcalixte authored Nov 27, 2023
1 parent bf38edc commit ea212b1
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 0 deletions.
4 changes: 4 additions & 0 deletions calculate-sha256sum@rcalixte/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

### 1.0

* Initial release
18 changes: 18 additions & 0 deletions calculate-sha256sum@rcalixte/README.md
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions calculate-sha256sum@rcalixte/[email protected]_action.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Nemo Action]
_Name=Calculate sha256sum
_Comment=Calculate the sha256sum for this file
Exec=<calculate-sha256sum@rcalixte/[email protected] %F>
Selection=s
Extensions=nodirs;
Dependencies=sha256sum;zenity;
Original file line number Diff line number Diff line change
@@ -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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"description": "Calculate the sha256sum for a single file",
"uuid": "calculate-sha256sum@rcalixte",
"name": "Calculate sha256sum",
"author": "rcalixte",
"version": "1.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Calculate sha256sum
# Copyright (C) 2023
# Rick Calixte <[email protected]>, 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 ""
3 changes: 3 additions & 0 deletions calculate-sha256sum@rcalixte/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"author": "rcalixte"
}

0 comments on commit ea212b1

Please sign in to comment.