Skip to content

Commit

Permalink
tmp: save
Browse files Browse the repository at this point in the history
  • Loading branch information
sincerefly committed Sep 5, 2024
1 parent d70d061 commit 8a2738e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.idea/
.vscode/

capybara
output
bin
Expand Down
6 changes: 3 additions & 3 deletions constants/ext.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package constants

const (
ExtJPG = ".jpg"
ExtPNG = ".png"
ExtJPEG = ".jpeg"
ImageExtJPG = ".jpg"
ImageExtPNG = ".png"
ImageExtJPEG = ".jpeg"
)
8 changes: 2 additions & 6 deletions service/style/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (s *StyleProcessor) Run() {
}

func (s *StyleProcessor) SupportExtensions() []string {
return []string{constants.ExtJPG, constants.ExtPNG, constants.ExtJPEG}
return []string{constants.ImageExtJPG, constants.ImageExtPNG, constants.ImageExtJPEG}
}

// collect input dir images path
Expand All @@ -103,13 +103,9 @@ func (s *StyleProcessor) collectInputs() (*fileitem.Store, error) {
if err != nil {
return nil, err
}
innerPath := filepath.Dir(relativePath)
if err != nil {
return nil, err
}

fi := fileitem.NewFileItem(filename)
fi.SetInnerPath(innerPath)
fi.SetInnerPath(filepath.Dir(relativePath))
fi.SetSourceBase(input)
fi.SetTargetBase(output)

Expand Down

0 comments on commit 8a2738e

Please sign in to comment.