1. 修复FileStorage\Image文件没有导出的问题
2. 增加图片定位到聊天位置的功能 3. 导出界面增加提示
3
.gitignore
vendored
@ -30,4 +30,5 @@ env
|
|||||||
User
|
User
|
||||||
config.json
|
config.json
|
||||||
wechatDataBackup.exe
|
wechatDataBackup.exe
|
||||||
app.log
|
app.log
|
||||||
|
app-*.log
|
@ -1,5 +1,5 @@
|
|||||||
<p align="center" style="text-align: center">
|
<p align="center" style="text-align: center">
|
||||||
<img src="./res/logo.png" width="15%"><br/>
|
<img src="./res/logo_256.png" width="15%"><br/>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
|
2
app.go
@ -23,7 +23,7 @@ const (
|
|||||||
configDefaultUserKey = "userConfig.defaultUser"
|
configDefaultUserKey = "userConfig.defaultUser"
|
||||||
configUsersKey = "userConfig.users"
|
configUsersKey = "userConfig.users"
|
||||||
configExportPathKey = "exportPath"
|
configExportPathKey = "exportPath"
|
||||||
appVersion = "v1.2.3"
|
appVersion = "v1.2.4"
|
||||||
)
|
)
|
||||||
|
|
||||||
type FileLoader struct {
|
type FileLoader struct {
|
||||||
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 165 KiB After Width: | Height: | Size: 82 KiB |
@ -1,3 +1,8 @@
|
|||||||
|
## v1.2.4
|
||||||
|
1. 修复FileStorage\Image文件没有导出的问题
|
||||||
|
2. 增加图片定位到聊天位置的功能
|
||||||
|
3. 导出界面增加提示
|
||||||
|
|
||||||
## v1.2.3
|
## v1.2.3
|
||||||
1. 修改程序ICON
|
1. 修改程序ICON
|
||||||
|
|
||||||
|
BIN
frontend/dist/assets/110_怄火.896c41d9.png
vendored
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
frontend/dist/assets/112_左哼哼.5425438e.png
vendored
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
frontend/dist/assets/113_哈欠.fe9c8521.png
vendored
Normal file
After Width: | Height: | Size: 13 KiB |
1
frontend/dist/assets/index.00f6955e.css
vendored
Normal file
1
frontend/dist/assets/index.5131ab95.css
vendored
533
frontend/dist/assets/index.8be36b27.js
vendored
Normal file
533
frontend/dist/assets/index.e4a8c0f4.js
vendored
BIN
frontend/dist/assets/logo.8df6944e.png
vendored
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
frontend/dist/assets/red_packet.704bd303.png
vendored
Normal file
After Width: | Height: | Size: 91 KiB |
4
frontend/dist/index.html
vendored
@ -4,8 +4,8 @@
|
|||||||
<meta charset="UTF-8"/>
|
<meta charset="UTF-8"/>
|
||||||
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
|
||||||
<title>wechatDataBackup</title>
|
<title>wechatDataBackup</title>
|
||||||
<script type="module" crossorigin src="/assets/index.e4a8c0f4.js"></script>
|
<script type="module" crossorigin src="/assets/index.8be36b27.js"></script>
|
||||||
<link rel="stylesheet" href="/assets/index.5131ab95.css">
|
<link rel="stylesheet" href="/assets/index.00f6955e.css">
|
||||||
</head>
|
</head>
|
||||||
<body >
|
<body >
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
@ -310,6 +310,7 @@ func exportWeChatVideoAndFile(info WeChatInfo, expPath string, progress chan<- s
|
|||||||
videoRootPath := info.FilePath + "\\FileStorage\\Video"
|
videoRootPath := info.FilePath + "\\FileStorage\\Video"
|
||||||
fileRootPath := info.FilePath + "\\FileStorage\\File"
|
fileRootPath := info.FilePath + "\\FileStorage\\File"
|
||||||
cacheRootPath := info.FilePath + "\\FileStorage\\Cache"
|
cacheRootPath := info.FilePath + "\\FileStorage\\Cache"
|
||||||
|
|
||||||
rootPaths := []string{videoRootPath, fileRootPath, cacheRootPath}
|
rootPaths := []string{videoRootPath, fileRootPath, cacheRootPath}
|
||||||
|
|
||||||
handleNumber := int64(0)
|
handleNumber := int64(0)
|
||||||
@ -326,6 +327,9 @@ func exportWeChatVideoAndFile(info WeChatInfo, expPath string, progress chan<- s
|
|||||||
go func() {
|
go func() {
|
||||||
for _, rootPath := range rootPaths {
|
for _, rootPath := range rootPaths {
|
||||||
log.Println(rootPath)
|
log.Println(rootPath)
|
||||||
|
if _, err := os.Stat(rootPath); err != nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
err := filepath.Walk(rootPath, func(path string, finfo os.FileInfo, err error) error {
|
err := filepath.Walk(rootPath, func(path string, finfo os.FileInfo, err error) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("filepath.Walk:%v\n", err)
|
log.Printf("filepath.Walk:%v\n", err)
|
||||||
@ -399,43 +403,51 @@ func exportWeChatVideoAndFile(info WeChatInfo, expPath string, progress chan<- s
|
|||||||
func exportWeChatBat(info WeChatInfo, expPath string, progress chan<- string) {
|
func exportWeChatBat(info WeChatInfo, expPath string, progress chan<- string) {
|
||||||
progress <- "{\"status\":\"processing\", \"result\":\"export WeChat Dat start\", \"progress\": 21}"
|
progress <- "{\"status\":\"processing\", \"result\":\"export WeChat Dat start\", \"progress\": 21}"
|
||||||
datRootPath := info.FilePath + "\\FileStorage\\MsgAttach"
|
datRootPath := info.FilePath + "\\FileStorage\\MsgAttach"
|
||||||
fileInfo, err := os.Stat(datRootPath)
|
imageRootPath := info.FilePath + "\\FileStorage\\Image"
|
||||||
if err != nil || !fileInfo.IsDir() {
|
rootPaths := []string{datRootPath, imageRootPath}
|
||||||
progress <- fmt.Sprintf("{\"status\":\"error\", \"result\":\"%s error\"}", datRootPath)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
handleNumber := int64(0)
|
handleNumber := int64(0)
|
||||||
fileNumber := getPathFileNumber(datRootPath, ".dat")
|
fileNumber := int64(0)
|
||||||
|
for i := range rootPaths {
|
||||||
|
fileNumber += getPathFileNumber(rootPaths[i], ".dat")
|
||||||
|
}
|
||||||
|
log.Println("DatFileNumber ", fileNumber)
|
||||||
|
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
var reportWg sync.WaitGroup
|
var reportWg sync.WaitGroup
|
||||||
quitChan := make(chan struct{})
|
quitChan := make(chan struct{})
|
||||||
taskChan := make(chan [2]string, 100)
|
taskChan := make(chan [2]string, 100)
|
||||||
go func() {
|
go func() {
|
||||||
err = filepath.Walk(datRootPath, func(path string, finfo os.FileInfo, err error) error {
|
for i := range rootPaths {
|
||||||
if err != nil {
|
if _, err := os.Stat(rootPaths[i]); err != nil {
|
||||||
log.Printf("filepath.Walk:%v\n", err)
|
continue
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if !finfo.IsDir() && strings.HasSuffix(path, ".dat") {
|
err := filepath.Walk(rootPaths[i], func(path string, finfo os.FileInfo, err error) error {
|
||||||
expFile := expPath + path[len(info.FilePath):]
|
|
||||||
_, err := os.Stat(filepath.Dir(expFile))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
os.MkdirAll(filepath.Dir(expFile), 0644)
|
log.Printf("filepath.Walk:%v\n", err)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if !finfo.IsDir() && strings.HasSuffix(path, ".dat") {
|
||||||
|
expFile := expPath + path[len(info.FilePath):]
|
||||||
|
_, err := os.Stat(filepath.Dir(expFile))
|
||||||
|
if err != nil {
|
||||||
|
os.MkdirAll(filepath.Dir(expFile), 0644)
|
||||||
|
}
|
||||||
|
|
||||||
|
task := [2]string{path, expFile}
|
||||||
|
taskChan <- task
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
task := [2]string{path, expFile}
|
|
||||||
taskChan <- task
|
|
||||||
return nil
|
return nil
|
||||||
|
})
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
log.Println("filepath.Walk:", err)
|
||||||
|
progress <- fmt.Sprintf("{\"status\":\"error\", \"result\":\"%v\"}", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
|
||||||
})
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
log.Println("filepath.Walk:", err)
|
|
||||||
progress <- fmt.Sprintf("{\"status\":\"error\", \"result\":\"%v\"}", err)
|
|
||||||
}
|
}
|
||||||
close(taskChan)
|
close(taskChan)
|
||||||
}()
|
}()
|
||||||
@ -445,7 +457,7 @@ func exportWeChatBat(info WeChatInfo, expPath string, progress chan<- string) {
|
|||||||
go func() {
|
go func() {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
for task := range taskChan {
|
for task := range taskChan {
|
||||||
_, err = os.Stat(task[1])
|
_, err := os.Stat(task[1])
|
||||||
if err == nil {
|
if err == nil {
|
||||||
atomic.AddInt64(&handleNumber, 1)
|
atomic.AddInt64(&handleNumber, 1)
|
||||||
continue
|
continue
|
||||||
|
@ -182,6 +182,7 @@ type WeChatMessage struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type WeChatMessageList struct {
|
type WeChatMessageList struct {
|
||||||
|
MsgType string `json:"MsgType"`
|
||||||
KeyWord string `json:"KeyWord"`
|
KeyWord string `json:"KeyWord"`
|
||||||
Total int `json:"Total"`
|
Total int `json:"Total"`
|
||||||
Rows []WeChatMessage `json:"Rows"`
|
Rows []WeChatMessage `json:"Rows"`
|
||||||
@ -692,6 +693,7 @@ func (P *WechatDataProvider) WeChatGetMessageListByKeyWord(userName string, time
|
|||||||
List := &WeChatMessageList{}
|
List := &WeChatMessageList{}
|
||||||
List.Rows = make([]WeChatMessage, 0)
|
List.Rows = make([]WeChatMessage, 0)
|
||||||
List.KeyWord = keyWord
|
List.KeyWord = keyWord
|
||||||
|
List.MsgType = msgType
|
||||||
_time := time
|
_time := time
|
||||||
selectPagesize := pageSize
|
selectPagesize := pageSize
|
||||||
if keyWord != "" || msgType != "" {
|
if keyWord != "" || msgType != "" {
|
||||||
@ -732,6 +734,7 @@ func (P *WechatDataProvider) WeChatGetMessageListByType(userName string, time in
|
|||||||
|
|
||||||
List := &WeChatMessageList{}
|
List := &WeChatMessageList{}
|
||||||
List.Rows = make([]WeChatMessage, 0)
|
List.Rows = make([]WeChatMessage, 0)
|
||||||
|
List.MsgType = msgType
|
||||||
selectTime := time
|
selectTime := time
|
||||||
selectpageSize := 30
|
selectpageSize := 30
|
||||||
needSize := pageSize
|
needSize := pageSize
|
||||||
|
BIN
res/logo.png
Before Width: | Height: | Size: 547 KiB After Width: | Height: | Size: 470 KiB |
BIN
res/logo_128.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
BIN
res/logo_256.png
Normal file
After Width: | Height: | Size: 28 KiB |