Fix layout issues

This commit is contained in:
Reinhard Pointner 2018-06-25 12:26:25 +07:00
parent d8faf12d90
commit c5f512d34b
2 changed files with 7 additions and 11 deletions

View File

@ -19,7 +19,6 @@ import javax.script.SimpleBindings;
import org.apache.commons.io.IOUtils;
import net.filebot.LicenseError;
import net.filebot.Logging.EscapeCode;
public class ArgumentProcessor {
@ -42,7 +41,7 @@ public class ArgumentProcessor {
} catch (LicenseError e) {
log.severe("License Error: " + e.getMessage());
if (LICENSE.isFile()) {
printStegosaurus();
printStegosaurus("Please purchase a FileBot License:", getPurchaseURL());
log.severe("FileBot requires a valid license. Please run `filebot --license *.psm` to install your FileBot license.");
}
return 2;
@ -131,12 +130,9 @@ public class ArgumentProcessor {
}).sum() == 0 ? 1 : 0;
}
private void printStegosaurus() {
private void printStegosaurus(String line1, String line2) {
try {
String format = IOUtils.toString(getClass().getResource("Stegosaurus.format"), UTF_8);
EscapeCode style = EscapeCode.isSupported() ? EscapeCode.UNDERLINE : EscapeCode.NONE;
String url = getPurchaseURL();
log.info(format(format, style.apply(url)));
log.info(format(IOUtils.toString(getClass().getResource("Stegosaurus.format"), UTF_8), line1, line2));
} catch (Exception e) {
debug.log(Level.WARNING, e::toString);
}

View File

@ -1,7 +1,7 @@
___________________________________________________
/ Please purchase a FileBot License: \
\ 🛍️ %-46s /
---------------------------------------------------
________________________________________________
/ %-46s \
\ %-46s /
------------------------------------------------
\ . .
\ / `. .' "
\ .---. < > < > .---.