mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Add block content statistics template function statBlock https://github.com/siyuan-note/siyuan/issues/13438
This commit is contained in:
parent
e2017a9fba
commit
11d3516aa7
6 changed files with 237 additions and 167 deletions
|
|
@ -26,6 +26,7 @@ import (
|
|||
"github.com/88250/lute/html"
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/siyuan/kernel/filesys"
|
||||
"github.com/siyuan-note/siyuan/kernel/model"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
|
@ -320,7 +321,7 @@ func getContentWordCount(c *gin.Context) {
|
|||
}
|
||||
|
||||
content := arg["content"].(string)
|
||||
ret.Data = model.ContentStat(content)
|
||||
ret.Data = filesys.ContentStat(content)
|
||||
}
|
||||
|
||||
func getBlocksWordCount(c *gin.Context) {
|
||||
|
|
@ -337,7 +338,7 @@ func getBlocksWordCount(c *gin.Context) {
|
|||
for _, id := range idsArg {
|
||||
ids = append(ids, id.(string))
|
||||
}
|
||||
ret.Data = model.BlocksWordCount(ids)
|
||||
ret.Data = filesys.BlocksWordCount(ids)
|
||||
}
|
||||
|
||||
func getTreeStat(c *gin.Context) {
|
||||
|
|
@ -350,7 +351,7 @@ func getTreeStat(c *gin.Context) {
|
|||
}
|
||||
|
||||
id := arg["id"].(string)
|
||||
ret.Data = model.StatTree(id)
|
||||
ret.Data = filesys.StatTree(id)
|
||||
}
|
||||
|
||||
func getDOMText(c *gin.Context) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue