Merge branch 'hotfix/0.7.7' into develop
This commit is contained in:
commit
66544e21d1
4 changed files with 18 additions and 10 deletions
10
README.md
10
README.md
|
@ -1,4 +1,4 @@
|
|||
## Better Word Count
|
||||
# Better Word Count
|
||||
|
||||
  
|
||||
|
||||
|
@ -6,7 +6,7 @@ This plugin is the same as the built-in **Word Count** plugin, except when you s
|
|||
|
||||

|
||||
|
||||
### Features
|
||||
## Features
|
||||
|
||||
- Allows you to store statistics about your vault.
|
||||
- Works with all languages.
|
||||
|
@ -17,16 +17,18 @@ This plugin is the same as the built-in **Word Count** plugin, except when you s
|
|||
- Total Files in vault.
|
||||
- Highly Customizable status bar that can be adapted to your needs.
|
||||
|
||||
#### TODO:
|
||||
### TODO
|
||||
|
||||
- [ ] add statistic view
|
||||
- [ ] add more statistics (make suggestions)
|
||||
- [ ] add goals
|
||||
|
||||
### Contributors
|
||||
## Contributors
|
||||
|
||||
- @leoccyao
|
||||
- Added all word, char, sentence count when not viewing a markdown file.
|
||||
- @lishid
|
||||
- Helped solve the performace issue.
|
||||
|
||||
### Special Thanks
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "better-word-count",
|
||||
"name": "Better Word Count",
|
||||
"version": "0.7.6",
|
||||
"version": "0.7.7",
|
||||
"description": "Counts the words of selected text in the editor.",
|
||||
"author": "Luke Leppan",
|
||||
"authorUrl": "https://lukeleppan.com",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "better-word-count",
|
||||
"version": "0.7.6",
|
||||
"version": "0.7.7",
|
||||
"description": "Counts the words of selected text in the editor.",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -12,7 +12,7 @@ export class DataCollector {
|
|||
}
|
||||
|
||||
getTotalFileCount() {
|
||||
return Object.keys(this.metadataCache.resolvedLinks).length;
|
||||
return this.vault.getMarkdownFiles().length;
|
||||
}
|
||||
|
||||
async getTotalWordCount() {
|
||||
|
@ -20,7 +20,9 @@ export class DataCollector {
|
|||
const files = this.vault.getFiles();
|
||||
for (const i in files) {
|
||||
const file = files[i];
|
||||
words += getWordCount(await this.vault.cachedRead(file));
|
||||
if (file.extension === "md") {
|
||||
words += getWordCount(await this.vault.cachedRead(file));
|
||||
}
|
||||
}
|
||||
|
||||
return words;
|
||||
|
@ -31,7 +33,9 @@ export class DataCollector {
|
|||
const files = this.vault.getFiles();
|
||||
for (const i in files) {
|
||||
const file = files[i];
|
||||
characters += getCharacterCount(await this.vault.cachedRead(file));
|
||||
if (file.extension === "md") {
|
||||
characters += getCharacterCount(await this.vault.cachedRead(file));
|
||||
}
|
||||
}
|
||||
|
||||
return characters;
|
||||
|
@ -42,7 +46,9 @@ export class DataCollector {
|
|||
const files = this.vault.getFiles();
|
||||
for (const i in files) {
|
||||
const file = files[i];
|
||||
sentence += getSentenceCount(await this.vault.cachedRead(file));
|
||||
if (file.extension === "md") {
|
||||
sentence += getSentenceCount(await this.vault.cachedRead(file));
|
||||
}
|
||||
}
|
||||
|
||||
return sentence;
|
||||
|
|
Loading…
Reference in a new issue