// can also be used to document progress in a project on one machine concept G22TravelLogEntry { settable S computerID; settable S computerDescription; settable Timestamp timestamp; settable S gazelleCompilationDate; settable S projectID; settable File projectDir; settable long projectSize; settable int fileCount; settable int conceptCount; settable long conceptIDCounter; settable Timestamp lastConceptChange; settable Timestamp lastFileChange; // It will be nice to always put something in here // (Why was this entry made?) settable S action; // these are optional settable S importedFromURL; settable File importedFromFile; settable S backedUpToURL; settable File backedUpToFile; settable S comment; static selfType create(G22Utils g22utils) { var cc = g22utils.concepts(); ret new selfType() .computerID(main computerID()) .timestamp(tsNow()) .gazelleCompilationDate(g22utils.compilationDate()) .projectID(g22utils.projectID()) .projectDir(g22utils.projectDir()) .conceptCount(countConcepts(cc)) .conceptIDCounter(cc.idCounter) .lastConceptChange(main lastConceptChange(cc)); } selfType scanProject(G22Utils g22utils) { L files = findAllFiles_noDirs(g22utils.projectDir()); ret lastFileChange(toTimestamp(max(map modificationTime(files)))) .projectSize(longSum fileSize(files)) .fileCount(l(files)); } sbool shouldCreateEntry(G22Utils g22utils) { var entries = list(g22utils.concepts(), G22TravelLogEntry); if (empty(entries)) true; var last = highestByField(entries, "timestamp"); if (!eq(last.computerID(), main computerID())) true; false; }; }