mirror of
https://github.com/mitb-archive/filebot
synced 2025-01-08 12:28:04 -05:00
echo "Please purchase a FileBot License" | cowsay -f stegosaurus
This commit is contained in:
parent
95648bc859
commit
421e549d7a
@ -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;
|
||||
|
18
source/net/filebot/cli/Stegosaurus.format
Normal file
18
source/net/filebot/cli/Stegosaurus.format
Normal file
@ -0,0 +1,18 @@
|
||||
___________________________________________________
|
||||
/ Please purchase a FileBot License: \
|
||||
\ 🛍️ %-46s /
|
||||
---------------------------------------------------
|
||||
\ . .
|
||||
\ / `. .' "
|
||||
\ .---. < > < > .---.
|
||||
\ | \ \ - ~ ~ - / / |
|
||||
_____ ..-~ ~-..-~
|
||||
| | \~~~\.' `./~~~/
|
||||
--------- \__/ \__/
|
||||
.' O \ / / \ "
|
||||
(_____, `._.' | } \/~~~/
|
||||
`----. / } | / \__/
|
||||
`-. | / | / `. ,~~|
|
||||
~-.__| /_ - ~ ^| /- _ `..-'
|
||||
| / | / ~-. `-. _ _ _
|
||||
|_____| |_____| ~ - . _ _ _ _ _>
|
Loading…
Reference in New Issue
Block a user