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 02-19-2016, 12:22 PM   #1066
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,987
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by firefoxxy View Post
I just tried to download this story: Spirit of Christmas
And I got the following comment from FFF: invalid group reference

I'm using the latest plugin. The story is online and I don't have it in my library yet. Do you need any further details?
It downloads fine for me, so yes, a debug log would help considerably.
JimmXinu is offline   Reply With Quote
Old 02-19-2016, 12:54 PM   #1067
firefoxxy
Zealot
firefoxxy began at the beginning.
 
Posts: 105
Karma: 10
Join Date: Nov 2012
Location: Germany
Device: Kobo Libra 2
Hello Jim!

Since the error occurred with another story on AO3, I added it in the test run.
The story link is here: the second link

I attached the log file. Hope this helps.
Attached Files
File Type: txt tmpjjsohv.txt (5.4 KB, 217 views)
firefoxxy is offline   Reply With Quote
Advert
Old 02-19-2016, 01:33 PM   #1068
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,987
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by firefoxxy View Post
Since the error occurred with another story on AO3, I added it in the test run.
The story link is here: the second link

I attached the log file. Hope this helps.
This is showing that there's an error in one of your replace_metadata lines. "invalid group reference" means it's probably a \1, \2 etc in the replacement string without a watching () group in the regexp.

If you can't find it, I can look at your replace_metadata code. I will also investigate adding code to give a more specific error for this problem.
JimmXinu is offline   Reply With Quote
Old 02-19-2016, 01:57 PM   #1069
firefoxxy
Zealot
firefoxxy began at the beginning.
 
Posts: 105
Karma: 10
Join Date: Nov 2012
Location: Germany
Device: Kobo Libra 2
Thank you Jim!

Yes, that solved it.

I had changed some lines in the replace_metadata just before downloading the stories.

I have this line in my personal.ini that you suggested:
Code:
ships_CHARS=>^(Uchiha|Uzumaki|Haruno|Hyuuga|Hatake|Namikaze) *([^ ]+)$=>\2
and wanted to try something similar on my own:
Code:
 genre=>^([aA]ngst) and (.*)$=>Angst\,\2
 genre=>^[mM]ild (.*)=>\2
This should have changed the tags to "Angst, *whatever*" and for the second tags it should strip "mild" from whatever was following - at least I thought that would happen. And since it was the second term that would change I thought it would be "2". Obviously it needs "1".
(My understanding of coding is clearly lacking.)

Thank you for your help, Jim!
firefoxxy is offline   Reply With Quote
Old 02-20-2016, 12:06 AM   #1070
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,188
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Hi, I tried downloading a story from the hexfiles and the metadata is created, the chapters are there, but none of the text from the story is generated.

This is the link I'm using to download the story into calibre:
http://www.thehexfiles.net/viewstory.php?sid=125

I've attached the story to this comment so you can see what I'm seeing.

I'd appreciate any and all help in figuring this out.

Best Regards,
Amalthia
Attached Files
File Type: epub jameschick - All's Fair In Love And War.epub (17.4 KB, 183 views)
Amalthia is offline   Reply With Quote
Advert
Old 02-20-2016, 11:46 AM   #1071
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,987
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Amalthia View Post
Hi, I tried downloading a story from the hexfiles and the metadata is created, the chapters are there, but none of the text from the story is generated.

This is the link I'm using to download the story into calibre:
http://www.thehexfiles.net/viewstory.php?sid=125
That site has rather poor HTML in the chapter pages. The newer HTML5 parser was having problems with it.

New test version posted (direct link)

2016-02-20
- Fix for adapter_thehexfilesnet missing chapter text.
JimmXinu is offline   Reply With Quote
Old 02-20-2016, 01:08 PM   #1072
edeniz
Zealot
edeniz began at the beginning.
 
Posts: 132
Karma: 10
Join Date: Oct 2015
Device: Sony Reader, Tolino Shine, Samsung Galaxy S3
Just a quick but probably dumb question I have to ask for my peace of mind:

Regarding ship2chars.

I've had in my ini for a while now lines like this:

Spoiler:
Code:
  ships=>^John Sheppard\/Rodney McKay$=>Rodney McKay/John Sheppard

or:

 ships=>^Cordelia\/Xander$=>Xander Harris/Cordelia Chase


I've preferred to use ^ and $ instead of, for example, "\b" to make sure I don't get duplications or otherwise faulty renamings. Since I never noticed any problems with that, I assumed it would be ok. Now however, I have noticed a problem. It's thanks to this link:

