Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 10:51 AM   #9991
Jager956
Member
Jager956 began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jun 2020
Device: Kindle PW3
Adding debug log:

(Removed log with a bunch of NFSW links. --JimmXinu)

Last edited by JimmXinu; Yesterday at 08:27 PM.
Jager956 is offline   Reply With Quote
Old Yesterday, 11:09 AM   #9992
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,547
Karma: 4277329
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Story downloads and updates fine for me.

The log basically shows a mismatch between versions of files within the plugin. Theoretically, this shouldn't happen. In practice, we have seen it a few times.

I would try:
  1. Deleting the plugin from Calibre (your settings will not be removed).
  2. Restart Calibre, confirm the plugin is removed.
  3. Download the plugin manually from first post.
  4. Install manually, Calibre Preferences, Plugins(lower left), Load plugin from file button(lower right).
  5. Restart Calibre.
See Introduction to plugins and look for "How do I install a plugin manually?" if you want more detailed instructions.

FYI, logs should ideally be wrapped in [spoiler] and [code] tags (vs [quote]) or attached as txt files.
Spoiler:
Code:
Like this.
JimmXinu is offline   Reply With Quote
Old Yesterday, 05:17 PM   #9993
Jager956
Member
Jager956 began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Jun 2020
Device: Kindle PW3
Thanks for ideas, I did as you proposed, however issue still persists.
I followed all 5 steps. Still same error when trying to download stories.

Did some more tests, results are weird.

1. Tried command line as you suggested in another thread:
"c:\program files\calibre2\calibre-debug" --run-plugin FanFicFare https://storiesonline.net/s/66637/citizen-miller

Book downloaded without issues into folder (not added to calibre)

2. Tried some random book from royalroad.com with calibre and FFF: download successful!

3. Tried again some other book from SOL: same problem as before.

Debug log:

(Removed log with a bunch of NFSW links. --JimmXinu)

Last edited by JimmXinu; Yesterday at 08:28 PM.
Jager956 is offline   Reply With Quote
Old Yesterday, 08:26 PM   #9994
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,547
Karma: 4277329
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Test Version Posted

2024-09-28
- Fix(es) for get_url_search not found when seriesUrl doesn't match an adapter site.
- Fix for regression when browser_cache_simple_header_old added. Closes #1104

Quote:
Originally Posted by Jager956 View Post
2. Tried some random book from royalroad.com with calibre and FFF: download successful!

3. Tried again some other book from SOL: same problem as before.
I'll be honest--when I saw the same error as another user reported prior (with solution no less), I didn't look very deeply. So points to you for being persistent.

There is a bug here. But it's obscure. I mean really obscure. As in, you may be the only user who would ever see it.

When I updated the code to move the get_url_search() code to the adapters, I included a 'last ditch' case for not matching the search URL to any adapter. But my normal testing didn't exercise that code and it had a bug.

In fact, the only way (I know of) to hit that code is to have "Check for existing Series Anthology books?" checked and then have a story with a series value either without a seriesUrl value or a seriesUrl value that isn't on any supported site. If that's a thing in normal use, I don't recall it.

Enter Jager956. Back in January. January 2021, that is.
Quote:
Originally Posted by Jager956 View Post
Just to clarify; I am using series column because of kindle (collections). And this configuration for SOL site is great as I group stories from SOL based on sex rating. If any story is in series/universes, I use that info in custom column just for cover generation.
Quote:
Originally Posted by JimmXinu View Post
You can do that with include_in_X. For example, include_in_series:rating will copy rating into series.
So the new test version both skips the anthology search if there isn't a seriesUrl value and corrects the 'last ditch' get_url_search() case.
JimmXinu is offline   Reply With Quote
Old Yesterday, 08:30 PM   #9995
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,547
Karma: 4277329
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Jager956 - MobileRead doesn't want NSFW links. I didn't realize until I was well into debugging your example were NSFW and I forgot to specify SFW.

So I removed them for you, since the problem should be solved now.
JimmXinu is offline   Reply With Quote
Old Yesterday, 11:03 PM   #9996
wildfire070
Enthusiast
wildfire070 began at the beginning.
 
Posts: 37
Karma: 10
Join Date: May 2012
Device: Kindle Oasis, Scribe, Paperwhite // Boox Palma
I'm noticing that whenever I download epubs with FFF vs directly from AO3, some of the formatting isn't retained. For example, some elements in the chapter text that are centered in the AO3 version are left-aligned when downloaded via FFF. Usually they're dividers or subheadings within a chapter.

