mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-10 22:23:28 +08:00
This commit is contained in:
parent
1c5eccd510
commit
edd90ce7cf
@ -17,14 +17,16 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/88250/lute/ast"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/riff"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
"github.com/88250/gulu"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/88250/lute/ast"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/riff"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
var Decks = map[string]*riff.Deck{}
|
||||
@ -47,6 +49,10 @@ func AddFlashcard(blockID string, deckName string) (err error) {
|
||||
|
||||
func InitFlashcards() {
|
||||
riffSavePath := filepath.Join(util.DataDir, "storage", "riff")
|
||||
if !gulu.File.IsDir(riffSavePath) {
|
||||
return
|
||||
}
|
||||
|
||||
entries, err := os.ReadDir(riffSavePath)
|
||||
if nil != err {
|
||||
logging.LogErrorf("read riff dir failed: %s", err)
|
||||
|
Loading…
Reference in New Issue
Block a user