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