Merge branch 'subtree'
[fanfix.git] / src / be / nikiroo / fanfix / bundles / Config.java
index e62a524663970f699a203f4bd681aab718ec93b1..3af83c1d0ff995ecff9140723fd749f8c51449d4 100644 (file)
@@ -10,13 +10,12 @@ import be.nikiroo.utils.resources.Meta.Format;
  */
 @SuppressWarnings("javadoc")
 public enum Config {
+       
+       // Note: all hidden values are subject to be removed in a later version
+       
        @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)",//
-       format = Format.LOCALE)
+       format = Format.LOCALE, list = { "en-GB", "fr-BE" })
        LANG, //
-       @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", //
-       format = Format.FIXED_LIST, list = { "CLI", "GUI", "TUI" }, def = "GUI")
-       READER_TYPE, //
-
        @Meta(description = "File format options",//
        group = true)
        FILE_FORMAT, //
@@ -49,12 +48,25 @@ public enum Config {
        @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",//
        format = Format.DIRECTORY, def = "covers/")
        DEFAULT_COVERS_DIR, //
-       @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",//
+       @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",//
        format = Format.DIRECTORY, def = "$HOME/Books/")
        LIBRARY_DIR, //
-       @Meta(description = "The default library to use (KEY:SERVER:PORT), or empty for the local library",//
-       format = Format.STRING, def = "")
-       DEFAULT_LIBRARY, //
+
+       @Meta(description = "Remote library\nA remote library can be configured to fetch the stories from a remote Fanfix server",//
+       group = true)
+       REMOTE_LIBRARY, //
+       @Meta(description = "Use the remote Fanfix server configured here instead of the local library (if FALSE, the local library will be used instead)",//
+       format = Format.BOOLEAN, def = "false")
+       REMOTE_LIBRARY_ENABLED, //
+       @Meta(description = "The remote Fanfix server to connect to",//
+       format = Format.STRING)
+       REMOTE_LIBRARY_HOST, //
+       @Meta(description = "The port to use for the remote Fanfix server",//
+       format = Format.INT, def = "58365")
+       REMOTE_LIBRARY_PORT, //
+       @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",//
+       format = Format.PASSWORD)
+       REMOTE_LIBRARY_KEY, //
 
        @Meta(description = "Network configuration",//
        group = true)
@@ -99,28 +111,28 @@ public enum Config {
        DEBUG_TRACE, //
 
        @Meta(description = "Internal configuration\nThose options are internal to the program and should probably not be changed",//
-       group = true)
+       hidden = true, group = true)
        CONF, //
        @Meta(description = "LaTeX configuration",//
-       group = true)
+       hidden = true, group = true)
        CONF_LATEX_LANG, //
        @Meta(description = "LaTeX output language (full name) for \"English\"",//
-       format = Format.STRING, def = "english")
+       hidden = true, format = Format.STRING, def = "english")
        CONF_LATEX_LANG_EN, //
        @Meta(description = "LaTeX output language (full name) for \"French\"",//
-       format = Format.STRING, def = "french")
+       hidden = true, format = Format.STRING, def = "french")
        CONF_LATEX_LANG_FR, //
        @Meta(description = "other 'by' prefixes before author name, used to identify the author",//
-       array = true, format = Format.STRING, def = "\"by\",\"par\",\"de\",\"©\",\"(c)\"")
+       hidden = true, array = true, format = Format.STRING, def = "\"by\",\"par\",\"de\",\"©\",\"(c)\"")
        CONF_BYS, //
        @Meta(description = "List of languages codes used for chapter identification (should not be changed)", //
-       array = true, format = Format.STRING, def = "\"EN\",\"FR\"")
+       hidden = true, array = true, format = Format.STRING, def = "\"EN\",\"FR\"")
        CONF_CHAPTER, //
        @Meta(description = "Chapter identification string in English, used to identify a starting chapter in text mode",//
-       format = Format.STRING, def = "Chapter")
+       hidden = true, format = Format.STRING, def = "Chapter")
        CONF_CHAPTER_EN, //
        @Meta(description = "Chapter identification string in French, used to identify a starting chapter in text mode",//
-       format = Format.STRING, def = "Chapitre")
+       hidden = true, format = Format.STRING, def = "Chapitre")
        CONF_CHAPTER_FR, //
 
        @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)",//
@@ -148,4 +160,14 @@ public enum Config {
        @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)", //
        format = Format.PASSWORD, def = "Bearer WnZ5oHlzQoDocv1GcgHfcoqctHkSwL-D")
        LOGIN_FIMFICTION_APIKEY_TOKEN, //
+       
+       @Meta(description = "e621.net credentials\nYou can give your e621.net credentials here to have access to all the comics and ignore the default blacklist",//
+       group = true)
+       LOGIN_E621, //
+       @Meta(description = "Your e621.net login",//
+       format = Format.STRING)
+       LOGIN_E621_LOGIN, //
+       @Meta(description = "Your e621.net API KEY",//
+       format = Format.PASSWORD)
+       LOGIN_E621_APIKEY, //
 }