begin implementing separate metadata parsing

This commit is contained in:
Daniel Fichtinger 2024-12-31 22:47:01 -05:00
parent 709a2738f9
commit 35c14f09c0
6 changed files with 192 additions and 2 deletions

View file

@ -8,7 +8,8 @@ import (
"github.com/ficcdaf/zona/internal/util"
)
func processFile(inPath string, entry fs.DirEntry, err error, outRoot string, settings *Settings) error {
// TODO: Process the metadata and build a queue of files to convert here instead of converting them immediately
func buildFile(inPath string, entry fs.DirEntry, err error, outRoot string, settings *Settings) error {
if err != nil {
return err
}
@ -46,7 +47,7 @@ func processFile(inPath string, entry fs.DirEntry, err error, outRoot string, se
func Traverse(root string, outRoot string, settings *Settings) error {
walkFunc := func(path string, entry fs.DirEntry, err error) error {
return processFile(path, entry, err, outRoot, settings)
return buildFile(path, entry, err, outRoot, settings)
}
err := filepath.WalkDir(root, walkFunc)
return err