Skip to content

Commit 71e2027

Browse files
committed
move main package to root directory
1 parent b7c561b commit 71e2027

File tree

14 files changed

+15
-14
lines changed

14 files changed

+15
-14
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ BUILD_TIME := $(shell date "+%F %T")
22
COMMIT_ID := $(shell git rev-parse HEAD)
33
BUILD_VERSION := $(shell git describe --tags $(COMMIT_ID))
44

5-
Package := "github.com/ma6254/FictionDown/cmd/FictionDown"
5+
Package := "github.com/ma6254/FictionDown"
66

77
LDFLAG := "\
88
-s -w \
@@ -19,7 +19,7 @@ build:
1919
go build -v --ldflags $(LDFLAG) $(Package)
2020

2121
multiple_build:
22-
gox -osarch="linux/arm" -osarch="linux/amd64" --osarch="darwin/amd64" -osarch="windows/amd64" -ldflags $(LDFLAG) -output "{{.Dir}}_$(BUILD_VERSION)_{{.OS}}_{{.Arch}}" github.com/ma6254/FictionDown/cmd/FictionDown
22+
gox -osarch="linux/arm" -osarch="linux/amd64" --osarch="darwin/amd64" -osarch="windows/amd64" -ldflags $(LDFLAG) -output "{{.Dir}}_$(BUILD_VERSION)_{{.OS}}_{{.Arch}}" $(Package)
2323

2424
install:
2525
go install --ldflags $(LDFLAG) $(Package)

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,11 @@ GLOBAL OPTIONS:
161161
包管理为 gomod
162162

163163
```bash
164-
go get github.com/ma6254/FictionDown/cmd/FictionDown
164+
go get github.com/ma6254/FictionDown
165165
```
166166

167-
交叉编译需要安装 gox
167+
交叉编译这几个平台的可执行文件:`linux/arm` `linux/amd64` `darwin/amd64` `windows/amd64`
168168

169-
`make multiple_build`
169+
```bash
170+
make multiple_build
171+
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

fictiondown.go

Lines changed: 0 additions & 3 deletions
This file was deleted.

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ require (
99
github.com/bmaupin/go-epub v0.5.0
1010
github.com/chromedp/chromedp v0.3.0
1111
github.com/fatih/color v1.7.0 // indirect
12-
github.com/go-yaml/yaml v2.1.0+incompatible
1312
github.com/kr/pretty v0.1.0 // indirect
1413
github.com/mattn/go-colorable v0.1.1 // indirect
1514
github.com/mattn/go-runewidth v0.0.4 // indirect

go.sum

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ github.com/chromedp/chromedp v0.3.0 h1:7/pwrXFRq6/ym3sxCykm90DMoyw6VKXY48DgGRgUU
1212
github.com/chromedp/chromedp v0.3.0/go.mod h1:EktsZcC2iycVrRhC9fDmshBpCK9lNnZYi6x2q9uE7zI=
1313
github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys=
1414
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
15-
github.com/go-yaml/yaml v2.1.0+incompatible h1:RYi2hDdss1u4YE7GwixGzWwVo47T8UQwnTLB6vQiq+o=
16-
github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0=
1715
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0=
1816
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
1917
github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8=
@@ -56,7 +54,5 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33
5654
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
5755
gopkg.in/cheggaaa/pb.v1 v1.0.28 h1:n1tBJnnK2r7g9OW2btFH91V92STTUevLXYFb8gy9EMk=
5856
gopkg.in/cheggaaa/pb.v1 v1.0.28/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
59-
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
60-
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
6157
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
6258
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
File renamed without changes.
File renamed without changes.
File renamed without changes.

site/sites.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@ func Type1BookInfo(nameExpr, coverExpr, authorExpr, chapterExpr string) func(bod
3636
return
3737
}
3838
s = &store.Store{}
39-
s.BookName = htmlquery.InnerText(htmlquery.FindOne(doc, nameExpr))
39+
var tmpNode *html.Node
40+
41+
tmpNode = htmlquery.FindOne(doc, nameExpr)
42+
if tmpNode == nil {
43+
err = fmt.Errorf("No matching bookName")
44+
return
45+
}
46+
s.BookName = htmlquery.InnerText(tmpNode)
4047

4148
if coverExpr == "" {
4249
// log.Printf("Empty Cover Image Expr")
File renamed without changes.

0 commit comments

Comments
 (0)