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

Please add site --> https://salmonlatte.com/ #1216

Closed
bonnetchuu opened this issue Feb 23, 2024 · 4 comments
Closed

Please add site --> https://salmonlatte.com/ #1216

bonnetchuu opened this issue Feb 23, 2024 · 4 comments

Comments

@bonnetchuu
Copy link

bonnetchuu commented Feb 23, 2024

Provide URL for web page that contains Table of Contents (list of chapters) of a typical story on the site

https://salmonlatte.com/novel/returning-to-infancy-with-my-nemesis/

Did you try using the Default Parser for the site? If not, why not?

Yes, I did, but the output was rather messy due to the type of site layout.

Just for a note, this site has the same structure and look as: https://www.foxaholic.com/

Thank you very much~

@dteviot
Copy link
Owner

dteviot commented Feb 23, 2024

@bonnetchuu

FYI. Site is using the Madara theme.
I tried https://salmonlatte.com/novel/returning-to-infancy-with-my-nemesis/, chapter 1, and it seems to work adequately.

Yes, I did, but the output was rather messy due to the type of site layout.

Please provide details. Note, I reserve the right to do nothing on basis that results won't be worth the effort.

For my notes: 11 minutes work.

@bonnetchuu
Copy link
Author

bonnetchuu commented Feb 24, 2024

