Hi, Yes, this is correct, it generates epub files in versions 20/30. But it is an initial version, you really can gernerate the epubs and open in iBooks and Adobe. But it is has a long way to evolve yet. The example can be found at https://godoc.org/github.com/luisfurquim/ugarit/epub30#ex-package . The README will come soon, I just hadn't the time yet, I focused on godocs first and it is still incomplete. About the *EPubOptions x interface{}: the method has to satisfy the ugarit.Book interface, which, in turn, is not thought to be tied to EPub, but leave room to be satisfied by other eBook formats. So, I decided to create an interface parameter letting any package to define it's own options. But I recognize that this decision is exactly the type I wished to be put in question, I am aware that bad decisions may ruin an entire API.
The lacking of go fmt/vet: my bad. Will be corrected at the next version! I can't dive into code and look at the other comments right now. I'll do it at night (here is 10:30 AM now), then I'll send another mail. And yes, your comments are of a great help for me! Thank you! Luis Otavio de Colla Furquim Em segunda-feira, 15 de maio de 2017 09:30:20 UTC-3, mhh...@gmail.com escreveu: > > HI, > > some feedback, > > So this package generates epub files ? In versions 20 / 30 ? > Is it correct ? > > Can you add an example to use it ? > Small one. > > My very personal taste, > I love useful READMEs. > > On the code itself, > i suspect you don t know yet about *go fmt*, > I strongly suggest you to use it, > just because its a great idea. > > https://github.com/luisfurquim/ugarit/blob/master/epub20/book.go#L66 > This hurts :O *if (len(metatag)>0) {* > > See also go vet. > > (generally speaking a good IDE will provide that for you, > for example i use atom+go-plus: great) > > Then, lots of small things here and there, > > https://github.com/luisfurquim/ugarit/blob/master/epub30/book.go#L126 > I don t think you need to init values here, see > https://play.golang.org/p/eN9cT9gQlE > > https://github.com/luisfurquim/ugarit/blob/master/epub30/book.go#L137 > This kind of construction is redundant, en is the default value. > > https://github.com/luisfurquim/ugarit/blob/master/epub30/book.go#L134 > This if *seems* useless > > https://github.com/luisfurquim/ugarit/blob/master/epub30/book.go#L258 > I did not get why options is a param of type interface{}, > within the method body it might *only* be an *EPubOptions. > Can it be a param of type *EPubOptions directly ? > > https://github.com/luisfurquim/ugarit/blob/master/epub30/book.go#L456 > twice consecutive and identical conditions. > > https://github.com/luisfurquim/ugarit/blob/master/epub30/book.go#L464 > I wonder. > > https://github.com/luisfurquim/ugarit/blob/master/epub30/book.go#L487 > take advantage of filepath.Join() + os.Separator ? maybe. > > https://github.com/luisfurquim/ugarit/blob/master/epub30/book.go#L626 > why 59? > > > I must say you took great care about error values and documentation > ...I m a small player in comparison :p > > was it helpful ? I don't know. > > > > On Sunday, May 14, 2017 at 10:49:44 PM UTC+2, Luis Furquim wrote: >> >> Hello Gophers! >> >> I am publishing a first barely usable version of an EPub eBook generator. >> It still has many improvements to be done. Documentation is poor but >> exists. There's an example in the epub30 package. Criticism would be a >> great help. I know it has much to be done. So, please be gentle! ;) >> >> Thank you all! >> Luis Otavio de Colla Furquim >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.