echo "Please purchase a FileBot License" | cowsay -f stegosaurus

This commit is contained in:
Reinhard Pointner 2018-06-23 14:49:02 +07:00
parent 95648bc859
commit 421e549d7a
2 changed files with 23 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package net.filebot.cli;
import static java.nio.charset.StandardCharsets.*;
import static net.filebot.Logging.*;
import static net.filebot.MediaTypes.*;
import static net.filebot.Settings.*;
@ -15,11 +16,13 @@ import java.util.stream.Stream;
import javax.script.Bindings;
import javax.script.SimpleBindings;
import org.apache.commons.io.IOUtils;
import net.filebot.LicenseError;
public class ArgumentProcessor {
public int run(ArgumentBean args) {
public int run(ArgumentBean args) throws Exception {
try {
// interactive mode enables basic selection and confirmation dialogs in the CLI
CmdlineInterface cli = args.isInteractive() ? new CmdlineOperationsTextUI() : new CmdlineOperations();
@ -38,6 +41,7 @@ public class ArgumentProcessor {
} catch (LicenseError e) {
log.severe("License Error: " + e.getMessage());
if (LICENSE.isFile()) {
log.info(format(IOUtils.toString(getClass().getResource("Stegosaurus.format"), UTF_8), getPurchaseURL()));
log.severe("FileBot requires a valid license. Please run `filebot --license *.psm` to install your FileBot license.");
}
return 2;

View File

@ -0,0 +1,18 @@
___________________________________________________
/ Please purchase a FileBot License: \
\ 🛍️ %-46s /
---------------------------------------------------
\ . .
\ / `. .' "
\ .---. < > < > .---.
\ | \ \ - ~ ~ - / / |
_____ ..-~ ~-..-~
| | \~~~\.' `./~~~/
--------- \__/ \__/
.' O \ / / \ "
(_____, `._.' | } \/~~~/
`----. / } | / \__/
`-. | / | / `. ,~~|
~-.__| /_ - ~ ^| /- _ `..-'
| / | / ~-. `-. _ _ _
|_____| |_____| ~ - . _ _ _ _ _>