## 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
- [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
@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, //
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")
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)
# (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
desc = Instance.getTrans().getString(id, this);
}
+ if (desc == null) {
+ desc = this.toString();
+ }
+
return desc;
}
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 {
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);
+ }
}
- }
- });
+ });
+ }
}
}
});