parent
ac7a6b5984
commit
ca577458d8
1 changed files with 10 additions and 4 deletions
|
@ -12,7 +12,7 @@ export class DataCollector {
|
|||
}
|
||||
|
||||
getTotalFileCount() {
|
||||
return Object.keys(this.metadataCache.resolvedLinks).length;
|
||||
return this.vault.getMarkdownFiles().length;
|
||||
}
|
||||
|
||||
async getTotalWordCount() {
|
||||
|
@ -20,8 +20,10 @@ export class DataCollector {
|
|||
const files = this.vault.getFiles();
|
||||
for (const i in files) {
|
||||
const file = files[i];
|
||||
if (file.extension === "md") {
|
||||
words += getWordCount(await this.vault.cachedRead(file));
|
||||
}
|
||||
}
|
||||
|
||||
return words;
|
||||
}
|
||||
|
@ -31,8 +33,10 @@ export class DataCollector {
|
|||
const files = this.vault.getFiles();
|
||||
for (const i in files) {
|
||||
const file = files[i];
|
||||
if (file.extension === "md") {
|
||||
characters += getCharacterCount(await this.vault.cachedRead(file));
|
||||
}
|
||||
}
|
||||
|
||||
return characters;
|
||||
}
|
||||
|
@ -42,8 +46,10 @@ export class DataCollector {
|
|||
const files = this.vault.getFiles();
|
||||
for (const i in files) {
|
||||
const file = files[i];
|
||||
if (file.extension === "md") {
|
||||
sentence += getSentenceCount(await this.vault.cachedRead(file));
|
||||
}
|
||||
}
|
||||
|
||||
return sentence;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue