X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Fbundles%2FConfig.java;h=ae60b75b3b74eb6bb35f13e4d179bfb81fabd32a;hb=315f14ae3752d90c683a07fa20f1aa53f6010d6d;hp=86f480d421db9b1345ca9fe4e3a7b21f2c2571d6;hpb=a6395bef99a8e917f67341ef1906917b87df24a4;p=fanfix.git diff --git a/src/be/nikiroo/fanfix/bundles/Config.java b/src/be/nikiroo/fanfix/bundles/Config.java index 86f480d..ae60b75 100644 --- a/src/be/nikiroo/fanfix/bundles/Config.java +++ b/src/be/nikiroo/fanfix/bundles/Config.java @@ -1,54 +1,66 @@ package be.nikiroo.fanfix.bundles; import be.nikiroo.utils.resources.Meta; +import be.nikiroo.utils.resources.Meta.Format; /** * The configuration options. * * @author niki */ +@SuppressWarnings("javadoc") public enum Config { - @Meta(what = "language", where = "", format = "language (example: en-GB) or nothing for default system language", info = "Force the language (can be overwritten again with the env variable $LANG)") + @Meta(description = "language (example: en-GB, fr-BE...) or nothing for default system language", format = Format.LOCALE, info = "Force the language (can be overwritten again with the env variable $LANG)") LANG, // - @Meta(what = "reader type", where = "", format = "CLI or LOCAL", info = "Select the reader to use to read stories (CLI = simple output to console, LOCAL = use local system file handler)") + @Meta(description = "reader type (CLI = simple output to console, TUI = Text User Interface with menus and windows, GUI = a GUI with locally stored files)", format = Format.FIXED_LIST, list = { + "CLI", "GUI", "TUI" }, info = "Select the default reader to use to read stories") READER_TYPE, // - @Meta(what = "directory", where = "", format = "absolute path, $HOME variable supported, / is always accepted as dir separator", info = "The directory where to store temporary files, defaults to a directory 'fanfic-tmp' in the system default temporary directory") + @Meta(description = "absolute path, $HOME variable supported, / is always accepted as dir separator", format = Format.DIRECTORY, info = "The directory where to store temporary files, defaults to directory 'tmp' in the conig directory (usually $HOME/.fanfix)") CACHE_DIR, // - @Meta(what = "directory", where = "", format = "absolute path, $HOME variable supported, / is always accepted as dir separator", info = "The directory where to store temporary files, defaults to a directory 'fanfic-reader' in the system default temporary directory") - CACHE_DIR_LOCAL_READER, // - @Meta(what = "delay in hours", where = "", format = "integer | 0: no cache | -1: infinite time cache which is default", info = "The delay after which a cached resource that is thought to change ~often is considered too old and triggers a refresh") + @Meta(description = "delay in hours, or 0 for no cache, or -1 for infinite time (default)", format = Format.INT, info = "The delay after which a cached resource that is thought to change ~often is considered too old and triggers a refresh") CACHE_MAX_TIME_CHANGING, // - @Meta(what = "delay in hours", where = "", format = "integer | 0: no cache | -1: infinite time cache which is default", info = "The delay after which a cached resource that is thought to change rarely is considered too old and triggers a refresh") + @Meta(description = "delay in hours, or 0 for no cache, or -1 for infinite time (default)", format = Format.INT, info = "The delay after which a cached resource that is thought to change rarely is considered too old and triggers a refresh") CACHE_MAX_TIME_STABLE, // - @Meta(what = "string", where = "", format = "", info = "The user-agent to use to download files") + @Meta(description = "string", info = "The user-agent to use to download files") USER_AGENT, // - @Meta(what = "directory", where = "", format = "absolute path, $HOME variable supported, / is always accepted as dir separator", info = "The directory where to get the default story covers") + @Meta(description = "absolute path, $HOME variable supported, / is always accepted as dir separator", format = Format.DIRECTORY, info = "The directory where to get the default story covers") DEFAULT_COVERS_DIR, // - @Meta(what = "directory", where = "", format = "absolute path, $HOME variable supported, / is always accepted as dir separator", info = "The directory where to store the library") + @Meta(description = "absolute path, $HOME variable supported, / is always accepted as dir separator", format = Format.DIRECTORY, info = "The directory where to store the library") LIBRARY_DIR, // - @Meta(what = "boolean", where = "", format = "'true' or 'false'", info = "Show debug information on errors") + @Meta(description = "boolean", format = Format.BOOLEAN, info = "Show debug information on errors") DEBUG_ERR, // - @Meta(what = "image format", where = "", format = "PNG, JPG, BMP...", info = "Image format to use for cover images") + @Meta(description = "image format", format = Format.COMBO_LIST, list = { + "PNG", "JPG", "BMP" }, info = "Image format to use for cover images") IMAGE_FORMAT_COVER, // - @Meta(what = "image format", where = "", format = "PNG, JPG, BMP...", info = "Image format to use for content images") + @Meta(description = "image format", format = Format.COMBO_LIST, list = { + "PNG", "JPG", "BMP" }, info = "Image format to use for content images") IMAGE_FORMAT_CONTENT, // - @Meta(what = "", where = "", format = "not used", info = "This key is only present to allow access to suffixes") + @Meta(group = true) LATEX_LANG, // - @Meta(what = "LaTeX output language", where = "LaTeX", format = "", info = "LaTeX full name for English") + @Meta(description = "LaTeX output language: English", info = "LaTeX full name") LATEX_LANG_EN, // - @Meta(what = "LaTeX output language", where = "LaTeX", format = "", info = "LaTeX full name for French") + @Meta(description = "LaTeX output language: French", info = "LaTeX full name") LATEX_LANG_FR, // - @Meta(what = "other 'by' prefixes before author name", where = "", format = "comma-separated list", info = "used to identify the author") + @Meta(description = "other 'by' prefixes before author name, used to identify the author", array = true) BYS, // - @Meta(what = "Chapter identification languages", where = "", format = "comma-separated list", info = "used to identify a starting chapter in text mode") + @Meta(description = "List of languages codes used for chapter identification (should not be changed)", array = true, info = "EN,FR") CHAPTER, // - @Meta(what = "Chapter identification string", where = "", format = "", info = "used to identify a starting chapter in text mode") + @Meta(description = "Chapter identification String: English", info = "used to identify a starting chapter in text mode") CHAPTER_EN, // - @Meta(what = "Chapter identification string", where = "", format = "", info = "used to identify a starting chapter in text mode") + @Meta(description = "Chapter identification String: French", info = "used to identify a starting chapter in text mode") CHAPTER_FR, // - @Meta(what = "Output type", where = "Local Reader", format = "One of the known output type", info = "The type of output for the Local Reader for non-images documents") - LOCAL_READER_NON_IMAGES_DOCUMENT_TYPE, // - @Meta(what = "Output type", where = "Local Reader", format = "One of the known output type", info = "The type of output for the Local Reader for images documents") - LOCAL_READER_IMAGES_DOCUMENT_TYPE, // - + @Meta(description = "Login information (username) for YiffStar to have access to all the stories (should not be necessary anymore)") + LOGIN_YIFFSTAR_USER, // + @Meta(description = "Login information (password) for YiffStar to have access to all the stories (should not be necessary anymore)", format = Format.PASSWORD) + LOGIN_YIFFSTAR_PASS, // + @Meta(description = "If the last update check was done at least that many days, check for updates at startup (-1 for 'no checks' -- default is 1 day)", format = Format.INT) + UPDATE_INTERVAL, // + @Meta(description = "An API key required to create a token from FimFiction", format = Format.STRING) + LOGIN_FIMFICTION_APIKEY_CLIENT_ID, // + @Meta(description = "An API key required to create a token from FimFiction", format = Format.PASSWORD) + LOGIN_FIMFICTION_APIKEY_CLIENT_SECRET, // + @Meta(description = "Do not use the new API, even if we have a token, and force HTML scraping", format = Format.BOOLEAN) + LOGIN_FIMFICTION_APIKEY_FORCE_HTML, // + @Meta(description = "A token is required to use the beta APIv2 from FimFiction (see APIKEY_CLIENT_*)", format = Format.PASSWORD) + LOGIN_FIMFICTION_APIKEY_TOKEN, // }