Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5619834

Browse files
authored
Updated README to distribute binaries.
2 parents bbef981 + 26e44c4 commit 5619834

File tree

8 files changed

+44
-25
lines changed

8 files changed

+44
-25
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ exifsort
66
exifsort.linux
77
exifsort.darwin
88
exifsort.windows
9+
!/release/*/exifsort
910

1011
# Goland
1112
.idea/

Makefile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
.PHONY: fix vet fmt test build tidy lint build_linux build_darwin build_windows docs
15+
.PHONY: fix vet fmt test build tidy lint release
1616

1717
default: build
1818

@@ -24,14 +24,10 @@ REPO_GODOC := golang.org/x/tools/cmd/godoc
2424
build:
2525
go build -v
2626

27-
build_linux:
28-
env GOOS=linux GOARCH=amd64 go build -v -o exifsort.linux
29-
30-
build_darwin:
31-
env GOOS=darwin GOARCH=amd64 go build -v -o exifsort.darwin
32-
33-
build_windows:
34-
env GOOS=windows GOARCH=amd64 go build -v -o exifsort.windows
27+
release:
28+
env GOOS=linux GOARCH=amd64 go build -v -o release/linux/exifsort
29+
env GOOS=darwin GOARCH=amd64 go build -v -o release/darwin/exifsort
30+
env GOOS=windows GOARCH=amd64 go build -v -o release/windows/exifsort
3531

3632
all: fix vet fmt tidy build lint test
3733

README.md

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ files on those servers.
1818

1919
exifsort will process these [file extensions](https://godoc.org/github.com/matchstick/exifsort/lib#pkg-constants) and skip other files.
2020

21-
# Overview
21+
## Overview
2222

2323
The library and API live in the lib directory. Check out
2424
[exifsort/lib godocs](https://godoc.org/github.com/matchstick/exifsort/lib).
@@ -34,13 +34,30 @@ to determine how to sort the media. If it cannot find exif data it uses file mod
3434

3535
## Installation
3636

37-
To build exifsort you need to use standard Makefile.
37+
### Install from binaries
3838

39-
`$ make`
39+
| Platform |
40+
|----------|
41+
| [Linux (x64)](release/linux/exifsort) |
42+
| [macOS (x64)](release/darwin/exifsort) |
43+
| [Windows (x64)](release/windows/exifsort) |
4044

41-
Creates exifsort.
45+
```sh
46+
# For linux/mac
47+
chmod +x exifsort
4248

43-
Cross compilation is also supported in the Makefile.
49+
./exifsort version
50+
```
51+
52+
Note: To run on MacOS the first time, it may be necessary to open the program from the finder with ctrl-click open.
53+
### Install from source
54+
55+
```sh
56+
$ GO111MODULE=on go get -v github.com/matchstick/exifsort
57+
$ cd `go env GOPATH`
58+
$ cd src/github.com/matchstick/exifsort
59+
$ make
60+
```
4461

4562
## Usage
4663

@@ -57,7 +74,7 @@ JSON Example:
5774

5875
`$ exifsort sort copy month random.json sortedNew/`
5976

60-
# Stages
77+
### Stages
6178

6279
exifsort is intended to be used in sequential stages.
6380

@@ -67,7 +84,7 @@ exifsort is intended to be used in sequential stages.
6784
| Sort | Use scan mapping to transfer files to newly created sorted directory organized by a method. |
6885
| Merge | Transfer files from one sorted directory to another sorted directory. |
6986

70-
## Methods
87+
### Methods
7188

7289
Sorted directories are organized by a method.
7390

@@ -77,9 +94,9 @@ Sorted directories are organized by a method.
7794
| Month | dst -> year-> month -> media | dst/2020/2020_04/pic.jpg |
7895
| Day | dst -> year-> month -> day -> media | dst/2020/2020_4/20202_04_12/pic.jpg |
7996

80-
# Commands
97+
## Commands
8198

82-
## scan
99+
### scan
83100

84101
**exifsort scan** reads the data from the directory of files, and builds a mapping of path to time created.
85102

@@ -93,7 +110,7 @@ You can save data to a json file too:
93110

94111
`$ exifsort scan data/ -j src.json`
95112

96-
## sort
113+
### sort
97114

98115
The sort command performs a number of steps. It can also optionally scan and sort in one command.
99116

@@ -124,7 +141,7 @@ You don't want to modify the directory that you scanned to generate the json
124141
file between generating it and then sorting. This allow you to only scan
125142
once.
126143

127-
## merge
144+
### merge
128145

129146
Merge output from a sorted directory to another sorted directory.
130147

@@ -139,15 +156,15 @@ Will merge two sorted directories and **move** files from one to the other.
139156
When using subcommand **merge** and **move** together exifsort removes duplicates in the
140157
src directory.
141158

142-
## filter
159+
### filter
143160

144161
Filter is identical to merge except it accepts a regular expression as an argument.
145162
This is used to match the files in the src diretory. Only those that match are
146163
then merged to the dst directory.
147164

148165
`$ exifsort filter src/ dst/ "regex"`
149166

150-
## eval
167+
### eval
151168

152169
scans by file not directory. Prints the date information of files specified.
153170

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ require (
1313
github.com/spf13/viper v1.7.0
1414
github.com/stretchr/objx v0.2.0 // indirect
1515
github.com/udhos/equalfile v0.3.0
16-
golang.org/x/tools v0.0.0-20200706180831-95bc2bdf7e31 // indirect
16+
golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7 // indirect
1717
)

go.sum

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q
445445
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
446446
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
447447
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
448+
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
448449
go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
449450
go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
450451
go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
@@ -461,6 +462,7 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
461462
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
462463
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
463464
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
465+
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
464466
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
465467
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
466468
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -516,6 +518,8 @@ golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/
516518
golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
517519
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2 h1:eDrdRpKgkcCqKZQwyZRyeFZgfqt37SL7Kv3tok06cKE=
518520
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
521+
golang.org/x/net v0.0.0-20200625001655-4c5254603344 h1:vGXIOMxbNfDTk/aXCmfdLgkrSV+Z2tcbze+pEc3v5W4=
522+
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
519523
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
520524
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
521525
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -527,6 +531,7 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ
527531
golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
528532
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
529533
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
534+
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
530535
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
531536
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
532537
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -611,8 +616,8 @@ golang.org/x/tools v0.0.0-20200519015757-0d0afa43d58a/go.mod h1:EkVYQZoAsY45+roY
611616
golang.org/x/tools v0.0.0-20200625211823-6506e20df31f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
612617
golang.org/x/tools v0.0.0-20200702044944-0cc1aa72b347 h1:/e4fNMHdLn7SQSxTrRZTma2xjQW6ELdxcnpqMhpo9X4=
613618
golang.org/x/tools v0.0.0-20200702044944-0cc1aa72b347/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
614-
golang.org/x/tools v0.0.0-20200706180831-95bc2bdf7e31 h1:wNo56hdB7qh+ACt0fjErJ+RKPLPHJeFQhvSyiJdOThM=
615-
golang.org/x/tools v0.0.0-20200706180831-95bc2bdf7e31/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
619+
golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7 h1:JxpwOnW/RU5vsiwsDw3eqto/7ccehcv162Xma5/FHoI=
620+
golang.org/x/tools v0.0.0-20200706234117-b22de6825cf7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
616621
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
617622
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
618623
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=

release/darwin/exifsort

31.3 MB
Binary file not shown.

release/linux/exifsort

28.3 MB
Binary file not shown.

release/windows/exifsort

26.6 MB
Binary file not shown.

0 commit comments

Comments
 (0)