hide some config options
[nikiroo-utils.git] / bundles / Config.java
CommitLineData
08fe2e33
NR
1package be.nikiroo.fanfix.bundles;
2
3import be.nikiroo.utils.resources.Meta;
ce788468 4import be.nikiroo.utils.resources.Meta.Format;
08fe2e33
NR
5
6/**
7 * The configuration options.
8 *
9 * @author niki
10 */
ce788468 11@SuppressWarnings("javadoc")
08fe2e33 12public enum Config {
5788cc5b
NR
13
14 // Note: all hidden values are subject to be removed in a later version
15
13fdb89a 16 @Meta(description = "The language to use for in the program (example: en-GB, fr-BE...) or nothing for default system language (can be overwritten with the variable $LANG)",//
459b4c28 17 format = Format.LOCALE, list = { "en-GB", "fr-BE" })
08fe2e33 18 LANG, //
b7cd9db8 19 @Meta(description = "The default reader type to use to read stories:\nCLI = simple output to console\nTUI = a Text User Interface with menus and windows, based upon Jexer\nGUI = a GUI with locally stored files, based upon Swing", //
5788cc5b 20 hidden = true, format = Format.FIXED_LIST, list = { "CLI", "GUI", "TUI" }, def = "GUI")
3727aae2 21 READER_TYPE, //
13fdb89a
NR
22
23 @Meta(description = "File format options",//
24 group = true)
25 FILE_FORMAT, //
26 @Meta(description = "How to save non-images documents in the library",//
b7cd9db8 27 format = Format.FIXED_LIST, list = { "INFO_TEXT", "EPUB", "HTML", "TEXT" }, def = "INFO_TEXT")
13fdb89a
NR
28 FILE_FORMAT_NON_IMAGES_DOCUMENT_TYPE, //
29 @Meta(description = "How to save images documents in the library",//
b7cd9db8 30 format = Format.FIXED_LIST, list = { "CBZ", "HTML" }, def = "CBZ")
13fdb89a
NR
31 FILE_FORMAT_IMAGES_DOCUMENT_TYPE, //
32 @Meta(description = "How to save cover images",//
33 format = Format.FIXED_LIST, list = { "PNG", "JPG", "BMP" }, def = "PNG")
34 FILE_FORMAT_IMAGE_FORMAT_COVER, //
35 @Meta(description = "How to save content images",//
36 format = Format.FIXED_LIST, list = { "PNG", "JPG", "BMP" }, def = "JPG")
37 FILE_FORMAT_IMAGE_FORMAT_CONTENT, //
38
39 @Meta(description = "Cache management",//
40 group = true)
41 CACHE, //
7cd006eb
NR
42 @Meta(description = "The directory where to store temporary files; any relative path uses the applciation config directory as base, $HOME notation is supported, / is always accepted as directory separator",//
43 format = Format.DIRECTORY, def = "tmp/")
08fe2e33 44 CACHE_DIR, //
b7cd9db8
NR
45 @Meta(description = "The delay in hours after which a cached resource that is thought to change ~often is considered too old and triggers a refresh delay (or 0 for no cache, or -1 for infinite time)", //
46 format = Format.INT, def = "24")
08fe2e33 47 CACHE_MAX_TIME_CHANGING, //
b7cd9db8
NR
48 @Meta(description = "The delay in hours after which a cached resource that is thought to change rarely is considered too old and triggers a refresh delay (or 0 for no cache, or -1 for infinite time)", //
49 format = Format.INT, def = "720")
08fe2e33 50 CACHE_MAX_TIME_STABLE, //
13fdb89a 51
7cd006eb
NR
52 @Meta(description = "The directory where to get the default story covers; any relative path uses the applciation config directory as base, $HOME notation is supported, / is always accepted as directory separator",//
53 format = Format.DIRECTORY, def = "covers/")
08fe2e33 54 DEFAULT_COVERS_DIR, //
5788cc5b 55 @Meta(description = "The directory where to store the library (can be overriden by the environment variable \"BOOKS_DIR\"; any relative path uses the applciation config directory as base, $HOME notation is supported, / is always accepted as directory separator",//
13fdb89a
NR
56 format = Format.DIRECTORY, def = "$HOME/Books/")
57 LIBRARY_DIR, //
459b4c28
NR
58
59 @Meta(description = "Remote library\nA remote library can be configured to fetch the stories from a remote Fanfix server",//
60 group = true)
61 REMOTE_LIBRARY, //
62 @Meta(description = "Use the remote Fanfix server configured here instead of the local library (if FALSE, the local library will be used instead)",//
63 format = Format.BOOLEAN, def = "false")
64 REMOTE_LIBRARY_ENABLED, //
65 @Meta(description = "The remote Fanfix server to connect to",//
66 format = Format.STRING)
67 REMOTE_LIBRARY_HOST, //
68 @Meta(description = "The port to use for the remote Fanfix server",//
69 format = Format.INT, def = "58365")
70 REMOTE_LIBRARY_PORT, //
71 @Meta(description = "The key is structured: \"KEY|SUBKEY|wl|rw\"\n- \"KEY\" is the actual encryption key (it can actually be empty, which will still encrypt the messages but of course it will be easier to guess the key)\n- \"SUBKEY\" is the (optional) subkey to use to get additional privileges\n- \"wl\" is a special privilege that allows that subkey to ignore white lists\n- \"rw\" is a special privilege that allows that subkey to modify the library, even if it is not in RW (by default) mode\n\nSome examples:\n- \"super-secret\": a normal key, no special privileges\n- \"you-will-not-guess|azOpd8|wl\": a white-list ignoring key\n- \"new-password|subpass|rw\": a key that allows modifications on the library",//
72 format = Format.PASSWORD)
73 REMOTE_LIBRARY_KEY, //
13fdb89a
NR
74
75 @Meta(description = "Network configuration",//
76 group = true)
77 NETWORK, //
78 @Meta(description = "The user-agent to use to download files",//
79 def = "Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0 -- ELinks/0.9.3 (Linux 2.6.11 i686; 80x24) -- Fanfix (https://github.com/nikiroo/fanfix/)")
80 NETWORK_USER_AGENT, //
81 @Meta(description = "The proxy server to use under the format 'user:pass@proxy:port', 'user@proxy:port', 'proxy:port' or ':' alone (system proxy); an empty String means no proxy",//
82 format = Format.STRING, def = "")
83 NETWORK_PROXY, //
84 @Meta(description = "If the last update check was done at least that many days ago, check for updates at startup (-1 for 'no checks')", //
85 format = Format.INT, def = "1")
86 NETWORK_UPDATE_INTERVAL, //
87
88 @Meta(description = "Remote Server configuration\nNote that the key is structured: \"KEY|SUBKEY|wl|rw\"\n- \"KEY\" is the actual encryption key (it can actually be empty, which will still encrypt the messages but of course it will be easier to guess the key)\n- \"SUBKEY\" is the (optional) subkey to use to get additional privileges\n- \"wl\" is a special privilege that allows that subkey to ignore white lists\n- \"rw\" is a special privilege that allows that subkey to modify the library, even if it is not in RW (by default) mode\n\nSome examples:\n- \"super-secret\": a normal key, no special privileges\n- \"you-will-not-guess|azOpd8|wl\": a white-list ignoring key\n- \"new-password|subpass|rw\": a key that allows modifications on the library",//
89 group = true)
90 SERVER, //
b7cd9db8
NR
91 @Meta(description = "The port on which we can start the server (must be a valid port, from 1 to 65535)", //
92 format = Format.INT, def = "58365")
fb25273c 93 SERVER_PORT, //
b7cd9db8
NR
94 @Meta(description = "The encryption key for the server (NOT including a subkey), it cannot contain the pipe character \"|\" but can be empty (it is *still* encrypted, but with an empty, easy to guess key)",//
95 format = Format.PASSWORD, def = "")
fb25273c 96 SERVER_KEY, //
b7cd9db8
NR
97 @Meta(description = "Allow write access to the clients (download story, move story...) without RW subkeys", //
98 format = Format.BOOLEAN, def = "true")
fb25273c 99 SERVER_RW, //
b7cd9db8
NR
100 @Meta(description = "If not empty, only the EXACT listed sources will be available for clients without BL subkeys",//
101 array = true, format = Format.STRING, def = "")
fb25273c 102 SERVER_WHITELIST, //
13fdb89a 103 @Meta(description = "The subkeys that the server will allow, including the modes\nA subkey ", //
b7cd9db8 104 array = true, format = Format.STRING, def = "")
fb25273c 105 SERVER_ALLOWED_SUBKEYS, //
13fdb89a
NR
106
107 @Meta(description = "DEBUG options",//
108 group = true)
109 DEBUG, //
b7cd9db8
NR
110 @Meta(description = "Show debug information on errors",//
111 format = Format.BOOLEAN, def = "false")
08fe2e33 112 DEBUG_ERR, //
b7cd9db8
NR
113 @Meta(description = "Show debug trace information",//
114 format = Format.BOOLEAN, def = "false")
a8209dd0 115 DEBUG_TRACE, //
13fdb89a
NR
116
117 @Meta(description = "Internal configuration\nThose options are internal to the program and should probably not be changed",//
5788cc5b 118 hidden = true, group = true)
13fdb89a
NR
119 CONF, //
120 @Meta(description = "LaTeX configuration",//
5788cc5b 121 hidden = true, group = true)
13fdb89a 122 CONF_LATEX_LANG, //
b7cd9db8 123 @Meta(description = "LaTeX output language (full name) for \"English\"",//
5788cc5b 124 hidden = true, format = Format.STRING, def = "english")
13fdb89a 125 CONF_LATEX_LANG_EN, //
b7cd9db8 126 @Meta(description = "LaTeX output language (full name) for \"French\"",//
5788cc5b 127 hidden = true, format = Format.STRING, def = "french")
13fdb89a 128 CONF_LATEX_LANG_FR, //
b7cd9db8 129 @Meta(description = "other 'by' prefixes before author name, used to identify the author",//
5788cc5b 130 hidden = true, array = true, format = Format.STRING, def = "\"by\",\"par\",\"de\",\"©\",\"(c)\"")
13fdb89a 131 CONF_BYS, //
b7cd9db8 132 @Meta(description = "List of languages codes used for chapter identification (should not be changed)", //
5788cc5b 133 hidden = true, array = true, format = Format.STRING, def = "\"EN\",\"FR\"")
13fdb89a 134 CONF_CHAPTER, //
b7cd9db8 135 @Meta(description = "Chapter identification string in English, used to identify a starting chapter in text mode",//
5788cc5b 136 hidden = true, format = Format.STRING, def = "Chapter")
13fdb89a 137 CONF_CHAPTER_EN, //
b7cd9db8 138 @Meta(description = "Chapter identification string in French, used to identify a starting chapter in text mode",//
5788cc5b 139 hidden = true, format = Format.STRING, def = "Chapitre")
13fdb89a
NR
140 CONF_CHAPTER_FR, //
141
142 @Meta(description = "YiffStar/SoFurry credentials\nYou can give your YiffStar credentials here to have access to all the stories, though it should not be necessary anymore (some stories used to beblocked for anonymous viewers)",//
143 group = true)
144 LOGIN_YIFFSTAR, //
145 @Meta(description = "Your YiffStar/SoFurry login",//
b7cd9db8 146 format = Format.STRING)
6e06d2cc 147 LOGIN_YIFFSTAR_USER, //
13fdb89a 148 @Meta(description = "Your YiffStar/SoFurry password",//
b7cd9db8 149 format = Format.PASSWORD)
6e06d2cc 150 LOGIN_YIFFSTAR_PASS, //
13fdb89a 151
b7cd9db8
NR
152 @Meta(description = "FimFiction APIKEY credentials\nFimFiction can be queried via an API, but requires an API key to do that. One has been created for this program, but if you have another API key you can set it here. You can also set a login and password instead, in that case, a new API key will be generated (and stored) if you still haven't set one.",//
153 group = true)
f59eafef 154 LOGIN_FIMFICTION_APIKEY, //
b7cd9db8
NR
155 @Meta(description = "The login of the API key used to create a new token from FimFiction", //
156 format = Format.STRING)
315f14ae 157 LOGIN_FIMFICTION_APIKEY_CLIENT_ID, //
b7cd9db8
NR
158 @Meta(description = "The password of the API key used to create a new token from FimFiction", //
159 format = Format.PASSWORD)
315f14ae 160 LOGIN_FIMFICTION_APIKEY_CLIENT_SECRET, //
b7cd9db8
NR
161 @Meta(description = "Do not use the new API, even if we have a token, and force HTML scraping",//
162 format = Format.BOOLEAN, def = "false")
315f14ae 163 LOGIN_FIMFICTION_APIKEY_FORCE_HTML, //
b7cd9db8
NR
164 @Meta(description = "The token required to use the beta APIv2 from FimFiction (see APIKEY_CLIENT_* if you want to generate a new one from your own API key)", //
165 format = Format.PASSWORD, def = "Bearer WnZ5oHlzQoDocv1GcgHfcoqctHkSwL-D")
315f14ae 166 LOGIN_FIMFICTION_APIKEY_TOKEN, //
08fe2e33 167}