Skip to content

Commit

Permalink
Fixed asking for web metadata when doi provided
Browse files Browse the repository at this point in the history
  • Loading branch information
cgxeiji committed Nov 4, 2018
1 parent daf6136 commit f78993b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scholar/cmd/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ TODO: Add a flag for manual/auto input of metadata
if _, err := os.Stat(file); os.IsNotExist(err) {
if search == "" {
doi := addDoi
if !requestManual("Would you like to search the web for metadata?") {
doi = query(requestSearch())
}
if doi != "" {
fmt.Println("Getting metadata from doi")
entry = addDOI(doi)
} else {
if !requestManual("Would you like to search the web for metadata?") {
doi = query(requestSearch())
}
fmt.Println()
fmt.Println("Adding the entry manually...")
fmt.Println("What kind of entry is it?")
Expand Down

0 comments on commit f78993b

Please sign in to comment.