http://archiveofourown.org/works/86535

I've downloaded it and later realized I already had it in my library. But, in doing so I also realized that in this new downloaded version I did not have anything in my characters field. Had it not been for the previously downloaded version, I would not have noticed this lack. Because, just the day before I'd downloaded a few fics from ffnet and was disappointed to realize that if the fic doesn't already have anything in the genre/character/ships fields, replace_metadata won't be able to add anything to them. (Yes, should be obvious, true, but apparently not. )

Strangely, this here:

Spoiler:
Code:
 ships=>^(.*)\/Rodney McKay$=>Rodney McKay/\1


is actually one of those things that work half the time and the other half not. No idea why.

Similarly, just this alone won't work either:

Spoiler:
Code:
 ships=>(.*)\/^Rodney McKay$=>Rodney McKay/\1


Anyway, tl;dr:
Does using ^$ in ships make the splitting of ships2chars impossible? (Has it always been so and I've just not noticed?) Or is it just me? Just so I know if I need to go over my ini and replace those with another regex.
edeniz is offline   Reply With Quote
Old 02-20-2016, 04:04 PM   #1073
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,987
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by edeniz View Post
...
Anyway, tl;dr:
Does using ^$ in ships make the splitting of ships2chars impossible? (Has it always been so and I've just not noticed?) Or is it just me? Just so I know if I need to go over my ini and replace those with another regex.
This works perfectly well for me with that story:
Code:
[archiveofourown.org]

add_to_extra_valid_entries:,ships2chars
include_in_ships2chars:ships.NOREPL
# NOREPL prevents any ships patterns from being applied to ships2chars.

add_to_replace_metadata:
# ships=>(.*)\/^Rodney McKay$=>Rodney McKay/\1
# is never going to work because the '^' is misplaced
# I suggest this to get versions w/ & w/o spaces:
 ships=>^([^/&]+)[ ]*/[ ]*Rodney McKay$=>Rodney McKay/\1
 ships2chars=>[ ]*/[ ]*=>/
 ships2chars=>[ ]*&[ ]*=>/
 ships2chars=>([^/]+)/([^/]+)/([^/]+)/(.+)=>\1\,\2\,\3\,\4
 ships2chars=>([^/]+)/([^/]+)/(.+)=>\1\,\2\,\3
 ships2chars=>([^/]+)/(.+)=>\1\,\2

include_in_characters:characters,ships2chars
When things don't work sometimes I would look first for spaces that your patterns don't include, then differences in spelling, capitalization, etc.

Nitpick: You don't need to escape '/'s in the regexp patterns. So you can use just '/' vs '\/'. OTOH, I it doesn't hurt anything.
JimmXinu is offline   Reply With Quote
Old 02-20-2016, 04:55 PM   #1074
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,188
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Quote:
Originally Posted by JimmXinu View Post
That site has rather poor HTML in the chapter pages. The newer HTML5 parser was having problems with it.

New test version posted (direct link)

2016-02-20
- Fix for adapter_thehexfilesnet missing chapter text.
Hi, I tested the updated plugin on this story and it worked!

Thank you so much for your help.

Amalthia
Amalthia is offline   Reply With Quote
Old 02-20-2016, 05:29 PM   #1075
apm
Junior Member
apm began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2016
Device: none
StoriesOnline.net problems

I tried downloading from StoriesOnline.net, but I'm getting either "'NoneType' object has no attribute 'get_text'" (http://storiesonline.net/s/76055) or "'NoneType' object has no attribute 'find'" (http://storiesonline.net/s/46707).

Thanks,
apm
apm is offline   Reply With Quote
Old 02-20-2016, 06:05 PM   #1076
mehetabelo
e-Bibliophile
mehetabelo began at the beginning.
 
mehetabelo's Avatar
 
Posts: 60
Karma: 10
Join Date: Jun 2009
Location: California
Device: Paperwhite 1-3, Kobo AuraHD, Boox Afterglow2
APM: I just checked that link and (with latest release) I'm getting no problems. I do not have the test versions though, but I'm not sure that would cause a problem, as I didn't see any changes for storiesonline.

Now, the reason I logged in. I noticed a couple of stories that are available on finestories.com and not storiesonline.net. As I understand they are exactly the same site, though one (finestories) leaves out most of the sex stories. Is it possible, with a minor change, to include finestories as a download option?

I considered digging into the code and trying to add it myself, but that would mean spending a lot of time looking through things I don't grasp well. It may be a simple tweak that someone can do without a second thought, that's why I ask here before trying to figure it out myself.
mehetabelo is offline   Reply With Quote
Old 02-20-2016, 07:02 PM   #1077
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,987
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by apm View Post
I tried downloading from StoriesOnline.net, but I'm getting either "'NoneType' object has no attribute 'get_text'" (http://storiesonline.net/s/76055) or "'NoneType' object has no attribute 'find'" (http://storiesonline.net/s/46707).
Both of those downloaded fine for me. Make sure you have the most recent released or test version.

If you continue to have problems, make sure that you are using the default site skin. After that, please run calibre in debug and post a log file if it still fails.

Quote:
Originally Posted by mehetabelo View Post
Now, the reason I logged in. I noticed a couple of stories that are available on finestories.com and not storiesonline.net.
...
FFF already contains code for finestories.com, but it apparently isn't working. And it is not terribly similar to the current code for storiesonline.net.

An initial look does suggest that finestories.com is similar to storiesonline.net now, but I'll have to spend some time looking more closely before I know for sure.
JimmXinu is offline   Reply With Quote
Old 02-20-2016, 07:25 PM   #1078
apm
Junior Member
apm began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Feb 2016
Device: none
Quote:
Originally Posted by JimmXinu View Post
Both of those downloaded fine for me. Make sure you have the most recent released or test version.

If you continue to have problems, make sure that you are using the default site skin. After that, please run calibre in debug and post a log file if it still fails.
I figured it out from the debug; there was a problem in my personal configuration file. Fixed it and it's working fine now. Thanks!
apm is offline   Reply With Quote
Old 02-20-2016, 08:29 PM   #1079
edeniz
Zealot
edeniz began at the beginning.
 
Posts: 132
Karma: 10
Join Date: Oct 2015
Device: Sony Reader, Tolino Shine, Samsung Galaxy S3
Quote:
Originally Posted by JimmXinu View Post
When things don't work sometimes I would look first for spaces that your patterns don't include, then differences in spelling, capitalization, etc.
Maybe I overlooked something.

Quote:
Originally Posted by JimmXinu View Post
Nitpick: You don't need to escape '/'s in the regexp patterns. So you can use just '/' vs '\/'. OTOH, I it doesn't hurt anything.
Thanks again. But I think I initially escaped it because not doing so caused me problems. Don't remember what sort. Will have to try again and see.

Quote:
Originally Posted by JimmXinu View Post
include_in_ships2chars:ships.NOREPL
# NOREPL prevents any ships patterns from being applied to ships2chars.
Ok, that's how I understood it, especially since I've had to add characters lines as well if I wanted names in ships to be changed. But if that is right, basically lines like this:

Spoiler:
Code:
 ships=>^John Sheppard\/Rodney McKay$=>Rodney McKay/John Sheppard
 ships=>^Cordelia\/Xander$=>Xander Harris/Cordelia Chase


should pose no problem, shouldn't it? Because, again using this story as an example case, using a line like the above means it will make the replacement, but the ships will not be split into characters. My characters field remains empty.
edeniz is offline   Reply With Quote
Old 02-20-2016, 10:15 PM   #1080
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Quote:
Originally Posted by mehetabelo View Post
Now, the reason I logged in. I noticed a couple of stories that are available on finestories.com and not storiesonline.net. As I understand they are exactly the same site, though one (finestories) leaves out most of the sex stories. Is it possible, with a minor change, to include finestories as a download option?
The two sites have always shared a lot of the backend and I think the story database is the same, but I'm pretty sure that story submission is either separate, or has an option which to choose which site to put them on. It's been a whiles since I've looked, but I have found stories that were only on one, but would meet the rules of the other.

Quote:
Originally Posted by JimmXinu View Post
FFF already contains code for finestories.com, but it apparently isn't working. And it is not terribly similar to the current code for storiesonline.net.

An initial look does suggest that finestories.com is similar to storiesonline.net now, but I'll have to spend some time looking more closely before I know for sure.
The last time I looked at them, they were very similar, but just enough different that I didn't think it was worthwhile merging or otherwise reusing the code. I'll have a look and see what is going on now.
davidfor 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 523 07-15-2025 06:45 PM
[GUI Plugin] Open With kiwidude Plugins 404 02-21-2025 05:42 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 07:20 AM.


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