Auflösen von Pfaden verbessert
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_17">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: de.srsoftware:tools:1.1.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.srsoftware:tools.translations:1.1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: de.srsoftware:tools.gui.selectcombobox:0.1.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.json:json:20200518" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.icepdf.os:icepdf-core:6.2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.54" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-ext-jdk15on:1.54" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.54" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.icepdf.os:icepdf-viewer:6.2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: batik:batik-awt-util:1.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: batik:batik-dom:1.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: batik:batik-svg-dom:1.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: batik:batik-svggen:1.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: batik:batik-util:1.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: batik:batik-xml:1.6" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
2
pom.xml
2
pom.xml
@@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>BelegScanner</groupId>
|
||||
<artifactId>BelegScanner</artifactId>
|
||||
<version>1.1.1</version>
|
||||
<version>1.1.2</version>
|
||||
|
||||
<name>BelegScanner</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
@@ -86,32 +86,41 @@ public class Worker {
|
||||
int year = 1900+date.getYear();
|
||||
int month = date.getMonth()+1;
|
||||
int day = date.getDate();
|
||||
resolvedPath = rawPath.replace("$"+t("HOME"),HOME)
|
||||
.replace("$"+t("PROFILE"), profile)
|
||||
.replace("$"+t("YEAR"), year+"")
|
||||
.replace("$"+t("MONTH"), month<10 ? "0"+month : ""+month)
|
||||
.replace("$"+t("Month"),monthName(month))
|
||||
.replace("$"+t("month"),monthName(month).toLowerCase())
|
||||
.replace("$"+t("Mon"),monthNameShort(month))
|
||||
.replace("$"+t("mon"),monthNameShort(month).toLowerCase())
|
||||
.replace("$"+t("DAY"), day < 10 ? "0"+day : ""+day);
|
||||
|
||||
var start = resolvedPath.indexOf("$");
|
||||
toolbar.resetAdditionalFields();
|
||||
while (start>-1) {
|
||||
var end = endOfVar(resolvedPath, start+1);
|
||||
if (end>start+1){
|
||||
var variable = resolvedPath.substring(start+1, end);
|
||||
LOG.debug("…unresolved '{}'",variable);
|
||||
var value = PAGE.equals(variable) ? "["+variable+"]":toolbar.requireField(variable);
|
||||
variable = "$"+variable;
|
||||
LOG.debug("replacing '{}' in '{}' by '{}'",variable,resolvedPath,value);
|
||||
resolvedPath = resolvedPath.replace(variable,value);
|
||||
start = resolvedPath.indexOf("$",start+1);
|
||||
} else {
|
||||
start = resolvedPath.indexOf("$",start+2);
|
||||
resolvedPath = rawPath;
|
||||
var last = "";
|
||||
var iter = 0;
|
||||
do {
|
||||
last = resolvedPath;
|
||||
LOG.debug("Starting iteration {}: {}",++iter,resolvedPath);
|
||||
resolvedPath = resolvedPath.replace("$" + t("HOME"), HOME)
|
||||
.replace("$" + t("PROFILE"), profile)
|
||||
.replace("$" + t("YEAR"), year + "")
|
||||
.replace("$" + t("MONTH"), month < 10 ? "0" + month : "" + month)
|
||||
.replace("$" + t("Month"), monthName(month))
|
||||
.replace("$" + t("month"), monthName(month).toLowerCase())
|
||||
.replace("$" + t("Mon"), monthNameShort(month))
|
||||
.replace("$" + t("mon"), monthNameShort(month).toLowerCase())
|
||||
.replace("$" + t("DAY"), day < 10 ? "0" + day : "" + day);
|
||||
|
||||
var start = resolvedPath.indexOf("$");
|
||||
if (start > -1) {
|
||||
var end = endOfVar(resolvedPath, start + 1);
|
||||
if (end > start + 1) {
|
||||
var variable = resolvedPath.substring(start + 1, end);
|
||||
LOG.debug("…unresolved '{}'", variable);
|
||||
var value = PAGE.equals(variable) ? "[" + variable + "]" : toolbar.requireField(variable);
|
||||
variable = "$" + variable;
|
||||
LOG.debug("replacing '{}' in '{}' by '{}'", variable, resolvedPath, value);
|
||||
resolvedPath = resolvedPath.replace(variable, value);
|
||||
start = resolvedPath.indexOf("$", start + 1);
|
||||
} else {
|
||||
start = resolvedPath.indexOf("$", start + 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
LOG.debug("Iteration {} ended: {}",iter,resolvedPath);
|
||||
} while (!last.equals(resolvedPath));
|
||||
LOG.debug("result: {}",resolvedPath);
|
||||
toolbar.dropUnusedAdditionalFields();
|
||||
statusBar.setPath(resolvedPath+"."+extension());
|
||||
mainFrame.pack();
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</logger>
|
||||
|
||||
<logger name="de.srsoftware.belegscanner.Worker" level="debug" additivity="false">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</logger>
|
||||
|
||||
<root level="error">
|
||||
<appender-ref ref="CONSOLE"/>
|
||||
</root>
|
||||
|
||||
@@ -28,6 +28,7 @@ January : Januar
|
||||
Joining PDFs… : Verbinde PDFs…
|
||||
join PDFs : PDFs binden
|
||||
July : Juli
|
||||
June : Juni
|
||||
Language support : Sprach-Unterstützung
|
||||
May : Mai
|
||||
March : März
|
||||
|
||||
Reference in New Issue
Block a user