From 91fe5d3d9e4458d34745aa24dffcf85219f6ca17 Mon Sep 17 00:00:00 2001 From: Rutar Andriy Date: Wed, 5 Mar 2025 11:25:08 +0200 Subject: [PATCH] extract-resources@RutarAndriy: Add action --- extract-resources@RutarAndriy/CHANGELOG.md | 3 ++ extract-resources@RutarAndriy/README.md | 10 +++++ ...tract-resources@RutarAndriy.nemo_action.in | 8 ++++ .../extract-resources.sh | 25 +++++++++++ .../extract-resources@RutarAndriy/icon.png | Bin 0 -> 268 bytes .../metadata.json | 7 +++ .../po/extract-resources@RutarAndriy.pot | 39 +++++++++++++++++ .../extract-resources@RutarAndriy/po/uk.po | 40 ++++++++++++++++++ extract-resources@RutarAndriy/info.json | 3 ++ 9 files changed, 135 insertions(+) create mode 100644 extract-resources@RutarAndriy/CHANGELOG.md create mode 100644 extract-resources@RutarAndriy/README.md create mode 100644 extract-resources@RutarAndriy/extract-resources@RutarAndriy.nemo_action.in create mode 100755 extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/extract-resources.sh create mode 100644 extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/icon.png create mode 100644 extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/metadata.json create mode 100644 extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/po/extract-resources@RutarAndriy.pot create mode 100644 extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/po/uk.po create mode 100644 extract-resources@RutarAndriy/info.json diff --git a/extract-resources@RutarAndriy/CHANGELOG.md b/extract-resources@RutarAndriy/CHANGELOG.md new file mode 100644 index 00000000..e600d253 --- /dev/null +++ b/extract-resources@RutarAndriy/CHANGELOG.md @@ -0,0 +1,3 @@ +# v1.0 + +- Initial release diff --git a/extract-resources@RutarAndriy/README.md b/extract-resources@RutarAndriy/README.md new file mode 100644 index 00000000..fd60a5a2 --- /dev/null +++ b/extract-resources@RutarAndriy/README.md @@ -0,0 +1,10 @@ +# Extract resources + +Extracting resources from `*.exe` and `*.dll` files. + +## Dependencies + +The following packages must be installed: + +* `icoutils` for running `wrestool` command +* `notify-send` for show an information message diff --git a/extract-resources@RutarAndriy/extract-resources@RutarAndriy.nemo_action.in b/extract-resources@RutarAndriy/extract-resources@RutarAndriy.nemo_action.in new file mode 100644 index 00000000..70b75146 --- /dev/null +++ b/extract-resources@RutarAndriy/extract-resources@RutarAndriy.nemo_action.in @@ -0,0 +1,8 @@ +[Nemo Action] +_Name=Extract resources +_Comment=Extracting resources from %f +Exec= +Icon-Name=goa-account-msn-symbolic +Selection=s +Extensions=exe;dll; +Dependencies=wrestool;notify-send; diff --git a/extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/extract-resources.sh b/extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/extract-resources.sh new file mode 100755 index 00000000..0fa7c04a --- /dev/null +++ b/extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/extract-resources.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Задаємо необхідні глобальні змінні +TEXTDOMAINDIR=$HOME/.local/share/locale/ +TEXTDOMAIN=extract-resources@RutarAndriy + +_TITLE=$"Extracting resources" +TITLE="$(/usr/bin/gettext "$_TITLE")" +_MESSAGE=$"Resources successfully extracted to $2_res/ folder" +MESSAGE="$(/usr/bin/gettext "$_MESSAGE")" + +# Створюємо нову директорію +mkdir "$1/$2_res" + +# Видобуваємо зображення +wrestool -x --output="$1/$2_res" --raw --type=3 "$1/$2" + +# Видобуваємо курсори +wrestool -x --output="$1/$2_res" --type=12 "$1/$2" + +# Видобуваємо іконки +wrestool -x --output="$1/$2_res" --type=14 "$1/$2" + +# Відображаємо інформаційне повідомлення +notify-send "$TITLE" "$MESSAGE" diff --git a/extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/icon.png b/extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..47e0c9425430ad77a96c5b897b8e20b1c6368de7 GIT binary patch literal 268 zcmeAS@N?(olHy`uVBq!ia0vp^4Is?I3?vN&YJLDImUKs7M+SzC{oH>NS%G}U;vjb? zhIQv;UIIB1C9V-A!TD(=<%vb93;~Imc_n&&t|1DhdWL!?Lid+71J!UActjR6FqBDy zFyq&@dsBge`~f~8uI>ds^-V37W-d*wZCTj`uBi*mfKtpQL4LsufxnA)Hpc_G!JaOT zAsP4H-f-k)P!wP}c$Bf?z(G%j|FaA>aQ;@A{_4GoYJ$?2>9zopr09vb5T>t<8 literal 0 HcmV?d00001 diff --git a/extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/metadata.json b/extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/metadata.json new file mode 100644 index 00000000..d81c65a3 --- /dev/null +++ b/extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/metadata.json @@ -0,0 +1,7 @@ +{ + "description": "Extracting resources from *.exe and *.dll files", + "uuid": "extract-resources@RutarAndriy", + "name": "Extract resources", + "author": "RutarAndriy", + "version": "1.0" +} diff --git a/extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/po/extract-resources@RutarAndriy.pot b/extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/po/extract-resources@RutarAndriy.pot new file mode 100644 index 00000000..d796f2de --- /dev/null +++ b/extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/po/extract-resources@RutarAndriy.pot @@ -0,0 +1,39 @@ +# EXTRACT RESOURCES +# This file is put in the public domain. +# RutarAndriy, 2023 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: extract-resources@RutarAndriy 1.0\n" +"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-actions/" +"issues\n" +"POT-Creation-Date: 2025-03-05 10:52+0200\n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.4.2\n" + +#. metadata.json->description +msgid "Extracting resources from *.exe and *.dll files" +msgstr "" + +#. metadata.json->name +#. extract-resources@RutarAndriy.nemo_action.in->Name +msgid "Extract resources" +msgstr "" + +#. extract-resources.sh:7 +msgid "Extracting resources" +msgstr "" + +#. extract-resources.sh:9 +msgid "Resources successfully extracted to $2_res/ folder" +msgstr "" + +#. extract-resources@RutarAndriy.nemo_action.in->Comment +msgid "Extracting resources from %f" +msgstr "" diff --git a/extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/po/uk.po b/extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/po/uk.po new file mode 100644 index 00000000..c2e33377 --- /dev/null +++ b/extract-resources@RutarAndriy/files/extract-resources@RutarAndriy/po/uk.po @@ -0,0 +1,40 @@ +# EXTRACT RESOURCES +# This file is put in the public domain. +# RutarAndriy, 2023 +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: extract-resources@RutarAndriy 1.0\n" +"Report-Msgid-Bugs-To: https://github.com/linuxmint/cinnamon-spices-actions/" +"issues\n" +"POT-Creation-Date: 2025-03-05 10:52+0200\n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: uk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 3.4.2\n" + +#. metadata.json->description +msgid "Extracting resources from *.exe and *.dll files" +msgstr "Видобування ресурсів з *.exe та *.dll файлів" + +#. metadata.json->name +#. extract-resources@RutarAndriy.nemo_action.in->Name +msgid "Extract resources" +msgstr "Видобування ресурсів" + +#. extract-resources.sh:7 +msgid "Extracting resources" +msgstr "Видобування ресурсів" + +#. extract-resources.sh:9 +msgid "Resources successfully extracted to $2_res/ folder" +msgstr "Ресурси успішно видобуто в папку $2_res/" + +#. extract-resources@RutarAndriy.nemo_action.in->Comment +msgid "Extracting resources from %f" +msgstr "Видобування ресурсів з %f" diff --git a/extract-resources@RutarAndriy/info.json b/extract-resources@RutarAndriy/info.json new file mode 100644 index 00000000..b5e206bd --- /dev/null +++ b/extract-resources@RutarAndriy/info.json @@ -0,0 +1,3 @@ +{ + "author": "RutarAndriy" +}