Giter VIP home page Giter VIP logo

cosmere-books's Issues

Windows: undefined method `epub_stylesheet` for Paru/Pandoc

I tried to find an API where epub_stylesheet was referenced for Paru or Pandoc, but I couldn't find anything. Again, this worked fine in my Ubuntu VM. Doesn't work in Windows.

[html] Generated HTML file
C:/Users/dkark/Documents/GitHub/cosmere-books/methods.rb:54:in `block in gen_epub': undefined method `epub_stylesheet' for #<Paru::Pandoc:0x0000000005389de8> (NoMethodError)
Did you mean?  epub_chapter_level
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/paru-0.3.0.0/lib/paru/pandoc.rb:137:in `instance_eval'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/paru-0.3.0.0/lib/paru/pandoc.rb:137:in `configure'
        from C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/paru-0.3.0.0/lib/paru/pandoc.rb:107:in `initialize'
        from C:/Users/dkark/Documents/GitHub/cosmere-books/methods.rb:49:in `new'
        from C:/Users/dkark/Documents/GitHub/cosmere-books/methods.rb:49:in `gen_epub'
        from C:/Users/dkark/Documents/GitHub/cosmere-books/methods.rb:93:in `generate'
        from oathbringer.rb:67:in `<main>'

Dragonsteel Prime in own section?

How it is right now, the Dragonsteel Prime chapters are with the WoK Prime chapters under the same name, which seems a little confusing to me. Is it a better idea to split them up?

Text alignment

In the epub, the chapter number and title are left aligned while the entire chapter text itself is center-aligned. It makes for a weird reading experience when all the text is centered.
I've checked the html file it generated, and it seems to center align the chapter title only, then right justify the epigraph, then the text is normal, but that's not what I see in the epub, so is this a configuration issue or a bug in pandoc ?

Chapter positions are wrong

Tried the script, thanks for that. I sent a PR #2 already, but I never did any ruby (and not willing to learn it either) so I'm filing an issue instead for this.
In the epub format, going directly to chapters in the table of contents jumps to the wrong page for some reason. It seems to be a few pages beyond the actual chapter. I tried Chapter 1, it jumped to page 17 instead of 13, and Chapter 7 jumps to page 90 insetad of 79. So it's not even a constant offset.

Page misalignment

This is a weird new bug that seems to be a side effect of 46e302c. The page is somehow misaligned in my reader. The text is properly aligned at the start of each chapter, then it slowly moves to the left with the next page shifting out from the right, the farther away you move from the chapter start.
It's hard to explain so I took some screenshots instead :
ob-issue-3
ob-issue-3_2
ob-issue-3_3

I don't understand why this would even happen in the epub reader since the reader is just supposed to render text.
Hopefully, it makes sense to you.

Rhythm of War Illustrations missing in epub and mobi formats

They're present in the html and pdf versions, but are missing from the epub and mobi versions. Some warnings are being thrown when I run the script:

> docker run --rm --volume "$(pwd):/output" captn3m0/cosmere-books:latest row
Downloading all found links
Download https://www.tor.com/2020/07/23/read-rhythm-of-war-by-brandon-sanderson-prologue-and-chapter-one/
Download https://www.tor.com/2020/07/28/read-rhythm-of-war-by-brandon-sanderson-chapters-two-and-three/
Download https://www.tor.com/2020/08/04/read-rhythm-of-war-by-brandon-sanderson-chapters-four-and-five/
Download https://www.tor.com/2020/08/11/read-rhythm-of-war-by-brandon-sanderson-chapter-six/
Download https://www.tor.com/2020/08/18/read-rhythm-of-war-by-brandon-sanderson-chapter-seven/
Download https://www.tor.com/2020/08/25/read-rhythm-of-war-by-brandon-sanderson-chapter-eight/
Download https://www.tor.com/2020/09/01/read-rhythm-of-war-by-brandon-sanderson-chapter-nine/
Download https://www.tor.com/2020/09/08/read-rhythm-of-war-by-brandon-sanderson-chapter-ten/
Download https://www.tor.com/2020/09/15/read-rhythm-of-war-by-brandon-sanderson-chapter-eleven/
Download https://www.tor.com/2020/09/22/read-rhythm-of-war-by-brandon-sanderson-chapter-twelve/
Download https://www.tor.com/2020/09/29/read-rhythm-of-war-by-brandon-sanderson-chapter-thirteen/
Download https://www.tor.com/2020/10/06/read-rhythm-of-war-by-brandon-sanderson-chapter-fourteen/
Download https://www.tor.com/2020/10/13/read-rhythm-of-war-by-brandon-sanderson-chapter-fifteen/
Download https://www.tor.com/2020/10/20/read-rhythm-of-war-by-brandon-sanderson-chapter-sixteen/
Download https://www.tor.com/2020/10/27/read-rhythm-of-war-by-brandon-sanderson-chapter-seventeen/
Download https://www.tor.com/2020/11/03/read-rhythm-of-war-by-brandon-sanderson-chapter-eighteen/
Download https://www.tor.com/2020/11/10/read-rhythm-of-war-by-brandon-sanderson-chapter-nineteen/
[html] Generated HTML file
[epub] Generated EPUB file
[WARNING] Could not fetch resource 'https://www.17thshard.com/forum/uploads/monthly_2020_11/5fa8c8182f0d8_Screenshot2020-11-09at04_34_59.png.bff6d91cfbdb0fc6f5d0b8760b82dd34.png': PandocHttpError "https://www.17thshard.com/forum/uploads/monthly_2020_11/5fa8c8182f0d8_Screenshot2020-11-09at04_34_59.png.bff6d91cfbdb0fc6f5d0b8760b82dd34.png" (HttpExceptionRequest Request {
    host                 = "www.17thshard.com"
    port                 = 443
    secure               = True
    requestHeaders       = []
    path                 = "/forum/uploads/monthly_2020_11/5fa8c8182f0d8_Screenshot2020-11-09at04_34_59.png.bff6d91cfbdb0fc6f5d0b8760b82dd34.png"
    queryString          = ""
    method               = "GET"
    proxy                = Nothing
    rawBody              = False
    redirectCount        = 10
    responseTimeout      = ResponseTimeoutDefault
    requestVersion       = HTTP/1.1
  }
   (ConnectionFailure Network.BSD.getProtocolByName: does not exist (no such protocol name: tcp)))
[WARNING] Could not fetch resource 'https://www.17thshard.com/forum/uploads/monthly_2020_11/5fa8c82234b92_Screenshot2020-11-09at04_35_28.png.5407ea8837260facc3a36b7eb9442e56.png': PandocHttpError "https://www.17thshard.com/forum/uploads/monthly_2020_11/5fa8c82234b92_Screenshot2020-11-09at04_35_28.png.5407ea8837260facc3a36b7eb9442e56.png" (HttpExceptionRequest Request {
    host                 = "www.17thshard.com"
    port                 = 443
    secure               = True
    requestHeaders       = []
    path                 = "/forum/uploads/monthly_2020_11/5fa8c82234b92_Screenshot2020-11-09at04_35_28.png.5407ea8837260facc3a36b7eb9442e56.png"
    queryString          = ""
    method               = "GET"
    proxy                = Nothing
    rawBody              = False
    redirectCount        = 10
    responseTimeout      = ResponseTimeoutDefault
    requestVersion       = HTTP/1.1
  }
   (ConnectionFailure Network.BSD.getProtocolByName: does not exist (no such protocol name: tcp)))
[WARNING] Could not fetch resource 'https://www.17thshard.com/forum/uploads/monthly_2020_11/5fa8c7ac2d020_Screenshot2020-11-09at04_34_33.png.dfab9f8de252466659c25db72d835cf5.png': PandocHttpError "https://www.17thshard.com/forum/uploads/monthly_2020_11/5fa8c7ac2d020_Screenshot2020-11-09at04_34_33.png.dfab9f8de252466659c25db72d835cf5.png" (HttpExceptionRequest Request {
    host                 = "www.17thshard.com"
    port                 = 443
    secure               = True
    requestHeaders       = []
    path                 = "/forum/uploads/monthly_2020_11/5fa8c7ac2d020_Screenshot2020-11-09at04_34_33.png.dfab9f8de252466659c25db72d835cf5.png"
    queryString          = ""
    method               = "GET"
    proxy                = Nothing
    rawBody              = False
    redirectCount        = 10
    responseTimeout      = ResponseTimeoutDefault
    requestVersion       = HTTP/1.1
  }
   (ConnectionFailure Network.BSD.getProtocolByName: does not exist (no such protocol name: tcp)))
[WARNING] This document format requires a nonempty <title> element.
  Please specify either 'title' or 'pagetitle' in the metadata,
  e.g. by using --metadata pagetitle="..." on the command line.
  Falling back to 'Untitled'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
[mobi] Generated MOBI file
[WARNING] This document format requires a nonempty <title> element.
  Please specify either 'title' or 'pagetitle' in the metadata,
  e.g. by using --metadata pagetitle="..." on the command line.
  Falling back to 'row'
[pdf] Generated html for pdf
[pdf] Generated PDF without cover
[pdf] Generated PDF file

Windows can't find ebook-convert

I'm on Win10. I have Calibre installed. I can run ebook-convert via command line and get the man page, but running ruby oathbringer.rb with an output of :mobi will always result in:

[html] Generated HTML file
[error] Can't generate MOBI without ebook-convert
[error] Please check README for PDF dependencies

I have all other dependencies (except PDF, but I'm running :mobi specifically).

Edit: Ran it in my Ubuntu VM and it worked fine. Windows still does not work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.