Skip to content

Commit

Permalink
Merge pull request #124 from yann0917/develop
Browse files Browse the repository at this point in the history
🐛 fixed
  • Loading branch information
yann0917 authored Sep 2, 2022
2 parents b5695a8 + e9269b2 commit 42b5109
Show file tree
Hide file tree
Showing 6 changed files with 125 additions and 60 deletions.
9 changes: 7 additions & 2 deletions cmd/app/ebook.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ func EbookPage(title, enID string) (pages *services.EbookPage, err error) {
return
}
var svgContent []string
// fmt.Printf("%#v\n", info.BookInfo.Pages)
// fmt.Printf("%#v\n", info.BookInfo.EbookBlock)
// fmt.Printf("%#v\n", info.BookInfo.Toc)
// fmt.Printf("%#v\n", info.BookInfo.Orders)
for _, order := range info.BookInfo.Orders {

index, count, offset := 0, 20, 0
Expand All @@ -56,7 +60,7 @@ func EbookPage(title, enID string) (pages *services.EbookPage, err error) {

}
if len(svgContent) > 0 {
utils.Svg2Html(title, svgContent)
err = utils.Svg2Html(title, svgContent)
}
return
}
Expand All @@ -83,6 +87,7 @@ func generateEbookPages(chapterID, token string, index, count, offset int) (svgL

svgList = append(svgList, list...)
}
// utils.WriteFileWithTrunc(chapterID+".svg", strings.Join(svgList, "\n"))
// FIXME: debug
// err = utils.SaveFile(chapterID, "", strings.Join(svgList, "\n"))
return
}
18 changes: 12 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,26 @@ require (
github.com/SebastiaanKlippert/go-wkhtmltopdf v1.7.2
github.com/VividCortex/ewma v1.2.0 // indirect
github.com/cheggaaa/pb/v3 v3.1.0
github.com/chromedp/cdproto v0.0.0-20220629234738-4cfc9cdeeb92
github.com/chromedp/chromedp v0.8.2
github.com/chromedp/cdproto v0.0.0-20220901095120-1a01299a2163
github.com/chromedp/chromedp v0.8.5
github.com/fatih/color v1.13.0 // indirect
github.com/go-rod/rod v0.108.1
github.com/imroc/req/v3 v3.14.0
github.com/go-rod/rod v0.109.3
github.com/imroc/req/v3 v3.22.0
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/json-iterator/go v1.1.12
github.com/mattn/go-colorable v0.1.12
github.com/lucas-clemente/quic-go v0.29.0 // indirect
github.com/mattn/go-colorable v0.1.13
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/mitchellh/mapstructure v1.5.0
github.com/olekukonko/tablewriter v0.0.5
github.com/pkg/errors v0.9.1
github.com/rivo/uniseg v0.3.4 // indirect
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
github.com/spf13/cobra v1.5.0
github.com/stretchr/testify v1.8.0 // indirect
github.com/ysmood/gson v0.7.2 // indirect
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect
golang.org/x/exp v0.0.0-20220827204233-334a2380cb91 // indirect
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b // indirect
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 // indirect
)
Loading

0 comments on commit 42b5109

Please sign in to comment.