added save-function, rearranged data folder, updated README

This commit is contained in:
2022-10-11 06:35:37 +02:00
parent 5e5a8c6a1f
commit de4b89525c
4 changed files with 16 additions and 5 deletions

View File

@@ -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);