diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2022-10-19 17:07:03 +0200 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2022-10-19 17:07:03 +0200 |
commit | fe22bbe05e3835c133b9c7920863495b4cf4b548 (patch) | |
tree | 6098c35e2df1b0762c67067c2b5bdd38a135feb4 | |
parent | 1fe88f56190adb26b65d28c48525161534d40cb7 (diff) | |
download | nzzgatherer-fe22bbe05e3835c133b9c7920863495b4cf4b548.tar.gz nzzgatherer-fe22bbe05e3835c133b9c7920863495b4cf4b548.tar.bz2 |
removed some redundancy in constants
-rw-r--r-- | src/main/java/cc/andreasbaumann/grabbers/nzz/Main.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/cc/andreasbaumann/grabbers/nzz/Main.java b/src/main/java/cc/andreasbaumann/grabbers/nzz/Main.java index 28c1f00..6c637ed 100644 --- a/src/main/java/cc/andreasbaumann/grabbers/nzz/Main.java +++ b/src/main/java/cc/andreasbaumann/grabbers/nzz/Main.java @@ -37,11 +37,13 @@ import java.text.SimpleDateFormat; public class Main { private static final Logger LOGGER = LogManager.getFormatterLogger( Main.class ); - public static final String USER_AGENT = "NZZ-Grabber/1.0"; + private static final String VERSION = "1.0"; + public static final String USER_AGENT = "NZZ-Grabber/" + VERSION; public static final Locale DEFAULT_LOCALE = new Locale( "de", "CH" ); public static final int DEFAULT_TIMEOUT = 60000; + public static final String DEFAULT_CONFGURATION = "config.json"; - @Command( name = "nzzgatherer", mixinStandardHelpOptions = true, version = "1.0", + @Command( name = "nzzgatherer", mixinStandardHelpOptions = true, version = VERSION, description = "Grabs NZZ ePaper PDFs and stores them locally.") static class NZZGatherer implements Callable<Integer> { @@ -149,8 +151,8 @@ public class Main } } - @Option( names = { "-c", "--config" }, description = "file (in JSON)", defaultValue = "config.json" ) - private String configFile = "config.json"; + @Option( names = { "-c", "--config" }, description = "file (in JSON)", defaultValue = DEFAULT_CONFGURATION ) + private String configFile = DEFAULT_CONFGURATION; @Option( names = { "--download-current" }, description = "download only todays PDF" ) private boolean downloadCurrent = false; |