Here's a SFW link to an example story. The beginning 2 lines after the author's note in the epub downloaded by FFF should be centered, along with the "XXX" dividers throughout the story but everything is left-aligned.

Same with the dividers in this story, but another weird thing I've noticed with this particular story is that when downloaded via FFF, there isn't a space after a period to separate sentences in the body of the story. It appears normal on AO3 and in the epub that is downloaded directly from AO3, but the epub generated with FFF doesn't have a space after periods.
wildfire070 is offline   Reply With Quote
Old Yesterday, 11:49 PM   #9997
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 6,547
Karma: 4277329
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by wildfire070 View Post
Here's a SFW link to an example story. The beginning 2 lines after the author's note in the epub downloaded by FFF should be centered, along with the "XXX" dividers throughout the story but everything is left-aligned.
By default, FFF removes style and align attributes from tags.

From defaults.ini:
Spoiler:
Code:
## Some attributes cause problems for EBook readers.  By default,
## FanFicFare will remove all attributes except the ones specified
## from all tags.  (The only exception is that <img> tags will also
## keep src, alt and longdesc attributes.  data-orighref is used by
## internalize_text_links to preserve links when chapters are
## inserted.)
## Example: To add 'style', 'title' and 'align' to the list to keep,
## in your personal.ini [defaults] put:
## add_to_keep_html_attrs:,style,title,align
keep_html_attrs:href,name,class,id,colspan,rowspan,data-orighref


You can keep style and align attrs for AO3 only, or all epubs like so:
Code:
[archiveofourown.org]
add_to_keep_html_attrs:,style,align
# use one or the other, not both
[epub]
add_to_keep_html_attrs:,style,align
You'll have to do an overwrite always download to get these changes.

That will fix centering in these stories and lot of embedded styles in other.

Quote:
Originally Posted by wildfire070 View Post
Same with the dividers in this story, but another weird thing I've noticed with this particular story is that when downloaded via FFF, there isn't a space after a period to separate sentences in the body of the story. It appears normal on AO3 and in the epub that is downloaded directly from AO3, but the epub generated with FFF doesn't have a space after periods.
The spacing between sentences issue in this one is a little more complex.

For whatever reason, the HTML the author uploaded for the story text contains no newlines at all. It's all:
Code:
<p>Blah blah blah.<span class="Apple-converted-space">  </span>Blah blah blah.</p><p>New paragraph, same "line".<span class="Apple-converted-space">  </span>Blah blah blah.</p>
(It doesn't actually matter, but the first 'space' in each span is actually a 'non-breaking space'(0xA0) instead of normal 'space'(0x20). Which is also a weird thing to do.)

By default, FFF also removes most 'empty' tags. From defaults.ini:
Spoiler:
Code:
## By default, empty tags are removed as part of cleaning up the
## source HTML.  However, a few tags should be kept even if empty.
## (Whitespace only, including &nbsp; is considered empty.)  This
## setting can adjust which tags are kept.
keep_empty_tags:p,td,th

So the <span> tags above are being removed, taking all the whitespace between sentences with them.

You can keep those <span> tags by adding to keep_empty_tags. I don't recommend doing that universally, but on a story by story basis:
Code:
[https://archiveofourown.org/works/43658766]
add_to_keep_empty_tags:,span
Again, you'll have to do an overwrite always download to get these changes.


I honestly don't remember what ebook readers had problems with what attributes many years ago. It would have been in the days of first gen Nook and Kindle and may have been before I started working on the project.

I vaguely recall that removing empty tags was added specifically for AO3 because it has (had?) a tendency to have extra 'empty' tags that introduced spaces mid word a lot. Or perhaps some word processor's HTML output did.

Last edited by JimmXinu; Yesterday at 11:50 PM. Reason: Hadn't finished final edit.
JimmXinu is offline   Reply With Quote
Reply

Tags
fanfiction


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 494 05-18-2024 02:34 AM
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 08:39 AM
[GUI Plugin] Marvin XD Philantrop Plugins 126 01-29-2017 12:48 PM
[GUI Plugin] KiNotes -axel- Plugins 0 07-14-2013 06:39 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 06:06 AM.


MobileRead.com is a privately owned, operated and funded community.