Commit | Line | Data |
---|---|---|
08fe2e33 NR |
1 | package be.nikiroo.fanfix.bundles; |
2 | ||
3 | import be.nikiroo.utils.resources.Meta; | |
ce788468 | 4 | import be.nikiroo.utils.resources.Meta.Format; |
08fe2e33 NR |
5 | |
6 | /** | |
7 | * The configuration options. | |
8 | * | |
9 | * @author niki | |
10 | */ | |
ce788468 | 11 | @SuppressWarnings("javadoc") |
08fe2e33 | 12 | public enum Config { |
b7cd9db8 NR |
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) | |
08fe2e33 | 15 | LANG, // |
b7cd9db8 NR |
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") | |
3727aae2 | 18 | READER_TYPE, // |
b7cd9db8 NR |
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") | |
e604986c | 21 | NON_IMAGES_DOCUMENT_TYPE, // |
b7cd9db8 NR |
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") | |
e604986c | 24 | IMAGES_DOCUMENT_TYPE, // |
7cd006eb NR |
25 | @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",// |
26 | format = Format.DIRECTORY, def = "tmp/") | |
08fe2e33 | 27 | CACHE_DIR, // |
b7cd9db8 NR |
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") | |
08fe2e33 | 30 | CACHE_MAX_TIME_CHANGING, // |
b7cd9db8 NR |
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") | |
08fe2e33 | 33 | CACHE_MAX_TIME_STABLE, // |
b7cd9db8 NR |
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/)") | |
08fe2e33 | 36 | USER_AGENT, // |
7cd006eb NR |
37 | @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",// |
38 | format = Format.DIRECTORY, def = "covers/") | |
08fe2e33 | 39 | DEFAULT_COVERS_DIR, // |
b7cd9db8 NR |
40 | @Meta(description = "The default library to use (KEY:SERVER:PORT), or empty for the local library",// |
41 | format = Format.STRING, def = "") | |
e023483b | 42 | DEFAULT_LIBRARY, // |
b7cd9db8 NR |
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") | |
fb25273c | 45 | SERVER_PORT, // |
b7cd9db8 NR |
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 = "") | |
fb25273c | 48 | SERVER_KEY, // |
b7cd9db8 NR |
49 | @Meta(description = "Allow write access to the clients (download story, move story...) without RW subkeys", // |
50 | format = Format.BOOLEAN, def = "true") | |
fb25273c | 51 | SERVER_RW, // |
b7cd9db8 NR |
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 = "") | |
fb25273c | 54 | SERVER_WHITELIST, // |
b7cd9db8 NR |
55 | @Meta(description = "The subkeys that the server will allow, including the modes", // |
56 | array = true, format = Format.STRING, def = "") | |
fb25273c | 57 | SERVER_ALLOWED_SUBKEYS, // |
7cd006eb NR |
58 | @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",// |
59 | format = Format.DIRECTORY, def = "$HOME/Books/") | |
08fe2e33 | 60 | LIBRARY_DIR, // |
b7cd9db8 NR |
61 | @Meta(description = "Show debug information on errors",// |
62 | format = Format.BOOLEAN, def = "false") | |
08fe2e33 | 63 | DEBUG_ERR, // |
b7cd9db8 NR |
64 | @Meta(description = "Show debug trace information",// |
65 | format = Format.BOOLEAN, def = "false") | |
a8209dd0 | 66 | DEBUG_TRACE, // |
b7cd9db8 NR |
67 | @Meta(description = "Image format to use for cover images",// |
68 | format = Format.FIXED_LIST, list = { "PNG", "JPG", "BMP" }, def = "PNG") | |
08fe2e33 | 69 | IMAGE_FORMAT_COVER, // |
b7cd9db8 NR |
70 | @Meta(description = "Image format to use for content images",// |
71 | format = Format.FIXED_LIST, list = { "PNG", "JPG", "BMP" }, def = "jpg") | |
08fe2e33 | 72 | IMAGE_FORMAT_CONTENT, // |
ce788468 | 73 | @Meta(group = true) |
08fe2e33 | 74 | LATEX_LANG, // |
b7cd9db8 NR |
75 | @Meta(description = "LaTeX output language (full name) for \"English\"",// |
76 | format = Format.STRING, def = "english") | |
08fe2e33 | 77 | LATEX_LANG_EN, // |
b7cd9db8 NR |
78 | @Meta(description = "LaTeX output language (full name) for \"French\"",// |
79 | format = Format.STRING, def = "french") | |
08fe2e33 | 80 | LATEX_LANG_FR, // |
b7cd9db8 NR |
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)\"") | |
08fe2e33 | 83 | BYS, // |
b7cd9db8 NR |
84 | @Meta(description = "List of languages codes used for chapter identification (should not be changed)", // |
85 | array = true, format = Format.STRING, def = "\"EN\",\"FR\"") | |
08fe2e33 | 86 | CHAPTER, // |
b7cd9db8 NR |
87 | @Meta(description = "Chapter identification string in English, used to identify a starting chapter in text mode",// |
88 | format = Format.STRING, def = "Chapter") | |
08fe2e33 | 89 | CHAPTER_EN, // |
b7cd9db8 NR |
90 | @Meta(description = "Chapter identification string in French, used to identify a starting chapter in text mode",// |
91 | format = Format.STRING, def = "Chapitre") | |
08fe2e33 | 92 | CHAPTER_FR, // |
b7cd9db8 NR |
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) | |
6e06d2cc | 95 | LOGIN_YIFFSTAR_USER, // |
b7cd9db8 NR |
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) | |
6e06d2cc | 98 | LOGIN_YIFFSTAR_PASS, // |
b7cd9db8 NR |
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") | |
315f14ae | 101 | UPDATE_INTERVAL, // |
b7cd9db8 NR |
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 = "") | |
f59eafef | 104 | USE_PROXY, // |
b7cd9db8 NR |
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) | |
f59eafef | 107 | LOGIN_FIMFICTION_APIKEY, // |
b7cd9db8 NR |
108 | @Meta(description = "The login of the API key used to create a new token from FimFiction", // |
109 | format = Format.STRING) | |
315f14ae | 110 | LOGIN_FIMFICTION_APIKEY_CLIENT_ID, // |
b7cd9db8 NR |
111 | @Meta(description = "The password of the API key used to create a new token from FimFiction", // |
112 | format = Format.PASSWORD) | |
315f14ae | 113 | LOGIN_FIMFICTION_APIKEY_CLIENT_SECRET, // |
b7cd9db8 NR |
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") | |
315f14ae | 116 | LOGIN_FIMFICTION_APIKEY_FORCE_HTML, // |
b7cd9db8 NR |
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") | |
315f14ae | 119 | LOGIN_FIMFICTION_APIKEY_TOKEN, // |
08fe2e33 | 120 | } |