forked from Github/Axter-Stash
prettier changes
This commit is contained in:
@@ -1,6 +1,9 @@
|
|||||||
# DupFileManager: Ver 0.1.2 (By David Maisonave)
|
# DupFileManager: Ver 0.1.2 (By David Maisonave)
|
||||||
|
|
||||||
DupFileManager is a [Stash](https://github.com/stashapp/stash) plugin which manages duplicate file in the Stash system.
|
DupFileManager is a [Stash](https://github.com/stashapp/stash) plugin which manages duplicate file in the Stash system.
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
- Can merge potential source in the duplicate file names for tag names, performers, and studios.
|
- Can merge potential source in the duplicate file names for tag names, performers, and studios.
|
||||||
- Normally when Stash searches the file name for tag names, performers, and studios, it only does so using the primary file.
|
- Normally when Stash searches the file name for tag names, performers, and studios, it only does so using the primary file.
|
||||||
- Delete duplicate file task with the following options:
|
- Delete duplicate file task with the following options:
|
||||||
@@ -21,11 +24,13 @@ DupFileManager is a [Stash](https://github.com/stashapp/stash) plugin which mana
|
|||||||
- **toRecycleBeforeSwap** - When enabled, moves destination file to recycle bin before swapping files.
|
- **toRecycleBeforeSwap** - When enabled, moves destination file to recycle bin before swapping files.
|
||||||
|
|
||||||
### Requirements
|
### Requirements
|
||||||
|
|
||||||
`pip install --upgrade stashapp-tools`
|
`pip install --upgrade stashapp-tools`
|
||||||
`pip install pyYAML`
|
`pip install pyYAML`
|
||||||
`pip install Send2Trash`
|
`pip install Send2Trash`
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
- Follow **Requirements** instructions.
|
- Follow **Requirements** instructions.
|
||||||
- In the stash plugin directory (C:\Users\MyUserName\.stash\plugins), create a folder named **DupFileManager**.
|
- In the stash plugin directory (C:\Users\MyUserName\.stash\plugins), create a folder named **DupFileManager**.
|
||||||
- Copy all the plugin files to this folder.(**C:\Users\MyUserName\\.stash\plugins\DupFileManager**).
|
- Copy all the plugin files to this folder.(**C:\Users\MyUserName\\.stash\plugins\DupFileManager**).
|
||||||
@@ -34,6 +39,6 @@ DupFileManager is a [Stash](https://github.com/stashapp/stash) plugin which mana
|
|||||||
That's it!!!
|
That's it!!!
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
- Options are accessible in the GUI via Settings->Plugins->Plugins->[DupFileManager].
|
- Options are accessible in the GUI via Settings->Plugins->Plugins->[DupFileManager].
|
||||||
- More options available in DupFileManager_config.py.
|
- More options available in DupFileManager_config.py.
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,24 @@
|
|||||||
# FileMonitor: Ver 0.9.0 (By David Maisonave)
|
# FileMonitor: Ver 0.9.0 (By David Maisonave)
|
||||||
|
|
||||||
FileMonitor is a [Stash](https://github.com/stashapp/stash) plugin with the following two main features:
|
FileMonitor is a [Stash](https://github.com/stashapp/stash) plugin with the following two main features:
|
||||||
|
|
||||||
- Updates Stash when any file changes occurs in the Stash library.
|
- Updates Stash when any file changes occurs in the Stash library.
|
||||||
- **Task Scheduler**: Runs scheduled task based on the scheduler configuration in **filemonitor_config.py**.
|
- **Task Scheduler**: Runs scheduled task based on the scheduler configuration in **filemonitor_config.py**.
|
||||||
|
|
||||||
## Starting FileMonitor from the UI
|
## Starting FileMonitor from the UI
|
||||||
|
|
||||||
From the GUI, FileMonitor can be started as a service or as a plugin. The recommended method is to start it as a service. When started as a service, it will jump on the Task Queue momentarily, and then disappear as it starts running in the background.
|
From the GUI, FileMonitor can be started as a service or as a plugin. The recommended method is to start it as a service. When started as a service, it will jump on the Task Queue momentarily, and then disappear as it starts running in the background.
|
||||||
|
|
||||||
- To start monitoring file changes, go to **Stash->Settings->Task->[Plugin Tasks]->FileMonitor**, and click on the [Start Library Monitor Service] button.
|
- To start monitoring file changes, go to **Stash->Settings->Task->[Plugin Tasks]->FileMonitor**, and click on the [Start Library Monitor Service] button.
|
||||||
- 
|
- 
|
||||||
- **Important Note**: At first, this will show up as a plugin in the Task Queue momentarily. It will then disappear from the Task Queue and run in the background as a service.
|
- **Important Note**: At first, this will show up as a plugin in the Task Queue momentarily. It will then disappear from the Task Queue and run in the background as a service.
|
||||||
- To stop FileMonitor click on [Stop Library Monitor] button.
|
- To stop FileMonitor click on [Stop Library Monitor] button.
|
||||||
- The **[Monitor as a Plugin]** option is mainly available for backwards compatibility and for test purposes.
|
- The **[Monitor as a Plugin]** option is mainly available for backwards compatibility and for test purposes.
|
||||||
|
|
||||||
|
|
||||||
## Using FileMonitor as a script
|
## Using FileMonitor as a script
|
||||||
|
|
||||||
**FileMonitor** can be called as a standalone script.
|
**FileMonitor** can be called as a standalone script.
|
||||||
|
|
||||||
- To start monitoring call the script and pass --url and the Stash URL.
|
- To start monitoring call the script and pass --url and the Stash URL.
|
||||||
- python filemonitor.py --url http://localhost:9999
|
- python filemonitor.py --url http://localhost:9999
|
||||||
- To stop **FileMonitor**, pass argument **--stop**.
|
- To stop **FileMonitor**, pass argument **--stop**.
|
||||||
@@ -24,6 +29,7 @@ From the GUI, FileMonitor can be started as a service or as a plugin. The recomm
|
|||||||
- The restart command restarts FileMonitor as a Task in Stash.
|
- The restart command restarts FileMonitor as a Task in Stash.
|
||||||
|
|
||||||
# Task Scheduler
|
# Task Scheduler
|
||||||
|
|
||||||
To enable the scheduler go to **Stash->Settings->Plugins->Plugins->FileMonitor** and enable the **Scheduler** option.
|
To enable the scheduler go to **Stash->Settings->Plugins->Plugins->FileMonitor** and enable the **Scheduler** option.
|
||||||

|

|
||||||
|
|
||||||
@@ -38,7 +44,8 @@ To enable the scheduler go to **Stash->Settings->Plugins->Plugins->FileMonitor**
|
|||||||
- The example tasks are disabled by default because they either have a zero frequency value or the time field is set to **DISABLED**.
|
- The example tasks are disabled by default because they either have a zero frequency value or the time field is set to **DISABLED**.
|
||||||
|
|
||||||
To configure the schedule or to add new task, edit the **task_scheduler** section in the **filemonitor_config.py** file.
|
To configure the schedule or to add new task, edit the **task_scheduler** section in the **filemonitor_config.py** file.
|
||||||
```` python
|
|
||||||
|
```python
|
||||||
"task_scheduler": [
|
"task_scheduler": [
|
||||||
# To create a daily task, include each day of the week for the weekday field or "every"
|
# To create a daily task, include each day of the week for the weekday field or "every"
|
||||||
# Optional field for task "Auto Tag" is 'paths'. For detail usage, see example #A3: in filemonitor_task_examples.py
|
# Optional field for task "Auto Tag" is 'paths'. For detail usage, see example #A3: in filemonitor_task_examples.py
|
||||||
@@ -78,16 +85,19 @@ To configure the schedule or to add new task, edit the **task_scheduler** sectio
|
|||||||
# Optional fields are 'command' and 'RunAfter'. For detail usage, see examples #C1 and #C2 in filemonitor_task_examples.py
|
# Optional fields are 'command' and 'RunAfter'. For detail usage, see examples #C1 and #C2 in filemonitor_task_examples.py
|
||||||
{"task" : "CheckStashIsRunning", "minutes" :5}, # Checks every 5 minutes
|
{"task" : "CheckStashIsRunning", "minutes" :5}, # Checks every 5 minutes
|
||||||
],
|
],
|
||||||
````
|
```
|
||||||
|
|
||||||
- To add plugins to the task list, use the Plugin-ID in the "task" field. The plugin ID is usually the file name of the script without the extension.
|
- To add plugins to the task list, use the Plugin-ID in the "task" field. The plugin ID is usually the file name of the script without the extension.
|
||||||
- Plugin task have the following optional fields: taskName, taskMode, validateDir, and taskQue
|
- Plugin task have the following optional fields: taskName, taskMode, validateDir, and taskQue
|
||||||
- The **validateDir** field can be used to define the plugin sub directory, which is checked to see if it exist before running the task.
|
- The **validateDir** field can be used to define the plugin sub directory, which is checked to see if it exist before running the task.
|
||||||
- **taskName** field is used to name the task to call for the associated plugin. It can not be used with "taskQue":False
|
- **taskName** field is used to name the task to call for the associated plugin. It can not be used with "taskQue":False
|
||||||
- **taskQue** field is used to call the plugin without using the Task Queue. I.E. "taskQue":False. When this field is set to False, the taskName field can NOT be used. Instead use taskMode to identify the task to call.
|
- **taskQue** field is used to call the plugin without using the Task Queue. I.E. "taskQue":False. When this field is set to False, the taskName field can NOT be used. Instead use taskMode to identify the task to call.
|
||||||
- **taskMode** field is used in order to run the plugin without using the Task Queue. The plugin runs immediatly. Be careful not to confuse taskMode with taskName. Look in the plugin *.yml file under the **tasks** section where it defines both the task-name and the task-mode.
|
- **taskMode** field is used in order to run the plugin without using the Task Queue. The plugin runs immediatly. Be careful not to confuse taskMode with taskName. Look in the plugin \*.yml file under the **tasks** section where it defines both the task-name and the task-mode.
|
||||||
- Task can be scheduled to run monthly, weekly, hourly, and by minutes.
|
- Task can be scheduled to run monthly, weekly, hourly, and by minutes.
|
||||||
- The scheduler list uses two types of syntax. One is **weekday** based, and the other is **frequency** based.
|
- The scheduler list uses two types of syntax. One is **weekday** based, and the other is **frequency** based.
|
||||||
|
|
||||||
- **weekday Based**
|
- **weekday Based**
|
||||||
|
|
||||||
- Use the weekday based syntax for daily, weekly, and monthly schedules.
|
- Use the weekday based syntax for daily, weekly, and monthly schedules.
|
||||||
- All the weekday based methods must have a **weekday** field and a **time** field, which specifies the day(s) of the week and the time to start the task.
|
- All the weekday based methods must have a **weekday** field and a **time** field, which specifies the day(s) of the week and the time to start the task.
|
||||||
- **Daily**:
|
- **Daily**:
|
||||||
@@ -128,6 +138,7 @@ To configure the schedule or to add new task, edit the **task_scheduler** sectio
|
|||||||
- For best results use the scheduler with FileMonitor running as a service.
|
- For best results use the scheduler with FileMonitor running as a service.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
- Or manually install each requirement:
|
- Or manually install each requirement:
|
||||||
- `pip install stashapp-tools --upgrade`
|
- `pip install stashapp-tools --upgrade`
|
||||||
@@ -136,6 +147,7 @@ To configure the schedule or to add new task, edit the **task_scheduler** sectio
|
|||||||
- `pip install schedule`
|
- `pip install schedule`
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
- Follow **Requirements** instructions.
|
- Follow **Requirements** instructions.
|
||||||
- In the stash plugin directory (C:\Users\MyUserName\.stash\plugins), create a folder named **FileMonitor**.
|
- In the stash plugin directory (C:\Users\MyUserName\.stash\plugins), create a folder named **FileMonitor**.
|
||||||
- Copy all the plugin files to this folder.(**C:\Users\MyUserName\\.stash\plugins\FileMonitor**).
|
- Copy all the plugin files to this folder.(**C:\Users\MyUserName\\.stash\plugins\FileMonitor**).
|
||||||
@@ -144,16 +156,17 @@ To configure the schedule or to add new task, edit the **task_scheduler** sectio
|
|||||||
That's it!!!
|
That's it!!!
|
||||||
|
|
||||||
## Options
|
## Options
|
||||||
|
|
||||||
- Main options are accessible in the GUI via Settings->Plugins->Plugins->[FileMonitor].
|
- Main options are accessible in the GUI via Settings->Plugins->Plugins->[FileMonitor].
|
||||||
- When the UI option [Max DB Backups] is set to a value greater than 1, and when the scheduler is enabled, the quantity of database backup files are trim down to the set [**Max DB Backups**] value after the scheduler executes the Backup task.
|
- When the UI option [Max DB Backups] is set to a value greater than 1, and when the scheduler is enabled, the quantity of database backup files are trim down to the set [**Max DB Backups**] value after the scheduler executes the Backup task.
|
||||||
- The other options are self explanatory from the UI.
|
- The other options are self explanatory from the UI.
|
||||||
- Additional options available in filemonitor_config.py. The options are well documented in the commented code.
|
- Additional options available in filemonitor_config.py. The options are well documented in the commented code.
|
||||||
|
|
||||||
## Bugs and Feature Request
|
## Bugs and Feature Request
|
||||||
|
|
||||||
Please use the following link to report FileMonitor bugs:
|
Please use the following link to report FileMonitor bugs:
|
||||||
[FileMonitor Bug Report](https://github.com/David-Maisonave/Axter-Stash/issues/new?assignees=&labels=Plugin_Bug&projects=&template=bug_report_plugin.yml&title=%F0%9F%AA%B2%5BFileMonitor%5D+Your_Short_title)
|
[FileMonitor Bug Report](https://github.com/David-Maisonave/Axter-Stash/issues/new?assignees=&labels=Plugin_Bug&projects=&template=bug_report_plugin.yml&title=%F0%9F%AA%B2%5BFileMonitor%5D+Your_Short_title)
|
||||||
|
|
||||||
Please use the following link to report FileMonitor Feature Request:[FileMonitor Feature Reques](https://github.com/David-Maisonave/Axter-Stash/issues/new?assignees=&labels=Enhancement&projects=&template=feature_request_plugin.yml&title=%F0%9F%92%A1%EF%B8%8F%5BEnhancement%5D%3A%5BFileMonitor%5D+Your_Short_title)
|
Please use the following link to report FileMonitor Feature Request:[FileMonitor Feature Reques](https://github.com/David-Maisonave/Axter-Stash/issues/new?assignees=&labels=Enhancement&projects=&template=feature_request_plugin.yml&title=%F0%9F%92%A1%EF%B8%8F%5BEnhancement%5D%3A%5BFileMonitor%5D+Your_Short_title)
|
||||||
|
|
||||||
Please do **NOT** use the feature request to include any problems associated with errors. Instead use the bug report for error issues.
|
Please do **NOT** use the feature request to include any problems associated with errors. Instead use the bug report for error issues.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user