private String creationDate;
private boolean fakeCover;
+ /**
+ * Create an empty {@link MetaData}.
+ */
+ public MetaData() {
+ }
+
/**
* The title of the story.
*
}
return String.format(
- "Meta %s:\n\tTitle: [%s]\n\tAuthor: [%s]\n\tDate: [%s]\n\tTags: [%s]"
- + "\n\tResume: [%s]\n\tCover: [%s]", luid, title,
- getAuthor(), getDate(), tags.toString(), resume, cover);
+ "Meta %s:\n\tTitle: [%s]\n\tAuthor: [%s]\n\tDate: [%s]\n\tTags: [%s]\n\tWord count: [%s]"
+ + "\n\tResume: [%s]\n\tCover: [%s]",
+ luid, title, getAuthor(), getDate(), tags.toString(),
+ "" + words, resume, cover);
}
}
import be.nikiroo.utils.NanoHTTPD.Response;
import be.nikiroo.utils.NanoHTTPD.Response.Status;
import be.nikiroo.utils.Progress;
+import be.nikiroo.utils.Progress.ProgressListener;
public class WebLibraryServer extends WebLibraryServerHtml {
class WLoginResult extends LoginResult {
final Progress pg = new Progress();
final String luid = lib.getNextId();
+ // Keep the latest name
+ pg.addProgressListener(new ProgressListener() {
+ @Override
+ public void progress(Progress progress, String name) {
+ pg.setName(name);
+ }
+ });
+
synchronized (imprts) {
imprts.put(luid, pg);
}