added save-function, rearranged data folder, updated README
This commit is contained in:
@@ -6,7 +6,7 @@ class Notebook {
|
||||
int id;
|
||||
Notebook(int id_, String notebookpath_, String[] imagepaths_) {
|
||||
id = id_;
|
||||
notebookpath = dataPath("") + "/" + notebookpath_;
|
||||
notebookpath = dataPath("") + "/Notizhefte/" + notebookpath_;
|
||||
imagepaths = Arrays.copyOfRange(imagepaths_, 1, imagepaths_.length-1);
|
||||
String[] separated = notebookpath_.split("-");
|
||||
dateText = (getMonth(int(separated[1])) + " " + separated[0]);
|
||||
@@ -49,12 +49,12 @@ String getMonth(int id) {
|
||||
ArrayList<Notebook> notebooks = new ArrayList<Notebook>();
|
||||
|
||||
void createNotebooks() {
|
||||
File datafolder = new File(dataPath(""));
|
||||
File datafolder = new File(dataPath("") + "/Notizhefte");
|
||||
String[] notebooknames = datafolder.list();
|
||||
notebooknames = sort(notebooknames);
|
||||
int notebookID = 0;
|
||||
for (int i = 0; i < notebooknames.length; i++) {
|
||||
File notebookfolder = new File(dataPath("") + "/" + notebooknames[i]);
|
||||
File notebookfolder = new File(dataPath("") + "/Notizhefte/" + notebooknames[i]);
|
||||
if (notebookfolder.list() != null) {
|
||||
String[] imagenames = notebookfolder.list();
|
||||
List<String> strings = Arrays.asList(imagenames);
|
||||
|
||||
Reference in New Issue
Block a user