summaryrefslogtreecommitdiff
path: root/src/main/java/cc/andreasbaumann/grabbers/nzz/Main.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/cc/andreasbaumann/grabbers/nzz/Main.java')
-rw-r--r--src/main/java/cc/andreasbaumann/grabbers/nzz/Main.java10
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;