(README update)
authorNiki Roo <niki@nikiroo.be>
Sat, 4 Mar 2017 09:28:46 +0000 (10:28 +0100)
committerNiki Roo <niki@nikiroo.be>
Sat, 4 Mar 2017 09:28:46 +0000 (10:28 +0100)
README.md
src/be/nikiroo/fanfix/bundles/StringId.java
src/be/nikiroo/fanfix/bundles/resources.properties
src/be/nikiroo/fanfix/output/BasicOutput.java
src/be/nikiroo/fanfix/reader/LocalReaderFrame.java

index 2f0c95460cc97607f71d964e7c186b3a17b0e6f7..01f7419dd7d5ff6e7f35dddffe2dba08411308c3 100644 (file)
--- a/README.md
+++ b/README.md
@@ -89,6 +89,10 @@ Note that calling ```make libs``` will export the libraries into the src/ direct
 ## TODO
 
 Currently missing, but either in progress or planned:
+- [ ] Support new websites
+  - [x] YiffStar
+  - [ ] [Two Kinds](http://twokinds.keenspot.com/)
+  - [ ] [Slightly damned](http://www.sdamned.com/)
 - [ ] A GUI (work in progress)
   - [x] Make one
   - [x] Make it run when no args passed
@@ -96,24 +100,30 @@ Currently missing, but either in progress or planned:
   - [x] Work on the UI thread is BAD
   - [x] Allow export
   - [x] Allow delete/refresh
-  - [ ] Show a list of types
+  - [x] Show a list of types
     - [x] ..in the menu
-    - [ ] ..as a screen view
+    - [x] ..as a screen view
   - [ ] options screen
 - [ ] A TUI reader
 - [ ] Check if it can work on Android
+  - [x] First checks: it should work, but with changes
+  - [ ] Adapt work on images :(
+  - [ ] Partial/Conditional compilation
+  - [ ] APK export
 - [ ] Translations
   - [x] i18n system in place
   - [x] Make use of it
-  - [x] Use it for most user ouput
   - [ ] Use it for all user output
   - [ ] French translation
-- [x] Allow lauching a custom application instead of Desktop.start ?
-  - [ ] Make a wrapper for firefox to create a new, empty profile ?
+- [x] Allow lauching a custom application instead of Desktop.start
 - [x] Install a mechanism to handle stories import/export progress update
   - [x] Progress system
   - [x] in support classes (import)
   - [x] in output classes (export)
   - [x] CLI usage of such
   - [x] GUI usage of such
+- [ ] Version
+  - [x] Use a version number
+  - [x] Show it in UI
+  - [ ] A check-update feature
 
index bf496fbd6a5fa24afc733f12888bfee1696199c9..b910aef08bbacc6ae0d9016b947a6d193a0c4e83 100644 (file)
@@ -89,9 +89,12 @@ public enum StringId {
        @Meta(what = "output format description", where = "OutputType", format = "", info = "Description of this output type")
        OUTPUT_DESC_CBZ, //
        @Meta(what = "output format description", where = "OutputType", format = "", info = "Description of this output type")
+       OUTPUT_DESC_HTML, //
+       @Meta(what = "output format description", where = "OutputType", format = "", info = "Description of this output type")
        OUTPUT_DESC_LATEX, //
        @Meta(what = "short output format description", where = "OutputType", format = "", info = "Description of this output type")
        OUTPUT_DESC_SYSOUT, //
+       @Meta(what = "short output format description", where = "OutputType", format = "%s = type", info = "Default description when the type is not known by i18n")
        OUTPUT_DESC_SHORT, //
        @Meta(what = "short output format description", where = "OutputType", format = "", info = "Description of this output type")
        OUTPUT_DESC_SHORT_EPUB, //
@@ -105,6 +108,8 @@ public enum StringId {
        OUTPUT_DESC_SHORT_LATEX, //
        @Meta(what = "short output format description", where = "OutputType", format = "", info = "Description of this output type")
        OUTPUT_DESC_SHORT_SYSOUT, //
+       @Meta(what = "short output format description", where = "OutputType", format = "", info = "Description of this output type")
+       OUTPUT_DESC_SHORT_HTML, //
        @Meta(what = "error message", where = "LaTeX", format = "%s = the unknown 2-code language", info = "Error message for unknown 2-letter LaTeX language code")
        LATEX_LANG_UNKNOWN, //
        @Meta(what = "'by' prefix before author name", where = "", format = "", info = "used to output the author, make sure it is covered by Config.BYS for input detection")
index a317eb1e01f078e98c8ba8113a3c3c7d2c2a542f..1d142f37bb3f2fec5ed6a7397605858674c43a4b 100644 (file)
@@ -125,10 +125,16 @@ OUTPUT_DESC_INFO_TEXT = Contains the same information as the TEXT format, but wi
 OUTPUT_DESC_CBZ = CBZ file (basically a ZIP file containing images -- we store the images in PNG format)
 # (WHAT: output format description, WHERE: OutputType)
 # Description of this output type
+OUTPUT_DESC_HTML = HTML files (a directory containing the resources and "index.html")
+# (WHAT: output format description, WHERE: OutputType)
+# Description of this output type
 OUTPUT_DESC_LATEX = A LaTeX file using the "book" template
 # (WHAT: short output format description, WHERE: OutputType)
 # Description of this output type
 OUTPUT_DESC_SYSOUT = A simple DEBUG console output
+# (WHAT: short output format description, WHERE: OutputType, FORMAT: %s = type)
+# Default description when the type is not known by i18n
+OUTPUT_DESC_SHORT = %s
 # (WHAT: short output format description, WHERE: OutputType)
 # Description of this output type
 OUTPUT_DESC_SHORT_EPUB = Electronic book (.epub)
@@ -147,6 +153,9 @@ OUTPUT_DESC_SHORT_LATEX = LaTeX (.tex)
 # (WHAT: short output format description, WHERE: OutputType)
 # Description of this output type
 OUTPUT_DESC_SHORT_SYSOUT = Console output
+# (WHAT: short output format description, WHERE: OutputType)
+# Description of this output type
+OUTPUT_DESC_SHORT_HTML = HTML files with resources (directory, .html)
 # (WHAT: error message, WHERE: LaTeX, FORMAT: %s = the unknown 2-code language)
 # Error message for unknown 2-letter LaTeX language code
 LATEX_LANG_UNKNOWN = Unknown language: %s
index babe7537021058438071537dae41fbed948e2e0c..9bf096cca1ef8f5b7e5594694dc88da558f2ec11 100644 (file)
@@ -67,6 +67,10 @@ public abstract class BasicOutput {
                                desc = Instance.getTrans().getString(id, this);
                        }
 
+                       if (desc == null) {
+                               desc = this.toString();
+                       }
+
                        return desc;
                }
 
index 1d303a2c809e6df9866c52c2b81c9ccb74e9bc13..d50669db377e9ee7dc20247cc9663c2c40279f88 100644 (file)
@@ -318,6 +318,7 @@ class LocalReaderFrame extends JFrame {
                for (OutputType type : OutputType.values()) {
                        String ext = type.getDefaultExtension(false);
                        String desc = type.getDesc(false);
+
                        if (ext == null || ext.isEmpty()) {
                                filters.put(createAllFilter(desc), type);
                        } else {
@@ -343,21 +344,24 @@ class LocalReaderFrame extends JFrame {
                        public void actionPerformed(ActionEvent e) {
                                if (selectedBook != null) {
                                        fc.showDialog(LocalReaderFrame.this, "Save");
-                                       final OutputType type = filters.get(fc.getFileFilter());
-                                       final String path = fc.getSelectedFile().getAbsolutePath()
-                                                       + type.getDefaultExtension(false);
-                                       final Progress pg = new Progress();
-                                       outOfUi(pg, new Runnable() {
-                                               public void run() {
-                                                       try {
-                                                               Instance.getLibrary().export(
-                                                                               selectedBook.getMeta().getLuid(), type,
-                                                                               path, pg);
-                                                       } catch (IOException e) {
-                                                               Instance.syserr(e);
+                                       if (fc.getSelectedFile() != null) {
+                                               final OutputType type = filters.get(fc.getFileFilter());
+                                               final String path = fc.getSelectedFile()
+                                                               .getAbsolutePath()
+                                                               + type.getDefaultExtension(false);
+                                               final Progress pg = new Progress();
+                                               outOfUi(pg, new Runnable() {
+                                                       public void run() {
+                                                               try {
+                                                                       Instance.getLibrary().export(
+                                                                                       selectedBook.getMeta().getLuid(),
+                                                                                       type, path, pg);
+                                                               } catch (IOException e) {
+                                                                       Instance.syserr(e);
+                                                               }
                                                        }
-                                               }
-                                       });
+                                               });
+                                       }
                                }
                        }
                });