![]() |
#2986 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 408
Karma: 1050547
Join Date: Mar 2011
Device: Kindle Oasis 2
|
From what I can tell, the only way that the site allows authors to upload their content is in plain text files. These text files are later displayed within pre-tags on the actual story page to preserve their formatting, including all spaces, newlines etc. If this content wouldn't be contained within these tags (and later aren't since using pre-tags within ebooks would probably cause some readers to display it strangely), normal browsers would (and I'm assuming ebook readers too) collapse repeated spaces into a single space character. Since the only way to really format a plain text file is by using tabs or spaces excessively, I added the option to replace all regular spaces with " " HTML entities, which are basically simply spaces that won't be automatically collapsed by browsers.
I might have to improve that somehow, as well as the simple newline replacement which should really wrap paragraphs into p-tags somehow to allow further customization via the CSS file -- that would also allow me to narrow down which space characters to replace instead of replacing all of them blindly (although a RegEx might do). I did something similar a bit better in one of my other projects with this utility function. But this works for now, it's really just an option to force the ebook reader to not collapse space characters (which I'm assuming most would do), if the user really desires this behavior. Last edited by cryzed; 06-17-2014 at 08:11 PM. |
![]() |
![]() |
#2987 | |
Junior Member
![]() Posts: 2
Karma: 10
Join Date: Jun 2014
Device: Kindle
|
Quote:
|
|
![]() |
![]() |
#2988 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 408
Karma: 1050547
Join Date: Mar 2011
Device: Kindle Oasis 2
|
Glad to hear it
![]() There's unfortunately no guaranteed way to detect if a continuation of a story exists, since there's no real chapter support on the site, so this will have to do. Last edited by cryzed; 06-17-2014 at 08:37 PM. |
![]() |
![]() |
#2989 |
Connoisseur
![]() Posts: 57
Karma: 10
Join Date: Jul 2012
Device: iPad
|
The "Get Story URLs from web page" appears to be broken again on Literotica. The error message says that there are "no valid story URLs on the given page."
A random author's page is attached. http://www.literotica.com/stories/me...ge=submissions Thanks. PS I was the one who brought this up back in December, but unfortunately work took me away from the home computer for long enough for me to forget about it, so I never got around to testing the fix that Jimm made. |
![]() |
![]() |
#2990 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
@Cryzed
I've come something odd: Whenever it is Older Kids in my edited Rating it writes the following: Older Kidsids, the weird thing is that it is only on FF.net there is a problem. replace_metadata: rating=>M=>Adults Only rating=>T=>Teen rating=>K\+=>Older Kids - becomes Older Kidsids rating=>K=>Kids |
![]() |
![]() |
#2991 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 408
Karma: 1050547
Join Date: Mar 2011
Device: Kindle Oasis 2
|
Try changing the single "K" in the last line to "K$" .
|
![]() |
![]() |
#2992 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
That seemed to do the trick
![]() |
![]() |
![]() |
#2993 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 408
Karma: 1050547
Join Date: Mar 2011
Device: Kindle Oasis 2
|
You are welcome
![]() |
![]() |
![]() |
#2994 | ||
Connoisseur
![]() Posts: 51
Karma: 10
Join Date: Jun 2014
Device: none
|
Quote:
|
||
![]() |
![]() |
#2995 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
JimmXinu: Adding the following near the start of "adapters.getClassFor" will fix this. Code:
if fixedurl.startswith("//"): fixedurl = "http:%s"%url |
|
![]() |
![]() |
#2996 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,988
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
Attached is a test version with all the recent changes, that change, and a fix to a problem in the literotica adapter that came to light with the internals changes from metadata splitting. Last edited by JimmXinu; 06-19-2014 at 10:54 PM. Reason: Remove obsolete beta versions |
|
![]() |
![]() |
#2997 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,988
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
I hauled out an old Win7 machine to try it and I did indeed get the same mis-coding issue. I haven't used that machine in a while, so it was running calibre 1.27. I updated to the current calibre (1.40), fully expecting that it would correct the problem. But it didn't. Nor did the stack of windows updates it needed. What does seem to have fixed it, is changing some static strings that get combined with the story description in the fimf adapter to be explicitly unicode. See if this version works better for you. Last edited by JimmXinu; 06-19-2014 at 10:55 PM. Reason: Remove obsolete beta versions |
|
![]() |
![]() |
#2998 | |
Connoisseur
![]() Posts: 57
Karma: 10
Join Date: Jul 2012
Device: iPad
|
Quote:
Thanks to davidfor and Jimm for the fast fix. rlh3 |
|
![]() |
![]() |
#2999 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
I think we've all seen worse. And written worse.
Quote:
On a related note, the literotica pages have tags in the "keywords" of the page. You can see them in the source of the page, or Firefox will show them in the page info (right click on the page and select "View page info). At some time in the past I wrote some code to extract these and use them as tags. If anyone is interested, I can dig this out and add it. With an option to use or not use them. |
|
![]() |
![]() |
#3000 | |
Connoisseur
![]() Posts: 51
Karma: 10
Join Date: Jun 2014
Device: none
|
Quote:
|
|
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Count Pages | kiwidude | Plugins | 1846 | 08-02-2025 10:44 PM |
[GUI Plugin] Resize Cover | kiwidude | Plugins | 100 | 07-10-2025 08:50 AM |
[GUI Plugin] Find Duplicates | kiwidude | Plugins | 1124 | 04-18-2025 09:19 AM |
[GUI Plugin] Open With | kiwidude | Plugins | 404 | 02-21-2025 05:42 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |