Add ebook support

This commit is contained in:
Anthony Stirling
2024-01-09 22:39:21 +00:00
parent 572f9f728f
commit ef12c2f892
22 changed files with 668 additions and 52 deletions

View File

@@ -1,5 +1,8 @@
package stirling.software.SPDF.config;
import java.nio.file.Files;
import java.nio.file.Paths;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -57,4 +60,38 @@ public class AppConfig {
if (appName == null) appName = System.getenv("rateLimit");
return (appName != null) ? Boolean.valueOf(appName) : false;
}
@Bean(name = "RunningInDocker")
public boolean runningInDocker() {
return Files.exists(Paths.get("/.dockerenv"));
}
@Bean(name = "bookFormatsInstalled")
public boolean bookFormatsInstalled() {
System.out.println("astirli " + applicationProperties.getSystem());
System.out.println("astirli2 " + applicationProperties.getSystem().getCustomApplications());
System.out.println(
"astirli3 "
+ applicationProperties
.getSystem()
.getCustomApplications()
.isInstallBookFormats());
return applicationProperties.getSystem().getCustomApplications().isInstallBookFormats();
}
@Bean(name = "htmlFormatsInstalled")
public boolean htmlFormatsInstalled() {
System.out.println("astirli4 " + applicationProperties.getSystem());
System.out.println("astirli5 " + applicationProperties.getSystem().getCustomApplications());
System.out.println(
"astirli6 "
+ applicationProperties
.getSystem()
.getCustomApplications()
.isInstallAdvancedHtmlToPDF());
return applicationProperties
.getSystem()
.getCustomApplications()
.isInstallAdvancedHtmlToPDF();
}
}