diff --git a/CHANGELOG.md b/CHANGELOG.md index fdd0b31..89bd5d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.3.3](https://github.com/edonyzpc/personal-assistant/compare/1.3.2...1.3.3) (2024-03-21) +### Feature +- show vault statistics data in chart view + ## [1.3.2](https://github.com/edonyzpc/personal-assistant/compare/1.3.1...1.3.2) (2023-11-16) ### Improve - list callout command support inserting in current cursor diff --git a/README-CN.md b/README-CN.md index 232d078..27dc24e 100644 --- a/README-CN.md +++ b/README-CN.md @@ -11,7 +11,11 @@ Downloads

-> ***号外***: 新特性来啦!记录预览支持渲染块引用wiki链接以及从预览卡跳转到原始笔记文件。 +> ***号外***: 新特性来啦!渲染 chart 图标用于展示 vault 的统计数据。 +
+usage video +
+
usage video
diff --git a/README.md b/README.md index b3d51f0..5bc40a1 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,11 @@

-> ***NOTE***: New shiny feature: preview record supports rendering block reference wiki link and jumping from preview card to original note file +> ***NOTE***: New shiny feature: Rendering statistics of the current vault including characters, words, sections, citations, lines and pages. +
+usage video +
+
usage video
@@ -117,6 +121,7 @@ Now Personal Assistant plugin is available in [plugin market](https://obsidian.m ## Attribution - Best thanks for project [obsidian-advanced-new-file](https://github.com/vanadium23/obsidian-advanced-new-file) for the code of `createNote`, `createDirectory` - Best thanks for project [obsidian-callout-manager](https://github.com/eth-p/obsidian-callout-manager) for the `class CalloutPreviewComponent` and `color.ts` +- Best thanks for project [better-word-count](https://github.com/lukeleppan/better-word-count) for the `package stats` ## Contact diff --git a/docs/personal-assistant-v1.3.3.gif b/docs/personal-assistant-v1.3.3.gif new file mode 100644 index 0000000..5a0e865 Binary files /dev/null and b/docs/personal-assistant-v1.3.3.gif differ diff --git a/manifest-beta.json b/manifest-beta.json index d9b8e5d..cd7704f 100644 --- a/manifest-beta.json +++ b/manifest-beta.json @@ -1,7 +1,7 @@ { "id": "personal-assistant", "name": "Personal Assistant", - "version": "1.3.2", + "version": "1.3.3", "minAppVersion": "1.1.0", "description": "Streamline workflows within Obsidian, managing memos and plugins with just one command.", "author": "edony", diff --git a/manifest.json b/manifest.json index d9b8e5d..cd7704f 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "personal-assistant", "name": "Personal Assistant", - "version": "1.3.2", + "version": "1.3.3", "minAppVersion": "1.1.0", "description": "Streamline workflows within Obsidian, managing memos and plugins with just one command.", "author": "edony", diff --git a/package.json b/package.json index 39c9c55..7b43f62 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "personal-assistant", - "version": "1.3.2", + "version": "1.3.3", "description": "An plugin which help you to automatically manage Obsidian.", "main": "main.js", "scripts": { diff --git a/src/stats/StatsManager.ts b/src/stats/StatsManager.ts index 9dc900e..65d432e 100644 --- a/src/stats/StatsManager.ts +++ b/src/stats/StatsManager.ts @@ -83,6 +83,11 @@ export default class StatsManager { } this.today = moment().format("YYYY-MM-DD"); + let counter = 1; + while (!this.vaultStats.history.hasOwnProperty(moment().subtract(counter, 'days').format("YYYY-MM-DD"))) { + counter++; + } + const lastRecordDay = moment().subtract(counter, 'days').format("YYYY-MM-DD"); const totalWords = await this.calcTotalWords(); const totalCharacters = await this.calcTotalCharacters(); const totalSentences = await this.calcTotalSentences(); @@ -95,7 +100,7 @@ export default class StatsManager { characters: 0, sentences: 0, pages: 0, - files: 0, + files: this.vaultStats.history[lastRecordDay].files, footnotes: 0, citations: 0, totalWords: totalWords, diff --git a/versions.json b/versions.json index 6ecf1de..dd10f86 100644 --- a/versions.json +++ b/versions.json @@ -43,5 +43,6 @@ "1.2.9": "1.1.0", "1.3.0": "1.1.0", "1.3.1": "1.1.0", - "1.3.2": "1.1.0" + "1.3.2": "1.1.0", + "1.3.3": "1.1.0" } \ No newline at end of file