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

Remove duplicate images from image gallery at start of Web Page #8

Closed
dteviot opened this issue Jun 22, 2016 · 2 comments
Closed

Remove duplicate images from image gallery at start of Web Page #8

dteviot opened this issue Jun 22, 2016 · 2 comments

Comments

@dteviot
Copy link
Owner

dteviot commented Jun 22, 2016

Many Baka-Tsuki web pages have an image gallery at the start of the web page.
Some of these images also appear in the story text.
Provide an option to have the ePUB generator remove any images in the gallery that also appear in the text.

Suggested implementation notes.

    • BakaTsukiImageCollector.prototype.findImagesUsedInDocument() is used to do an initial scan of the document, collecting information on each image. This scan should be updated to check if image element is nested inside a list element of class gallerybox. If image element is not nested inside gallerybox, add flag to imageInfo that it appears outside gallery.
    • Later on BakaTsukiParser.prototype.processImages() is used to replace the image elements. This should be updated to check that if element is nested inside a gallery box, and the image is also not in a gallery box, then remove the element.

(Obviously, the above processing needs to be done BEFORE the images in the gallerybox are “flattened” to be outside the box.)

@belldandu
Copy link
Collaborator

Finished in #10

@dteviot
Copy link
Owner Author

dteviot commented Jun 25, 2016

Implemented in release 0.0.0.4

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