change config names
[fanfix.git] / src / be / nikiroo / fanfix / bundles / Config.java
1 package be.nikiroo.fanfix.bundles;
2
3 import be.nikiroo.utils.resources.Meta;
4 import be.nikiroo.utils.resources.Meta.Format;
5
6 /**
7 * The configuration options.
8 *
9 * @author niki
10 */
11 @SuppressWarnings("javadoc")
12 public enum Config {
13 @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)",//
14 format = Format.LOCALE)
15 LANG, //
16 @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", //
17 format = Format.FIXED_LIST, list = { "CLI", "GUI", "TUI" }, def = "GUI")
18 READER_TYPE, //
19
20 @Meta(description = "File format options",//
21 group = true)
22 FILE_FORMAT, //
23 @Meta(description = "How to save non-images documents in the library",//
24 format = Format.FIXED_LIST, list = { "INFO_TEXT", "EPUB", "HTML", "TEXT" }, def = "INFO_TEXT")
25 FILE_FORMAT_NON_IMAGES_DOCUMENT_TYPE, //
26 @Meta(description = "How to save images documents in the library",//
27 format = Format.FIXED_LIST, list = { "CBZ", "HTML" }, def = "CBZ")
28 FILE_FORMAT_IMAGES_DOCUMENT_TYPE, //
29 @Meta(description = "How to save cover images",//
30 format = Format.FIXED_LIST, list = { "PNG", "JPG", "BMP" }, def = "PNG")
31 FILE_FORMAT_IMAGE_FORMAT_COVER, //
32 @Meta(description = "How to save content images",//
33 format = Format.FIXED_LIST, list = { "PNG", "JPG", "BMP" }, def = "JPG")
34 FILE_FORMAT_IMAGE_FORMAT_CONTENT, //
35
36 @Meta(description = "Cache management",//
37 group = true)
38 CACHE, //
39 @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",//
40 format = Format.DIRECTORY, def = "tmp/")
41 CACHE_DIR, //
42 @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)", //
43 format = Format.INT, def = "24")
44 CACHE_MAX_TIME_CHANGING, //
45 @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)", //
46 format = Format.INT, def = "720")
47 CACHE_MAX_TIME_STABLE, //
48
49 @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",//
50 format = Format.DIRECTORY, def = "covers/")
51 DEFAULT_COVERS_DIR, //
52 @Meta(description = "The directory where to store the library (can be overriden by the envvironment variable \"BOOKS_DIR\"; 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 = "$HOME/Books/")
54 LIBRARY_DIR, //
55 @Meta(description = "The default library to use (KEY:SERVER:PORT), or empty for the local library",//
56 format = Format.STRING, def = "")
57 DEFAULT_LIBRARY, //
58
59 @Meta(description = "Network configuration",//
60 group = true)
61 NETWORK, //
62 @Meta(description = "The user-agent to use to download files",//
63 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/)")
64 NETWORK_USER_AGENT, //
65 @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",//
66 format = Format.STRING, def = "")
67 NETWORK_PROXY, //
68 @Meta(description = "If the last update check was done at least that many days ago, check for updates at startup (-1 for 'no checks')", //
69 format = Format.INT, def = "1")
70 NETWORK_UPDATE_INTERVAL, //
71
72 @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",//
73 group = true)
74 SERVER, //
75 @Meta(description = "The port on which we can start the server (must be a valid port, from 1 to 65535)", //
76 format = Format.INT, def = "58365")
77 SERVER_PORT, //
78 @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)",//
79 format = Format.PASSWORD, def = "")
80 SERVER_KEY, //
81 @Meta(description = "Allow write access to the clients (download story, move story...) without RW subkeys", //
82 format = Format.BOOLEAN, def = "true")
83 SERVER_RW, //
84 @Meta(description = "If not empty, only the EXACT listed sources will be available for clients without BL subkeys",//
85 array = true, format = Format.STRING, def = "")
86 SERVER_WHITELIST, //
87 @Meta(description = "The subkeys that the server will allow, including the modes\nA subkey ", //
88 array = true, format = Format.STRING, def = "")
89 SERVER_ALLOWED_SUBKEYS, //
90
91 @Meta(description = "DEBUG options",//
92 group = true)
93 DEBUG, //
94 @Meta(description = "Show debug information on errors",//
95 format = Format.BOOLEAN, def = "false")
96 DEBUG_ERR, //
97 @Meta(description = "Show debug trace information",//
98 format = Format.BOOLEAN, def = "false")
99 DEBUG_TRACE, //
100
101 @Meta(description = "Internal configuration\nThose options are internal to the program and should probably not be changed",//
102 group = true)
103 CONF, //
104 @Meta(description = "LaTeX configuration",//
105 group = true)
106 CONF_LATEX_LANG, //
107 @Meta(description = "LaTeX output language (full name) for \"English\"",//
108 format = Format.STRING, def = "english")
109 CONF_LATEX_LANG_EN, //
110 @Meta(description = "LaTeX output language (full name) for \"French\"",//
111 format = Format.STRING, def = "french")
112 CONF_LATEX_LANG_FR, //
113 @Meta(description = "other 'by' prefixes before author name, used to identify the author",//
114 array = true, format = Format.STRING, def = "\"by\",\"par\",\"de\",\"©\",\"(c)\"")
115 CONF_BYS, //
116 @Meta(description = "List of languages codes used for chapter identification (should not be changed)", //
117 array = true, format = Format.STRING, def = "\"EN\",\"FR\"")
118 CONF_CHAPTER, //
119 @Meta(description = "Chapter identification string in English, used to identify a starting chapter in text mode",//
120 format = Format.STRING, def = "Chapter")
121 CONF_CHAPTER_EN, //
122 @Meta(description = "Chapter identification string in French, used to identify a starting chapter in text mode",//
123 format = Format.STRING, def = "Chapitre")
124 CONF_CHAPTER_FR, //
125
126 @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)",//
127 group = true)
128 LOGIN_YIFFSTAR, //
129 @Meta(description = "Your YiffStar/SoFurry login",//
130 format = Format.STRING)
131 LOGIN_YIFFSTAR_USER, //
132 @Meta(description = "Your YiffStar/SoFurry password",//
133 format = Format.PASSWORD)
134 LOGIN_YIFFSTAR_PASS, //
135
136 @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.",//
137 group = true)
138 LOGIN_FIMFICTION_APIKEY, //
139 @Meta(description = "The login of the API key used to create a new token from FimFiction", //
140 format = Format.STRING)
141 LOGIN_FIMFICTION_APIKEY_CLIENT_ID, //
142 @Meta(description = "The password of the API key used to create a new token from FimFiction", //
143 format = Format.PASSWORD)
144 LOGIN_FIMFICTION_APIKEY_CLIENT_SECRET, //
145 @Meta(description = "Do not use the new API, even if we have a token, and force HTML scraping",//
146 format = Format.BOOLEAN, def = "false")
147 LOGIN_FIMFICTION_APIKEY_FORCE_HTML, //
148 @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)", //
149 format = Format.PASSWORD, def = "Bearer WnZ5oHlzQoDocv1GcgHfcoqctHkSwL-D")
150 LOGIN_FIMFICTION_APIKEY_TOKEN, //
151 }