automate fat docker
This commit is contained in:
@@ -125,9 +125,7 @@ public class AppConfig {
|
||||
public Predicate<Path> processPDFOnlyFilter() {
|
||||
return path -> {
|
||||
if (Files.isDirectory(path)) {
|
||||
return !path.toString()
|
||||
.contains(
|
||||
"processing");
|
||||
return !path.toString().contains("processing");
|
||||
} else {
|
||||
String fileName = path.getFileName().toString();
|
||||
return fileName.endsWith(".pdf");
|
||||
|
||||
@@ -139,7 +139,11 @@ public class PipelineDirectoryProcessor {
|
||||
throws IOException {
|
||||
try (Stream<Path> paths = Files.list(dir)) {
|
||||
if ("automated".equals(operation.getParameters().get("fileInput"))) {
|
||||
return paths.filter(path -> !Files.isDirectory(path) && !path.equals(jsonFile) && fileMonitor.isFileReadyForProcessing(path))
|
||||
return paths.filter(
|
||||
path ->
|
||||
!Files.isDirectory(path)
|
||||
&& !path.equals(jsonFile)
|
||||
&& fileMonitor.isFileReadyForProcessing(path))
|
||||
.map(Path::toFile)
|
||||
.toArray(File[]::new);
|
||||
} else {
|
||||
|
||||
@@ -29,7 +29,8 @@ public class FileMonitor {
|
||||
|
||||
/**
|
||||
* @param rootDirectory the root directory to monitor
|
||||
* @param pathFilter the filter to apply to the paths, return true if the path should be monitored, false otherwise
|
||||
* @param pathFilter the filter to apply to the paths, return true if the path should be
|
||||
* monitored, false otherwise
|
||||
*/
|
||||
@Autowired
|
||||
public FileMonitor(
|
||||
|
||||
@@ -90,6 +90,9 @@
|
||||
<div
|
||||
th:replace="~{fragments/navbarEntry :: navbarEntry ('markdown-to-pdf', 'markdown', 'home.MarkdownToPDF.title', 'home.MarkdownToPDF.desc', 'MarkdownToPDF.tags', 'convert')}">
|
||||
</div>
|
||||
<div
|
||||
th:replace="~{fragments/navbarEntry :: navbarEntry ('book-to-pdf', 'book', 'home.BookToPDF.title', 'home.BookToPDF.desc', 'BookToPDF.tags', 'convert')}">
|
||||
</div>
|
||||
</div>
|
||||
<!-- Convert from PDF menu items -->
|
||||
<div class="col-lg-2 col-sm-6 py px-xl-1 px-2">
|
||||
@@ -118,6 +121,9 @@
|
||||
<div
|
||||
th:replace="~{fragments/navbarEntry :: navbarEntry ('pdf-to-csv', 'csv', 'home.tableExtraxt.title', 'home.tableExtraxt.desc', 'pdfToPDFA.tags', 'convert')}">
|
||||
</div>
|
||||
<div
|
||||
th:replace="~{fragments/navbarEntry :: navbarEntry ('pdf-to-book', 'book', 'home.PDFToBook.title', 'home.PDFToBook.desc', 'PDFToBook.tags', 'convert')}">
|
||||
</div>
|
||||
</div>
|
||||
<!-- Security menu items -->
|
||||
<div class="col-lg-2 col-sm-6 py px-xl-1 px-2">
|
||||
|
||||
Reference in New Issue
Block a user