summaryrefslogtreecommitdiff
path: root/cmd/getpipelinebook
diff options
context:
space:
mode:
authorAntonia Rescribe <antonia@rescribe.xyz>2021-12-20 12:06:30 +0000
committerNick White <git@njw.name>2021-12-20 12:27:56 +0000
commit2e3bef288256fe25f982b9adeaacd2930cccd21e (patch)
tree9b7612e82c2ff3c5b4885a55d0d2ce819ff10fc4 /cmd/getpipelinebook
parent3e953e66d02416270356d0d7d3b6ea2df0260c77 (diff)
fixed -png flag and changed rescribe tool to save binarized png in separate folder
Diffstat (limited to 'cmd/getpipelinebook')
-rw-r--r--cmd/getpipelinebook/main.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/getpipelinebook/main.go b/cmd/getpipelinebook/main.go
index ccedd72..965f9f7 100644
--- a/cmd/getpipelinebook/main.go
+++ b/cmd/getpipelinebook/main.go
@@ -40,7 +40,7 @@ func main() {
binarisedpdf := flag.Bool("binarisedpdf", false, "Only download binarised PDF (can be used alongside -graph)")
colourpdf := flag.Bool("colourpdf", false, "Only download colour PDF (can be used alongside -graph)")
pdf := flag.Bool("pdf", false, "Only download PDFs (can be used alongside -graph)")
- png := flag.Bool("png", false, "Only download best binarised png files")
+ png := flag.Bool("png", false, "Should only download best binarised png files")
verbose := flag.Bool("v", false, "Verbose")
flag.Usage = func() {
fmt.Fprintf(flag.CommandLine.Output(), usage)
@@ -124,13 +124,18 @@ func main() {
verboselog.Println("Downloading PDFs")
pipeline.DownloadPdfs(bookname, bookname, conn)
}
+
+ if *png {
+ verboselog.Println("Downloading best PNGs")
+ pipeline.DownloadBestPngs(bookname, bookname, conn)
+ }
if *binarisedpdf || *colourpdf || *graph || *pdf {
return
}
verboselog.Println("Downloading best pages")
- err = pipeline.DownloadBestPages(bookname, bookname, conn, *png)
+ err = pipeline.DownloadBestPages(bookname, bookname, conn)
if err != nil {
log.Fatalln(err)
}