feat: add Safari bookmark and download extraction from plist (#567)

* feat: add Safari bookmark and download extraction from plist files
* test: add nested folder test for bookmark tree traversal
Part of #565
This commit is contained in:
Roger
2026-04-12 01:50:54 +08:00
committed by GitHub
parent 7bf1759dd9
commit d105a1f488
9 changed files with 458 additions and 1 deletions
+8
View File
@@ -110,6 +110,10 @@ func (b *Browser) extractCategory(data *types.BrowserData, cat types.Category, p
data.Histories, err = extractHistories(path)
case types.Cookie:
data.Cookies, err = extractCookies(path)
case types.Bookmark:
data.Bookmarks, err = extractBookmarks(path)
case types.Download:
data.Downloads, err = extractDownloads(path)
default:
return
}
@@ -127,6 +131,10 @@ func (b *Browser) countCategory(cat types.Category, path string) int {
count, err = countHistories(path)
case types.Cookie:
count, err = countCookies(path)
case types.Bookmark:
count, err = countBookmarks(path)
case types.Download:
count, err = countDownloads(path)
default:
// Unsupported categories silently return 0.
}