Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smart autofix features #49

Open
127 opened this issue Jul 2, 2014 · 4 comments
Open

Smart autofix features #49

127 opened this issue Jul 2, 2014 · 4 comments

Comments

@127
Copy link
Contributor

127 commented Jul 2, 2014

What about some «clever features»:

  1. auto add xml declaration if does not exist
    <?xml version="1.0" encoding="utf-8"?>
  2. auto fix if <html> to valid <html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="ru-RU" lang="en-EN">
  3. set valid xml notation via applying nokogiri preparsing to enpacked xhtml (will quickfix forgotten /> etc)
@skoji
Copy link
Owner

skoji commented Jul 3, 2014

Thanks. These features look good for me.

But gepub still have some important but missing features (e.g. API to traverse EPUB) to be implemented, so I can not work on this feature request yet. Maybe after release of version 1.0.

Pull request for these features are welcome.

@127
Copy link
Contributor Author

127 commented Jul 3, 2014

Ok, I'll try to implement. How do you see it (as far as I don't want to intrude your architecture :-) )? As a parametric feature on setting up constructor or just a couple of methods respectively?

@skoji
Copy link
Owner

skoji commented Jul 4, 2014

How about API like this?

book = GEPUB::Book.new {
  |book|
  # add resources
}

book.normalize_content_xhtml
book.generate_epub('path_to_epub.epub')

@127
Copy link
Contributor Author

127 commented Jul 7, 2014

Ok, will try )

@skoji skoji changed the title Features request Smart autofix features May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants