summaryrefslogtreecommitdiff
path: root/cmd/rescribe/gbook.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/rescribe/gbook.go')
-rw-r--r--cmd/rescribe/gbook.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/rescribe/gbook.go b/cmd/rescribe/gbook.go
index b1308cf..f0e9e1e 100644
--- a/cmd/rescribe/gbook.go
+++ b/cmd/rescribe/gbook.go
@@ -143,7 +143,7 @@ func moveFile(from string, to string) error {
// getGoogleBook downloads all images of a book to a directory
// named YEAR_AUTHORSURNAME_Title_bookid inside basedir, returning
// the directory path
-func getGoogleBook(ctx context.Context, id string, basedir string) (string, error) {
+func getGoogleBook(ctx context.Context, gbookcmd string, id string, basedir string) (string, error) {
author, title, year, err := getMetadata(id)
if err != nil {
return "", err
@@ -154,8 +154,7 @@ func getGoogleBook(ctx context.Context, id string, basedir string) (string, erro
return "", fmt.Errorf("Error setting up temporary directory: %v", err)
}
- // TODO: use embedded version if necessary
- cmd := exec.CommandContext(ctx, "getgbook", id)
+ cmd := exec.CommandContext(ctx, gbookcmd, id)
pipeline.HideCmd(cmd)
cmd.Dir = tmpdir
cmd.Stdout = os.Stdout