Giter VIP home page Giter VIP logo

epubinfo's People

Contributors

chdorner avatar christoffer avatar cyrret avatar freenerd avatar johankok avatar takahashim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

epubinfo's Issues

Can't parse cover images where the ID has a dot in it

We have a couple of Epubs that have dots in the cover image item ID, e.g.

<item id="cover.image" properties="cover.image" href="orm_front_cover.jpg" media-type="image/jpeg"/>

It fails to load the cover image file, because Nokogiri blows up when you try to get the item:

manifest.css("item [id = cover.image]")

We tried escaping the CSS selector, but that rendered no results instead of blowing up.

Cover parsing fails since Nokogiri 1.6.4

Nokogiri 1.6.4 / 2014-11-04 release announcement mentions this fix:

  • Fix a bug with CSS attribute selector without any prefix where "foo [bar]" was treated as "foo[bar]". (#1174)

Since this fix, cover parsing fails in /models/cover.rb.
Spaces should be removed in CSS attribute selectors in epub_cover_item method (lines 78 and 82 to 85).
Ex:
manifest.css("item [id = \"#{cover_id}\"]")
should become
manifest.css("item[id = \"#{cover_id}\"]")

I did not see any other impact of this Nokogiri fix in epubinfo.
Thanks.

Tags

Some epubs have dc:subject which are subject areas or "tags". I might look into a fork to add this, but it will probably be a while.

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.