Skip to content

Commit 2d07bef

Browse files
committed
renamed and more info
1 parent ba01956 commit 2d07bef

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ These are some little tools for [facebox](https://machinebox.io/docs/facebox), t
77
`faceboxteach` is a tool that walks a directory structure teaching each
88
image file.
99

10+
To install it:
11+
```
12+
$ go get github.com/machinebox/faceboxtools/faceboxteach
13+
```
14+
1015
The folder name should be the `name` of the person, and the filenames will become
1116
the `id` in facebox.
1217

@@ -49,15 +54,18 @@ $ faceboxteach -dir=/path/to/directory -images=.jpg -facebox=http://localhost:80
4954

5055
`faceboxtag` is a tool that walks a directory structure and outputs the people that recognise
5156

57+
To install it:
58+
```
59+
$ go get github.com/machinebox/faceboxtools/faceboxtag
60+
```
61+
5262
```
5363
├── photos
5464
│   ├── whoisthis.jpg
5565
│   ├── unknown.jpg
5666
│   └── ????.jpg
5767
```
5868

59-
* Underscores are translated into spaces for a better experience
60-
6169
To find out who is on the photos, will be on the output
6270

6371
```

faceboxtag/faceboxtag.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ func main() {
2222
faceboxClient := facebox.New(*faceboxAddr)
2323

2424
filepath.Walk(*dir, func(path string, info os.FileInfo, err error) error {
25+
if err != nil {
26+
log.Fatal(err)
27+
}
2528
if !strings.HasSuffix(info.Name(), *images) {
2629
return nil
2730
}

faceboxteach/faceboxteach.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ func main() {
3838
log.Println("box ready")
3939

4040
filepath.Walk(*dir, func(path string, info os.FileInfo, err error) error {
41+
if err != nil {
42+
log.Fatal(err)
43+
}
4144
if !strings.HasSuffix(info.Name(), *images) {
4245
return nil
4346
}

0 commit comments

Comments
 (0)