This commit is contained in:
Anthony Stirling 2023-12-27 00:53:31 +00:00
parent 6ee8e1e37f
commit 659af2089c
3 changed files with 54 additions and 7 deletions

View file

@ -5,19 +5,22 @@
"operation": "/api/v1/general/split-pdf-by-sections", "operation": "/api/v1/general/split-pdf-by-sections",
"parameters": { "parameters": {
"horizontalDivisions": 2, "horizontalDivisions": 2,
"verticalDivisions": 2 "verticalDivisions": 2,
"fileInput": "automated"
} }
}, },
{ {
"operation": "/api/v1/general/rotate-pdf", "operation": "/api/v1/general/rotate-pdf",
"parameters": { "parameters": {
"angle": 90 "angle": 90,
"fileInput": "automated"
} }
}, },
{ {
"operation": "/api/v1/misc/auto-rename", "operation": "/api/v1/misc/auto-rename",
"parameters": { "parameters": {
"useFirstTextAsFallback": false "useFirstTextAsFallback": false,
"fileInput": "automated"
} }
} }
], ],
@ -25,6 +28,6 @@
"outputDir": "{outputFolder}/{folderName}", "outputDir": "{outputFolder}/{folderName}",
"outputFileName": "{filename}-{pipelineName}-{date}-{time}" "outputFileName": "{filename}-{pipelineName}-{date}-{time}"
}, },
"outputDir": "httpWebRequest", "outputDir": "{outputFolder}",
"outputFileName": "{filename}" "outputFileName": "{filename}"
} }

View file

@ -48,6 +48,9 @@ public class SecurityConfiguration {
@Autowired @Autowired
private LoginAttemptService loginAttemptService; private LoginAttemptService loginAttemptService;
@Autowired
private FirstLoginFilter firstLoginFilter;
@Bean @Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http.addFilterBefore(userAuthenticationFilter, UsernamePasswordAuthenticationFilter.class); http.addFilterBefore(userAuthenticationFilter, UsernamePasswordAuthenticationFilter.class);
@ -55,8 +58,8 @@ public class SecurityConfiguration {
if(loginEnabledValue) { if(loginEnabledValue) {
http.csrf(csrf -> csrf.disable()); http.csrf(csrf -> csrf.disable());
//http.addFilterBefore(rateLimitingFilter(), UsernamePasswordAuthenticationFilter.class); http.addFilterBefore(rateLimitingFilter(), UsernamePasswordAuthenticationFilter.class);
//http.addFilterAfter(firstLoginFilter, UsernamePasswordAuthenticationFilter.class); http.addFilterAfter(firstLoginFilter, UsernamePasswordAuthenticationFilter.class);
http http
.formLogin(formLogin -> formLogin .formLogin(formLogin -> formLogin
.loginPage("/login") .loginPage("/login")

View file

@ -76,6 +76,12 @@
<li>For reuse, download the config file and re-upload it when needed, or place it in /pipeline/defaultWebUIConfigs/ to auto-load in the web UI for all users</li> <li>For reuse, download the config file and re-upload it when needed, or place it in /pipeline/defaultWebUIConfigs/ to auto-load in the web UI for all users</li>
</ul> </ul>
<h3>How to use config for folder scanning</h3>
<ul>
<li>Download config files</li>
<li>For reuse, download the config file and re-upload it when needed, or place it in /pipeline/defaultWebUIConfigs/ to auto-load in the web UI for all users</li>
</ul>
<h3>Todo</h3> <h3>Todo</h3>
<ul> <ul>
<li>fix initial config selected not loading</li> <li>fix initial config selected not loading</li>
@ -83,10 +89,45 @@
<li>multiInput support</li> <li>multiInput support</li>
<li>Translation support</li> <li>Translation support</li>
<li>offline mode checks and testing</li> <li>offline mode checks and testing</li>
<li>Improve operation config settings UI</li>
</ul> </ul>
<h2>User Guide for Local Directory Scanning and File Processing</h2>
<h3>Setting Up Watched Folders:</h3>
<p>Create a folder where you want your files to be monitored. This is your 'watched folder'.</p>
<p>The default directory for this is <code>./pipeline/watchedFolders/</code></p>
<p>Place any directories you want to be scanned into this folder, this folder should contain multiple folders each for their own tasks and pipelines.</p>
<h3>Configuring Processing with JSON Files:</h3>
<p>In each directory you want processed (e.g <code>./pipeline/watchedFolders/officePrinter</code>), include a JSON configuration file.</p>
<p>This JSON file should specify how you want the files in the directory to be handled (e.g., what operations to perform on them) which can be made, configured and downloaded from Stirling-PDF Pipeline interface.</p>
<h3>Automatic Scanning and Processing:</h3>
<p>The system automatically checks the watched folder every minute for new directories and files to process.</p>
<p>When a directory with a valid JSON configuration file is found, it begins processing the files inside as per the configuration.</p>
<h3>Processing Steps:</h3>
<p>Files in each directory are processed according to the instructions in the JSON file.</p>
<p>This might involve file conversions, data filtering, renaming files, etc. If the output of a step is a zip, this zip will be automatically unzipped as it passes to next process.</p>
<h3>Results and Output:</h3>
<p>After processing, the results are saved in a specified output location. This could be a different folder or location as defined in the JSON file or the default location <code>./pipeline/finishedFolders/</code>.</p>
<p>Each processed file is named and organized according to the rules set in the JSON configuration.</p>
<h3>Completion and Cleanup:</h3>
<p>Once processing is complete, the original files in the watched folder's directory are removed.</p>
<p>You can find the processed files in the designated output location.</p>
<h3>Error Handling:</h3>
<p>If there's an error during processing, the system will not delete the original files, allowing you to check and retry if necessary.</p>
<h3>User Interaction:</h3>
<p>As a user, your main tasks are to set up the watched folders, place directories with files for processing, and create the corresponding JSON configuration files.</p>
<p>The system handles the rest, including scanning, processing, and outputting results.</p>
<!-- The Modal --> <!-- The Modal -->
<div class="modal" id="pipelineSettingsModal"> <div class="modal" id="pipelineSettingsModal">
<div class="modal-dialog"> <div class="modal-dialog">