change config bundle to better work with new nikiroo-utils
[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 (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 @Meta(description = "The type of output for the Local Reader for non-images documents",//
20 format = Format.FIXED_LIST, list = { "INFO_TEXT", "EPUB", "HTML", "TEXT" }, def = "INFO_TEXT")
21 NON_IMAGES_DOCUMENT_TYPE, //
22 @Meta(description = "The type of output for the Local Reader for non-images documents",//
23 format = Format.FIXED_LIST, list = { "CBZ", "HTML" }, def = "CBZ")
24 IMAGES_DOCUMENT_TYPE, //
25 @Meta(description = "The directory where to store temporary files (defaults to directory 'tmp' in the conig directory, usually $HOME/.fanfix/tmp); it must be an absolute path, $HOME notation is supported, / is always accepted as directory separator",//
26 format = Format.DIRECTORY)
27 CACHE_DIR, //
28 @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)", //
29 format = Format.INT, def = "24")
30 CACHE_MAX_TIME_CHANGING, //
31 @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)", //
32 format = Format.INT, def = "720")
33 CACHE_MAX_TIME_STABLE, //
34 @Meta(description = "The user-agent to use to download files",//
35 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/)")
36 USER_AGENT, //
37 @Meta(description = "The directory where to get the default story covers; it must be an absolute path, $HOME notation is supported, / is always accepted as directory separator",//
38 format = Format.DIRECTORY, def = "$HOME/.fanfix/covers/")
39 DEFAULT_COVERS_DIR, //
40 @Meta(description = "The default library to use (KEY:SERVER:PORT), or empty for the local library",//
41 format = Format.STRING, def = "")
42 DEFAULT_LIBRARY, //
43 @Meta(description = "The port on which we can start the server (must be a valid port, from 1 to 65535)", //
44 format = Format.INT, def = "58365")
45 SERVER_PORT, //
46 @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)",//
47 format = Format.PASSWORD, def = "")
48 SERVER_KEY, //
49 @Meta(description = "Allow write access to the clients (download story, move story...) without RW subkeys", //
50 format = Format.BOOLEAN, def = "true")
51 SERVER_RW, //
52 @Meta(description = "If not empty, only the EXACT listed sources will be available for clients without BL subkeys",//
53 array = true, format = Format.STRING, def = "")
54 SERVER_WHITELIST, //
55 @Meta(description = "The subkeys that the server will allow, including the modes", //
56 array = true, format = Format.STRING, def = "")
57 SERVER_ALLOWED_SUBKEYS, //
58 @Meta(description = "The directory where to store the library; it must be an absolute path, $HOME notation is supported, / is always accepted as directory separator",//
59 format = Format.DIRECTORY, def = "$HOME/Books")
60 LIBRARY_DIR, //
61 @Meta(description = "Show debug information on errors",//
62 format = Format.BOOLEAN, def = "false")
63 DEBUG_ERR, //
64 @Meta(description = "Show debug trace information",//
65 format = Format.BOOLEAN, def = "false")
66 DEBUG_TRACE, //
67 @Meta(description = "Image format to use for cover images",//
68 format = Format.FIXED_LIST, list = { "PNG", "JPG", "BMP" }, def = "PNG")
69 IMAGE_FORMAT_COVER, //
70 @Meta(description = "Image format to use for content images",//
71 format = Format.FIXED_LIST, list = { "PNG", "JPG", "BMP" }, def = "jpg")
72 IMAGE_FORMAT_CONTENT, //
73 @Meta(group = true)
74 LATEX_LANG, //
75 @Meta(description = "LaTeX output language (full name) for \"English\"",//
76 format = Format.STRING, def = "english")
77 LATEX_LANG_EN, //
78 @Meta(description = "LaTeX output language (full name) for \"French\"",//
79 format = Format.STRING, def = "french")
80 LATEX_LANG_FR, //
81 @Meta(description = "other 'by' prefixes before author name, used to identify the author",//
82 array = true, format = Format.STRING, def = "\"by\",\"par\",\"de\",\"©\",\"(c)\"")
83 BYS, //
84 @Meta(description = "List of languages codes used for chapter identification (should not be changed)", //
85 array = true, format = Format.STRING, def = "\"EN\",\"FR\"")
86 CHAPTER, //
87 @Meta(description = "Chapter identification string in English, used to identify a starting chapter in text mode",//
88 format = Format.STRING, def = "Chapter")
89 CHAPTER_EN, //
90 @Meta(description = "Chapter identification string in French, used to identify a starting chapter in text mode",//
91 format = Format.STRING, def = "Chapitre")
92 CHAPTER_FR, //
93 @Meta(description = "Login for YiffStar to have access to all the stories (should not be necessary anymore, but can still be used)",//
94 format = Format.STRING)
95 LOGIN_YIFFSTAR_USER, //
96 @Meta(description = "Password for YiffStar to have access to all the stories (should not be necessary anymore, but can still be used)",//
97 format = Format.PASSWORD)
98 LOGIN_YIFFSTAR_PASS, //
99 @Meta(description = "If the last update check was done at least that many days ago, check for updates at startup (-1 for 'no checks')", //
100 format = Format.INT, def = "1")
101 UPDATE_INTERVAL, //
102 @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",//
103 format = Format.STRING, def = "")
104 USE_PROXY, //
105 @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.",//
106 group = true)
107 LOGIN_FIMFICTION_APIKEY, //
108 @Meta(description = "The login of the API key used to create a new token from FimFiction", //
109 format = Format.STRING)
110 LOGIN_FIMFICTION_APIKEY_CLIENT_ID, //
111 @Meta(description = "The password of the API key used to create a new token from FimFiction", //
112 format = Format.PASSWORD)
113 LOGIN_FIMFICTION_APIKEY_CLIENT_SECRET, //
114 @Meta(description = "Do not use the new API, even if we have a token, and force HTML scraping",//
115 format = Format.BOOLEAN, def = "false")
116 LOGIN_FIMFICTION_APIKEY_FORCE_HTML, //
117 @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)", //
118 format = Format.PASSWORD, def = "Bearer WnZ5oHlzQoDocv1GcgHfcoqctHkSwL-D")
119 LOGIN_FIMFICTION_APIKEY_TOKEN, //
120 }