When an epub is generated from this site, at the footer of each xhtml file is a bunch of extraneous html elements being pulled in due to the lack of specificity in which exact content the epub should preferably output (i.e. only the main heading and chapter text, like foxaholic). As shown below:

                    <div class="pp-multiple-authors-boxes-wrapper pp-multiple-authors-wrapper pp-multiple-authors-layout-boxed multiple-authors-target-the-content box-post-id-2611 box-instance-id-1 ppma_boxes_2611" data-post_id="2611" data-instance_id="1" data-additional_class="pp-multiple-authors-layout-boxed.multiple-authors-target-the-content" data-original_class="pp-multiple-authors-boxes-wrapper pp-multiple-authors-wrapper box-post-id-2611 box-instance-id-1">
                                                                                    <h2 class="widget-title box-header-title">Translator</h2>
                                                                            <span class="ppma-layout-prefix"></span>
                        <div class="ppma-author-category-wrap">
                                                                                                
                                                                                                                        <ul class="pp-multiple-authors-boxes-ul">
                                                                                                                                                                                                                                                                                                                                                                                                                    <li class="pp-multiple-authors-boxes-li author_index_0 author_curiosoth has-avatar">
                                                                                                                                                                                                                                            <div class="pp-author-boxes-avatar">
                                                                                                                                            <div><img src="../Images/0002.png" alt="" /><!--  https://secure.gravatar.com/avatar/566dc821ce04c82f27208e4786c3ea0c?s=160&r=g  --></div>                                                                                                                                    </div>
                                                            
                                                            <div class="pp-author-boxes-avatar-details">
                                                                                                                                                                                                <div class="pp-author-boxes-name multiple-authors-name">
                                                                        <a href="https://salmonlatte.com/author/curiosoth/" rel="author" title="curiosoth" class="author url fn">curiosoth</a> 
                                                                    </div>
                                                                                                                                                                                                                                                                    <p class="pp-author-boxes-description multiple-authors-description">
                                                                                                                                            </p>
                                                                                                                                
                                                                                                                                    <p class="pp-author-boxes-meta multiple-authors-links">
                                                                                                                                                    <a href="https://salmonlatte.com/author/curiosoth/" title="View all posts">
                                                                                <span>View all posts</span>
                                                                            </a>
                                                                                                                                                                                                                                                                                            </p>
                                                                                                                                
                                                                                                                            </div>
                                                                                                                                                                                                                                                                                                                                                                                                             </li>
                                                                                                                                                                                                                                    </ul>
                                                                            
                                                                                    </div>
                    <span class="ppma-layout-suffix"></span>
                    </div>
                    
                    
                
                                <style>
                .pp-multiple-authors-boxes-wrapper.box-post-id-2611.pp-multiple-authors-layout-boxed.multiple-authors-target-the-content.box-instance-id-1 .box-header-title { font-size: 16px !important; } .pp-multiple-authors-boxes-wrapper.box-post-id-2611.pp-multiple-authors-layout-boxed.multiple-authors-target-the-content.box-instance-id-1 .box-header-title { text-align: left !important; } .pp-multiple-authors-boxes-wrapper.box-post-id-2611.pp-multiple-authors-layout-boxed.multiple-authors-target-the-content.box-instance-id-1 .box-header-title { color: #000000 !important; } .pp-multiple-authors-boxes-wrapper.box-post-id-2611.pp-multiple-authors-layout-boxed.multiple-authors-target-the-content.box-instance-id-1 .pp-author-boxes-avatar img { width: 80px !important; height: 80px !important; } .pp-multiple-authors-boxes-wrapper.box-post-id-2611.pp-multiple-authors-layout-boxed.multiple-authors-target-the-content.box-instance-id-1 .pp-author-boxes-avatar img { border-style: none !important; } .pp-multiple-authors-boxes-wrapper.box-post-id-2611.pp-multiple-authors-layout-boxed.multiple-authors-target-the-content.box-instance-id-1 .pp-author-boxes-avatar img { border-radius: 50% !important; } .pp-multiple-authors-boxes-wrapper.box-post-id-2611.pp-multiple-authors-layout-boxed.multiple-authors-target-the-content.box-instance-id-1 .pp-author-boxes-meta a { background-color: #655997 !important; } .pp-multiple-authors-boxes-wrapper.box-post-id-2611.pp-multiple-authors-layout-boxed.multiple-authors-target-the-content.box-instance-id-1 .pp-author-boxes-meta a { color: #ffffff !important; } .pp-multiple-authors-boxes-wrapper.box-post-id-2611.pp-multiple-authors-layout-boxed.multiple-authors-target-the-content.box-instance-id-1 .pp-author-boxes-meta a:hover { color: #ffffff !important; } .pp-multiple-authors-boxes-wrapper.box-post-id-2611.pp-multiple-authors-layout-boxed.multiple-authors-target-the-content.box-instance-id-1 .pp-author-boxes-recent-posts-title { border-bottom-style: dotted !important; } .pp-multiple-authors-boxes-wrapper.box-post-id-2611.pp-multiple-authors-layout-boxed.multiple-authors-target-the-content.box-instance-id-1 .pp-multiple-authors-boxes-li { border-style: dotted !important; } .pp-multiple-authors-boxes-wrapper.box-post-id-2611.pp-multiple-authors-layout-boxed.multiple-authors-target-the-content.box-instance-id-1 .pp-multiple-authors-boxes-li { color: #3c434a !important; }             </style>

Some redundant elements from within the header are also needlessly outputted into the epub (at the beginning of each xhtml file) as well:

<div class="text-left">
				<style>
	.coin {
    display: none !important;
}
</style>
<div class="svg_outer svg_inner"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" height="99%" width="100%" version="1.1" preserveAspectRatio="xMidYMid meet" viewBox="0 0 1600 1200"><image xlink:href="../Images/0000.html; charset=UTF-8" width="1600" height="1200"/><desc>https://salmonlatte.com/novel/returning-to-infancy-with-my-nemesis/chapter-1-young-fu-shizhao-is-still-cute/#</desc></svg></div>

But, if this does require too much time to do, then that's fine too haha.

@dteviot
Copy link
Owner

dteviot commented Feb 24, 2024

@bonnetchuu
You can use EpubEditor to clean up the epubs after you create them.
See: dteviot/EpubEditor#4

This script should remote the footers

let toChange = [...dom.querySelectorAll("div.pp-multiple-authors-boxes-wrapper")];
for(let s of toChange) {
    s.removeAttribute("style");
}
return 0 < toChange.length;

@bonnetchuu
Copy link
Author

Thank you for the script, but it didn't quite work... Though, not to waste more of your time, after looking through the page source for a second runthrough (since I probably missed some minute details), I was able to better utilise the Default Parser and grab only the novel content, removing all the extraneous elements :) but thank you much for the guided assistance thus far.

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