🎨 Display details when exporting .sy.zip and data.zip https://github.com/siyuan-note/siyuan/issues/11696
This commit is contained in:
parent
f39c4b3b69
commit
f51b337693
3 changed files with 21 additions and 5 deletions
|
@ -7,7 +7,7 @@ require (
|
|||
github.com/88250/clipboard v0.1.5
|
||||
github.com/88250/epub v0.0.0-20230830085737-c19055cd1f48
|
||||
github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7
|
||||
github.com/88250/gulu v1.2.3-0.20240612021457-b8e8cadd87f3
|
||||
github.com/88250/gulu v1.2.3-0.20240612035750-c9cf5f7a4d02
|
||||
github.com/88250/lute v1.7.7-0.20240611024745-53a7d0cc6568
|
||||
github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c
|
||||
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
|
||||
|
|
|
@ -10,8 +10,8 @@ github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7 h1:MafIFwSS0x6A4
|
|||
github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7/go.mod h1:HrKCCTin3YNDSLBD02K0AOljjV6eNwc3/zyEI+xyV1I=
|
||||
github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950 h1:Pa5hMiBceTVVqrYaDlLio2QSKbXMUmAZPbzCwT5eNCw=
|
||||
github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
|
||||
github.com/88250/gulu v1.2.3-0.20240612021457-b8e8cadd87f3 h1:vgVJ0e9hrdEpHOkKcSe45+ht1+O13PWi2ssq8yDVAvQ=
|
||||
github.com/88250/gulu v1.2.3-0.20240612021457-b8e8cadd87f3/go.mod h1:MUfzyfmbPrRDZLqxc7aPrVYveatTHRfoUa5TynPS0i8=
|
||||
github.com/88250/gulu v1.2.3-0.20240612035750-c9cf5f7a4d02 h1:3e5+yobj655pTeKOYMbJrnc1mE51ZkbXIxquTYZuYCY=
|
||||
github.com/88250/gulu v1.2.3-0.20240612035750-c9cf5f7a4d02/go.mod h1:MUfzyfmbPrRDZLqxc7aPrVYveatTHRfoUa5TynPS0i8=
|
||||
github.com/88250/lute v1.7.7-0.20240611024745-53a7d0cc6568 h1:1TwBQATNCmPi4XvEZReYDam8aouz3DZPXUciciTITdg=
|
||||
github.com/88250/lute v1.7.7-0.20240611024745-53a7d0cc6568/go.mod h1:VDAzL8b+oCh+e3NAlmwwLzC53ten0rZlS8NboB7ljtk=
|
||||
github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c h1:Dl/8S9iLyPMTElnWIBxmjaLiWrkI5P4a21ivwAn5pU0=
|
||||
|
|
|
@ -471,7 +471,12 @@ func exportData(exportFolder string) (zipPath string, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
if err = zip.AddDirectory(baseFolderName, exportFolder); nil != err {
|
||||
zipCallback := func(filename string) {
|
||||
msg := Conf.language(65) + " " + fmt.Sprintf(Conf.language(70), filename)
|
||||
util.PushEndlessProgress(msg)
|
||||
}
|
||||
|
||||
if err = zip.AddDirectory(baseFolderName, exportFolder, zipCallback); nil != err {
|
||||
logging.LogErrorf("create export data zip [%s] failed: %s", exportFolder, err)
|
||||
return
|
||||
}
|
||||
|
@ -1462,6 +1467,9 @@ func yfm(docIAL map[string]string) string {
|
|||
}
|
||||
|
||||
func exportBoxSYZip(boxID string) (zipPath string) {
|
||||
util.PushEndlessProgress(Conf.Language(65))
|
||||
defer util.ClearPushProgress(100)
|
||||
|
||||
box := Conf.Box(boxID)
|
||||
if nil == box {
|
||||
logging.LogErrorf("not found box [%s]", boxID)
|
||||
|
@ -1607,6 +1615,9 @@ func exportSYZip(boxID, rootDirPath, baseFolderName string, docPaths []string) (
|
|||
}
|
||||
|
||||
copiedAssets.Add(asset)
|
||||
|
||||
msg := Conf.language(65) + " " + fmt.Sprintf(Conf.language(70), asset)
|
||||
util.PushEndlessProgress(msg)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1738,7 +1749,12 @@ func exportSYZip(boxID, rootDirPath, baseFolderName string, docPaths []string) (
|
|||
return ""
|
||||
}
|
||||
|
||||
if err = zip.AddDirectory(baseFolderName, exportFolder); nil != err {
|
||||
zipCallback := func(filename string) {
|
||||
msg := Conf.language(65) + " " + fmt.Sprintf(Conf.language(70), filename)
|
||||
util.PushEndlessProgress(msg)
|
||||
}
|
||||
|
||||
if err = zip.AddDirectory(baseFolderName, exportFolder, zipCallback); nil != err {
|
||||
logging.LogErrorf("create export .sy.zip [%s] failed: %s", exportFolder, err)
|
||||
return ""
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue