From 655cf7051a8e569b67e8388a1fd85df1046dc10b Mon Sep 17 00:00:00 2001 From: David Maisonave <47364845+David-Maisonave@users.noreply.github.com> Date: Fri, 29 Nov 2024 07:11:04 -0500 Subject: [PATCH] First non-beta release for FileMonitor Plugin - Added Tools-UI option to get FileMonitor running status. - Added Stash toolbar icon to get FileMonitor running status. --- plugins/DupFileManager/DupFileManager.js | 62 ++++++------ plugins/DupFileManager/DupFileManager.yml | 2 +- plugins/DupFileManager/README.md | 5 +- plugins/DupFileManager/advance_options.html | 62 ++++++------ .../DupFileManager/version_history/README.md | 4 + plugins/FileMonitor/README.md | 4 +- plugins/FileMonitor/filemonitor.js | 96 +++++++++++++++++++ plugins/FileMonitor/filemonitor.py | 40 ++++++-- plugins/FileMonitor/filemonitor.yml | 5 +- plugins/FileMonitor/version_history/README.md | 4 + plugins/RenameFile/README.md | 2 + 11 files changed, 214 insertions(+), 72 deletions(-) create mode 100644 plugins/FileMonitor/filemonitor.js create mode 100644 plugins/FileMonitor/version_history/README.md diff --git a/plugins/DupFileManager/DupFileManager.js b/plugins/DupFileManager/DupFileManager.js index 4042fa1..f2b1b66 100644 --- a/plugins/DupFileManager/DupFileManager.js +++ b/plugins/DupFileManager/DupFileManager.js @@ -48,7 +48,6 @@ const React = PluginApi.React; const GQL = PluginApi.GQL; const { Button } = PluginApi.libraries.Bootstrap; - const { faEthernet } = PluginApi.libraries.FontAwesomeSolid; const { Link, NavLink, } = PluginApi.libraries.ReactRouterDOM; // ToolTip text const CreateReportButtonToolTip = "Tag duplicate files, and create a new duplicate file report listing all duplicate files and using existing DupFileManager plugin options selected."; @@ -57,12 +56,12 @@ const ShowReportButtonToolTip = "Open link to the duplicate file (HTML) report created in local path."; const ReportMenuButtonToolTip = "Main report menu for DupFileManager. Create and show duplicate files on an HTML report."; // Buttons - const DupFileManagerReportMenuButton = React.createElement(Link, { to: "/plugin/DupFileManager", title: ReportMenuButtonToolTip }, React.createElement(Button, null, "DupFileManager Report Menu")); - const ToolsMenuOptionButton = React.createElement(Link, { to: "/plugin/DupFileManager_ToolsAndUtilities", title: ToolsMenuToolTip }, React.createElement(Button, null, "DupFileManager Tools and Utilities")); + const DupFileManagerReportMenuButton = React.createElement(Link, { to: "/DupFileManager", title: ReportMenuButtonToolTip }, React.createElement(Button, null, "DupFileManager Report Menu")); + const ToolsMenuOptionButton = React.createElement(Link, { to: "/DupFileManager_ToolsAndUtilities", title: ToolsMenuToolTip }, React.createElement(Button, null, "DupFileManager Tools and Utilities")); function GetShowReportButton(LocalDuplicateReportPath, ButtonText){return React.createElement("a", { href: LocalDuplicateReportPath, title: ShowReportButtonToolTip}, React.createElement(Button, null, ButtonText));} function GetAdvanceMenuButton(){return React.createElement("a", { href: AdvanceMenuOptionUrl, title: "Open link to the [Advance Duplicate File Deletion Menu]."}, React.createElement(Button, null, "Show [Advance Duplicate File Deletion Menu]"));} - function GetCreateReportNoTagButton(ButtonText){return React.createElement(Link, { to: "/plugin/DupFileManager_CreateReportWithNoTagging", title: CreateReportNoTagButtonToolTip }, React.createElement(Button, null, ButtonText));} - function GetCreateReportButton(ButtonText){return React.createElement(Link, { to: "/plugin/DupFileManager_CreateReport", title: CreateReportButtonToolTip }, React.createElement(Button, null, ButtonText));} + function GetCreateReportNoTagButton(ButtonText){return React.createElement(Link, { to: "/DupFileManager_CreateReportWithNoTagging", title: CreateReportNoTagButtonToolTip }, React.createElement(Button, null, ButtonText));} + function GetCreateReportButton(ButtonText){return React.createElement(Link, { to: "/DupFileManager_CreateReport", title: CreateReportButtonToolTip }, React.createElement(Button, null, ButtonText));} const { LoadingIndicator, } = PluginApi.components; const HomePage = () => { @@ -132,34 +131,34 @@ React.createElement("p", null), GetShowReportButton(GetLocalDuplicateReportPath(), "Show Duplicate-File Report"), React.createElement("p", null), - React.createElement(Link, { to: "/plugin/DupFileManager_deleteLocalDupReportHtmlFiles", title: "Delete local HTML duplicate file report." }, React.createElement(Button, null, "Delete Duplicate-File Report HTML Files")), + React.createElement(Link, { to: "/DupFileManager_deleteLocalDupReportHtmlFiles", title: "Delete local HTML duplicate file report." }, React.createElement(Button, null, "Delete Duplicate-File Report HTML Files")), React.createElement("hr", {class:"dotted"}), React.createElement("h3", {class:"submenu"}, "Tagged Duplicates Options"), React.createElement("p", null), GetAdvanceMenuButton(), React.createElement("p", null), - React.createElement(Link, { to: "/plugin/DupFileManager_deleteTaggedDuplicatesTask", title: "Delete scenes previously given duplicate tag (_DuplicateMarkForDeletion)." }, React.createElement(Button, null, "Delete Tagged Duplicates")), + React.createElement(Link, { to: "/DupFileManager_deleteTaggedDuplicatesTask", title: "Delete scenes previously given duplicate tag (_DuplicateMarkForDeletion)." }, React.createElement(Button, null, "Delete Tagged Duplicates")), React.createElement("p", null), - React.createElement(Link, { to: "/plugin/DupFileManager_deleteBlackListTaggedDuplicatesTask", title: "Delete scenes only in blacklist which where previously given duplicate tag (_DuplicateMarkForDeletion)." }, React.createElement(Button, null, "Delete Tagged Duplicates in Blacklist Only")), + React.createElement(Link, { to: "/DupFileManager_deleteBlackListTaggedDuplicatesTask", title: "Delete scenes only in blacklist which where previously given duplicate tag (_DuplicateMarkForDeletion)." }, React.createElement(Button, null, "Delete Tagged Duplicates in Blacklist Only")), React.createElement("p", null), - React.createElement(Link, { to: "/plugin/DupFileManager_deleteTaggedDuplicatesLwrResOrLwrDuration", title: "Delete scenes previously given duplicate tag (_DuplicateMarkForDeletion) and lower resultion or duration compare to primary (ToKeep) duplicate." }, React.createElement(Button, null, "Delete Low Res/Dur Tagged Duplicates")), + React.createElement(Link, { to: "/DupFileManager_deleteTaggedDuplicatesLwrResOrLwrDuration", title: "Delete scenes previously given duplicate tag (_DuplicateMarkForDeletion) and lower resultion or duration compare to primary (ToKeep) duplicate." }, React.createElement(Button, null, "Delete Low Res/Dur Tagged Duplicates")), React.createElement("p", null), - React.createElement(Link, { to: "/plugin/DupFileManager_deleteBlackListTaggedDuplicatesLwrResOrLwrDuration", title: "Delete scenes only in blacklist which where previously given duplicate tag (_DuplicateMarkForDeletion) and lower resultion or duration compare to primary (ToKeep) duplicate." }, React.createElement(Button, null, "Delete Low Res/Dur Tagged Duplicates in Blacklist Only")), + React.createElement(Link, { to: "/DupFileManager_deleteBlackListTaggedDuplicatesLwrResOrLwrDuration", title: "Delete scenes only in blacklist which where previously given duplicate tag (_DuplicateMarkForDeletion) and lower resultion or duration compare to primary (ToKeep) duplicate." }, React.createElement(Button, null, "Delete Low Res/Dur Tagged Duplicates in Blacklist Only")), React.createElement("p", null), React.createElement("hr", {class:"dotted"}), React.createElement("h3", {class:"submenu"}, "Tagged Management Options"), React.createElement("p", null), - React.createElement(Link, { to: "/plugin/DupFileManager_ClearAllDuplicateTags", title: "Remove duplicate tag from all scenes. This task may take some time to complete." }, React.createElement(Button, null, "Clear All Duplicate Tags")), + React.createElement(Link, { to: "/DupFileManager_ClearAllDuplicateTags", title: "Remove duplicate tag from all scenes. This task may take some time to complete." }, React.createElement(Button, null, "Clear All Duplicate Tags")), React.createElement("p", null), - React.createElement(Link, { to: "/plugin/DupFileManager_deleteAllDupFileManagerTags", title: "Delete all DupFileManager tags from stash." }, React.createElement(Button, null, "Delete All DupFileManager Tags")), + React.createElement(Link, { to: "/DupFileManager_deleteAllDupFileManagerTags", title: "Delete all DupFileManager tags from stash." }, React.createElement(Button, null, "Delete All DupFileManager Tags")), React.createElement("p", null), - React.createElement(Link, { to: "/plugin/DupFileManager_tagGrayList", title: "Set tag _GraylistMarkForDeletion to scenes having DuplicateMarkForDeletion tag and that are in the Graylist." }, React.createElement(Button, null, "Tag Graylist")), + React.createElement(Link, { to: "/DupFileManager_tagGrayList", title: "Set tag _GraylistMarkForDeletion to scenes having DuplicateMarkForDeletion tag and that are in the Graylist." }, React.createElement(Button, null, "Tag Graylist")), React.createElement("hr", {class:"dotted"}), React.createElement("h3", {class:"submenu"}, "Miscellaneous Options"), - React.createElement(Link, { to: "/plugin/DupFileManager_generatePHASH_Matching", title: "Generate PHASH (Perceptual hashes) matching. Used for file comparisons." }, React.createElement(Button, null, "Generate PHASH (Perceptual hashes) Matching")), + React.createElement(Link, { to: "/DupFileManager_generatePHASH_Matching", title: "Generate PHASH (Perceptual hashes) matching. Used for file comparisons." }, React.createElement(Button, null, "Generate PHASH (Perceptual hashes) Matching")), React.createElement("p", null), React.createElement("p", null), React.createElement("p", null), @@ -276,40 +275,41 @@ } return ToolsAndUtilities(); }; - PluginApi.register.route("/plugin/DupFileManager", HomePage); - PluginApi.register.route("/plugin/DupFileManager_CreateReport", CreateReport); - PluginApi.register.route("/plugin/DupFileManager_CreateReportWithNoTagging", CreateReportWithNoTagging); - PluginApi.register.route("/plugin/DupFileManager_ToolsAndUtilities", ToolsAndUtilities); - PluginApi.register.route("/plugin/DupFileManager_ClearAllDuplicateTags", ClearAllDuplicateTags); - PluginApi.register.route("/plugin/DupFileManager_deleteLocalDupReportHtmlFiles", deleteLocalDupReportHtmlFiles); - PluginApi.register.route("/plugin/DupFileManager_deleteAllDupFileManagerTags", deleteAllDupFileManagerTags); - PluginApi.register.route("/plugin/DupFileManager_generatePHASH_Matching", generatePHASH_Matching); - PluginApi.register.route("/plugin/DupFileManager_tagGrayList", tagGrayList); - PluginApi.register.route("/plugin/DupFileManager_deleteTaggedDuplicatesTask", deleteTaggedDuplicatesTask); - PluginApi.register.route("/plugin/DupFileManager_deleteBlackListTaggedDuplicatesTask", deleteBlackListTaggedDuplicatesTask); - PluginApi.register.route("/plugin/DupFileManager_deleteTaggedDuplicatesLwrResOrLwrDuration", deleteTaggedDuplicatesLwrResOrLwrDuration); - PluginApi.register.route("/plugin/DupFileManager_deleteBlackListTaggedDuplicatesLwrResOrLwrDuration", deleteBlackListTaggedDuplicatesLwrResOrLwrDuration); + PluginApi.register.route("/DupFileManager", HomePage); + PluginApi.register.route("/DupFileManager_CreateReport", CreateReport); + PluginApi.register.route("/DupFileManager_CreateReportWithNoTagging", CreateReportWithNoTagging); + PluginApi.register.route("/DupFileManager_ToolsAndUtilities", ToolsAndUtilities); + PluginApi.register.route("/DupFileManager_ClearAllDuplicateTags", ClearAllDuplicateTags); + PluginApi.register.route("/DupFileManager_deleteLocalDupReportHtmlFiles", deleteLocalDupReportHtmlFiles); + PluginApi.register.route("/DupFileManager_deleteAllDupFileManagerTags", deleteAllDupFileManagerTags); + PluginApi.register.route("/DupFileManager_generatePHASH_Matching", generatePHASH_Matching); + PluginApi.register.route("/DupFileManager_tagGrayList", tagGrayList); + PluginApi.register.route("/DupFileManager_deleteTaggedDuplicatesTask", deleteTaggedDuplicatesTask); + PluginApi.register.route("/DupFileManager_deleteBlackListTaggedDuplicatesTask", deleteBlackListTaggedDuplicatesTask); + PluginApi.register.route("/DupFileManager_deleteTaggedDuplicatesLwrResOrLwrDuration", deleteTaggedDuplicatesLwrResOrLwrDuration); + PluginApi.register.route("/DupFileManager_deleteBlackListTaggedDuplicatesLwrResOrLwrDuration", deleteBlackListTaggedDuplicatesLwrResOrLwrDuration); PluginApi.patch.before("SettingsToolsSection", function (props) { const { Setting, } = PluginApi.components; return [ { children: (React.createElement(React.Fragment, null, props.children, - React.createElement(Setting, { heading: React.createElement(Link, { to: "/plugin/DupFileManager", title: ReportMenuButtonToolTip }, React.createElement(Button, null, "Duplicate File Report (DupFileManager)"))}), - React.createElement(Setting, { heading: React.createElement(Link, { to: "/plugin/DupFileManager_ToolsAndUtilities", title: ToolsMenuToolTip }, React.createElement(Button, null, "DupFileManager Tools and Utilities"))}), + React.createElement(Setting, { heading: React.createElement(Link, { to: "/DupFileManager", title: ReportMenuButtonToolTip }, React.createElement(Button, null, "Duplicate File Report (DupFileManager)"))}), + React.createElement(Setting, { heading: React.createElement(Link, { to: "/DupFileManager_ToolsAndUtilities", title: ToolsMenuToolTip }, React.createElement(Button, null, "DupFileManager Tools and Utilities"))}), )), }, ]; }); + const { faFileVideo } = PluginApi.libraries.FontAwesomeSolid; PluginApi.patch.before("MainNavBar.UtilityItems", function (props) { const { Icon, } = PluginApi.components; return [ { children: (React.createElement(React.Fragment, null, props.children, - React.createElement(NavLink, { className: "nav-utility", exact: true, to: "/plugin/DupFileManager" }, + React.createElement(NavLink, { className: "nav-utility", exact: true, to: "/DupFileManager" }, React.createElement(Button, { className: "minimal d-flex align-items-center h-100", title: ReportMenuButtonToolTip }, - React.createElement(Icon, { icon: faEthernet }))))) + React.createElement(Icon, { icon: faFileVideo }))))) // faFileVideo fa-FileImport } ]; }); diff --git a/plugins/DupFileManager/DupFileManager.yml b/plugins/DupFileManager/DupFileManager.yml index 8544b65..24aeea7 100644 --- a/plugins/DupFileManager/DupFileManager.yml +++ b/plugins/DupFileManager/DupFileManager.yml @@ -1,6 +1,6 @@ name: DupFileManager description: Manages duplicate files. -version: 1.0.0 +version: 1.0.1 url: https://github.com/David-Maisonave/Axter-Stash/tree/main/plugins/DupFileManager ui: javascript: diff --git a/plugins/DupFileManager/README.md b/plugins/DupFileManager/README.md index ed40e70..bf85adf 100644 --- a/plugins/DupFileManager/README.md +++ b/plugins/DupFileManager/README.md @@ -1,4 +1,4 @@ -# DupFileManager: Ver 1.0.0 (By David Maisonave) +# DupFileManager: Ver 1.0.1 (By David Maisonave) DupFileManager is a [Stash](https://github.com/stashapp/stash) plugin which manages duplicate files in the Stash system. It has both **task** and **tools-UI** components. @@ -101,9 +101,10 @@ That's it!!! - Full bottom extended portion of the Advanced Menu screen. - ![Screenshot 2024-11-22 232208](https://github.com/user-attachments/assets/bf1f3021-3a8c-4875-9737-60ee3d7fe675) -### Future Planned Features +### Future Planned Features or Fixes - Add logic to merge performers and galaries seperatly from tag merging on report. Planned for 1.5.0 Version. - Add code to report to make it when the report updates the screen (due to tag merging), it stays in the same row position. Planned for 1.5.0 Version. +- Fix errors on HTML page listed in https://validator.w3.org. Planned for 1.9.0 Version. - Add logic to merge group metadata when selecting merge option on report. Planned for 2.0.0 Version. - Add advanced menu directly to the Settings->Tools menu. Planned for 2.0.0 Version. - Add report directly to the Settings->Tools menu. Planned for 2.0.0 Version. diff --git a/plugins/DupFileManager/advance_options.html b/plugins/DupFileManager/advance_options.html index 05ba1b6..5724eda 100644 --- a/plugins/DupFileManager/advance_options.html +++ b/plugins/DupFileManager/advance_options.html @@ -281,31 +281,33 @@ function DeleteDupInPath(){
DupFileManager
Advance Duplicate File Deletion MenuApply Multiple Options - +
- - - -
Create report overriding user [Match Duplicate Distance] and [significantTimeDiff] settings
- - - - -
+ + + + + + + + + + +