Skip to content
This repository has been archived by the owner on Jun 27, 2020. It is now read-only.

Commit

Permalink
Uncommented ISBN/date code
Browse files Browse the repository at this point in the history
  • Loading branch information
pgaskin committed Mar 17, 2019
1 parent 1235641 commit 3f9279a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions formats/mobi/mobi.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ import (
"io"
"os"
"path/filepath"
"time"

"github.com/geek1011/BookBrowser/booklist"
"github.com/geek1011/BookBrowser/formats"
"github.com/moraes/isbn"
"github.com/pkg/errors"

mobirdr "github.com/sblinch/mobi"
Expand Down Expand Up @@ -106,14 +108,12 @@ func load(filename string) (bi formats.BookInfo, ferr error) {
m.book.Description = r.Description()
m.book.Publisher = r.Publisher()

/* // uncomment and import github.com/moraes/isbn after merging ISBN/publishing date pull request :)
isbnStr := r.Isbn()
if len(isbnStr)>0 && isbn.Validate(isbnStr) {
m.book.ISBN = isbnStr
}

m.book.PublishDate = parsePublishDate(r.PublishingDate())
*/

if len(m.book.Title)==0 {
m.book.Title = filepath.Base(filename)
Expand All @@ -128,7 +128,6 @@ func init() {
formats.Register("azw3", load)
}

/* // uncomment after merging ISBN/publishing date pull request :)
func parsePublishDate(s string) time.Time {
// handle the various dumb decisions people make when encoding dates
format := ""
Expand Down Expand Up @@ -160,4 +159,3 @@ func parsePublishDate(s string) time.Time {
}
return t
}
*/

0 comments on commit 3f9279a

Please sign in to comment.