be less chatty

This commit is contained in:
gutmet 2021-06-13 12:59:21 +02:00
parent 4e99c73274
commit 78d255a0ad

View File

@ -304,10 +304,8 @@ func resizeAll(src string, dest string, w uint, h uint) {
for _, f := range files { for _, f := range files {
outfile := filepath.Join(dest, strings.TrimPrefix(f, src)) outfile := filepath.Join(dest, strings.TrimPrefix(f, src))
if goutil.PathExists(outfile) { if goutil.PathExists(outfile) {
fmt.Println(f + " already converted")
continue continue
} }
fmt.Println("Converting " + f)
file, err := os.Open(f) file, err := os.Open(f)
goutil.OptPanic(err) goutil.OptPanic(err)
img, err := jpeg.Decode(file) img, err := jpeg.Decode(file)
@ -336,15 +334,12 @@ func resizeAll(src string, dest string, w uint, h uint) {
} }
func boundSize() { func boundSize() {
fmt.Println("medium images") fmt.Println("making medium images")
fmt.Println("-------------")
resizeAll(dirOrig(), dirMedium(), 0, 1080) resizeAll(dirOrig(), dirMedium(), 0, 1080)
fmt.Println()
} }
func makeThumbnails() { func makeThumbnails() {
fmt.Println("thumbnails") fmt.Println("making thumbnails")
fmt.Println("----------")
var size uint var size uint
if artsy { if artsy {
size = 300 size = 300
@ -352,7 +347,6 @@ func makeThumbnails() {
size = 200 size = 200
} }
resizeAll(dirMedium(), dirSmall(), size, size) resizeAll(dirMedium(), dirSmall(), size, size)
fmt.Println()
} }
type Flags struct { type Flags struct {