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 10-31-2015, 12:05 PM   #691
MerlinMama
Evangelist
MerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beauty
 
MerlinMama's Avatar
 
Posts: 487
Karma: 32554
Join Date: May 2014
Location: Canada
Device: Kobo Libra Colour
When I add a fic, I have a blank space at the top of each file. This translates into an error for the book. I implemented a general regex in calibre editor to fix this, but is there something I can do to remove this? It started when I added my personalized Titlepage_Start/Chapter_Start/output_css in the personal.ini

Spoiler:
output_css:
body { background-color: #%(background_color)s;
text-align: justify;
margin: 2%%; }
pre { font-size: x-small; }
sml { font-size: small; }
h1 { text-align: center; }
h2 { text-align: center; }
h3 { text-align: center; }
h4 { text-align: center;
font-size: 120%% }
h5 { text-align: center; }
h6 { text-align: center; }
a { text-decoration: none; }
font1 { font-family: 'Segoe Print';
font-size: 90%% }
font2 { font-family: 'Dion';
font-size: 130%% }
news { font-family: 'Kirsty';
font-style: italic; }
flash { font-weight: bold; }
dream { font-style: italic; }
.CI {
text-align:center;
margin-top:0px;
margin-bottom:0px;
padding:0px;
}
.center {text-align: center;}
.centered {text-align: center;
font-weight: bold;}
.cover {text-align: center;}
.full {width: 100%%; }
.quarter {width: 25%%; }
.smcap {font-variant: small-caps;}
.u {text-decoration: underline;}
.bold {font-weight: bold;}
.lini {margin-left:25px;
margin-right:35px;}

# make sure to keep a single space on the line after this--it's
# one, empty newline for inclusion below.
newline:

# You can't see it, but there's a space on the line above.

chapter_start:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>${chapter}</title>
<link href="stylesheet.css" type="text/css" charset="UTF-8" rel="stylesheet"/>
</head>
<body>
<h3>${chapter}</h3>
%(newline)s
%(newline)s

titlepage_start:
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>${title} by ${author}</title>
<link href="stylesheet.css" type="text/css" charset="UTF-8" rel="stylesheet"/>
</head>
<body>
<h2><a href="${storyUrl}">${title}</a><br/> by <br/>${authorHTML}</h2>
<div><br/>
%(newline)s
MerlinMama is offline   Reply With Quote
Old 10-31-2015, 01:17 PM   #692
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
Are there other stories than Harry Potter on the site, because I'm looking for a couple from another fandom.

Thanks
Tanjamuse is offline   Reply With Quote
Advert
Old 10-31-2015, 03:05 PM   #693
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,439
Karma: 4276871
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by MerlinMama View Post
When I add a fic, I have a blank space at the top of each file. This translates into an error for the book. I implemented a general regex in calibre editor to fix this, but is there something I can do to remove this? It started when I added my personalized Titlepage_Start/Chapter_Start/output_css in the personal.ini
Use [code] tags around ini blocks otherwise we can't see the white space--and it matters.

Code:
## This has a newline right at the beginning:
chapter_start:
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 ...

## This doesn't:
chapter_start:<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 ...
JimmXinu is online now   Reply With Quote
Old 10-31-2015, 03:32 PM   #694
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,439
Karma: 4276871
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by saluli View Post
Hi! It really is a huge fic... I don't know how the author manages.

I got the same error on Debug mode, so I will post the resulting log.
Now I see what the problem is.

To keep from getting long winded about it, when replace_br_with_p:true, it was breaking the metadata parsing for whofic.com. I didn't see the error because I don't use replace_br_with_p.

New test version posted (direct link) that addresses the issue.
JimmXinu is online now   Reply With Quote
Old 10-31-2015, 05:19 PM   #695
MerlinMama
Evangelist
MerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beautyMerlinMama does all things with Zen-like beauty
 
MerlinMama's Avatar
 
Posts: 487
Karma: 32554
Join Date: May 2014
Location: Canada
Device: Kobo Libra Colour
Quote:
Originally Posted by JimmXinu View Post
Code:
## This has a newline right at the beginning:
chapter_start:
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 ...

## This doesn't:
chapter_start:<?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 ...
Okay, thanks. I had copied 'output_css:' from default.ini, and it has that newline. Also, the FAQ, where I got the default for chapter_start and titlepage_start, show as I had them. As this causes errors in calibre, shouldn't they be changed to reflect that, or at least have a note that if you customize them, to remove that newline? I didn't notice anything along those lines, although I'll go check again now to be sure. It's entirely possible I missed it!
MerlinMama is offline   Reply With Quote
Advert
Old 10-31-2015, 05:23 PM   #696
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,439
Karma: 4276871
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by MerlinMama View Post
Okay, thanks. I had copied 'output_css:' from default.ini, and it has that newline. Also, the FAQ, where I got the default for chapter_start and titlepage_start, show as I had them. As this causes errors in calibre, shouldn't they be changed to reflect that, or at least have a note that if you customize them, to remove that newline?
I doubt it matters for output_css. CSS is generally less touchy.

I've gone back and removed the leading newlines from the CustomOutput wiki page. Sorry about that.
JimmXinu is online now   Reply With Quote
Old 11-04-2015, 04:38 AM   #697
amythyr
Junior Member
amythyr doesn't litteramythyr doesn't litter
 
Posts: 5
Karma: 166
Join Date: Mar 2015
Location: California
Device: Android Phone,Android Tablet,Kindle
I am not sure it is a bug or not,the fanfictions are taking lot of time to download.Every fanfiction is taking 15 + minutes

I am using latest version of calibre(64 bit) and latest version of plugin in windows 10 64 bit.
amythyr is offline   Reply With Quote
Old 11-04-2015, 04:40 AM   #698
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
From which site? And how long are the stories?
Tanjamuse is offline   Reply With Quote
Old 11-04-2015, 05:53 AM   #699
amythyr
Junior Member
amythyr doesn't litteramythyr doesn't litter
 
Posts: 5
Karma: 166
Join Date: Mar 2015
Location: California
Device: Android Phone,Android Tablet,Kindle
Quote:
Originally Posted by Tanjamuse View Post
From which site? And how long are the stories?
fanfiction.net

Stories are on average 200k words each
amythyr is offline   Reply With Quote
Old 11-04-2015, 05:57 AM   #700
Tanjamuse
Wizard
Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!Tanjamuse , Klaatu Barada Niktu!
 
Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
How many chapters, because there's a delay in between chapters in the default.ini:

Quote:
## number of seconds to sleep between calls to the story site. May by
## useful if pulling large numbers of stories or if the site is slow.
#slow_down_sleep_time:0.5
Tanjamuse is offline   Reply With Quote
Old 11-04-2015, 09:14 AM   #701
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,439
Karma: 4276871
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
@Tanjamuse is asking the right questions.

In order to avoid being blocked for excessive traffic, downloading from ffnet is deliberately slowed. Stories with lots of chapters are worst.

If you've been downloading lots of stories from ffnet, it's possible you've still tripped a detector and are being slowed down by ffnet.
JimmXinu is online now   Reply With Quote
Old 11-04-2015, 11:38 AM   #702
DavidTC
Connoisseur
DavidTC began at the beginning.
 
Posts: 77
Karma: 10
Join Date: Sep 2011
Device: Nook, Boox C67ML
Hi. I want to thank you for your plugin, I've been using it for years.

A week or so ago I got ereader that can support Calibre Compaign, so I've worked on trying to normalize my various tags. I love the 'download metadata and store it in an attribute', thanks, that is very helpful and keeps me from pounding the servers.

I've almost got things as I want, except for two slight problems, both in the 'ship' area.

But first, a small bug report:

You cannot save the default as 'Update Calibre Metadata from Saved Metadata Column' in the config. It gives an unhandled exception. As that is the last option, and only appears if you have a saved metadata column, I suspect you've got a bad 'valid options' test there.

Anyway, feature request #1:
Using & to break apart ships.

I know you say 'If you want to, you can use a regexp to change that to /'...the problem is, there's often a difference between / and & (With / being romance and & being friendship), and so & ships need to be *put back together* with a &, while keeping / as /.

I've spent the last day trying to rig up some insanity with regexps where I turn & into #/, and then ships_LIST tries to detect the # in the result and turn all / back into & and delete the #. This is...not easy. I might get it eventually, but at this point, I thought I'd ask 'Can you break apart ships on & also, and put them back together with the same symbol?' (Perhaps there could even be a configurable list? I don't know that anything except / and & is used, though.)

Slight complication: & is almost always surrounded by spaces. 'X & Y', instead of 'X/Y'. Don't actually know how you handle spaces in the input there, just thought I'd mention it. At the end, either go with spaces or not, *that* is easy enough to change with a regexp.

Not a complication: I have *never* seen something of the form 'X & Y/Z', and, frankly no one would know what that means. I think if FFF ever runs across that, it should not try to sort it at all. (Note that FFF *already* sorts that wrong anyway, because, whatever 'X & Y/Z' means, it probably is not the same thing as 'Z/X & Y', which is what FFF could end up with.)

Anyway, that would be awesome, not only for sorting, but for my next request:

Feature request #2:
Regexp access to the ships while broken apart.

I have a lot of regexps that normalize character names. I can, of course, make those apply to ships also, but the problem is, a lot of these regexps are turning first names or last names into full names, so need to be anchored at the ends, right? Otherwise you get a bunch of 'Harry Potter Potter's.

The problem then arises if I put that replacement in 'ships,characters', I end up with extremely complicated regexps that might be anchored with a start of line, or a /, or a ' & ', and the same at the end, and then have to put that character back after replacement. And it's all well and good to write something that complicated once, but for every single character name it's getting a bit...old, and hard to read.

So my question is: Can we have access to the ship names *while* they're broken apart? I mean, clearly you already break them apart anyway, to sort them. Can we perhaps get a ship_CHARACTER or something we can run a regexp over, one name at a time?

Or, even better, true/false option to just apply the *character* regexps to broken apart ships? Then people who already munge character names could just flip that to true and not have to mess with their regexps at all.

Thanks for all your effort.
DavidTC is offline   Reply With Quote
Old 11-04-2015, 12:36 PM   #703
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,439
Karma: 4276871
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by DavidTC View Post
Hi. I want to thank you for your plugin, I've been using it for years.


Quote:
Originally Posted by DavidTC View Post
But first, a small bug report:

You cannot save the default as 'Update Calibre Metadata from Saved Metadata Column' in the config. It gives an unhandled exception. As that is the last option, and only appears if you have a saved metadata column, I suspect you've got a bad 'valid options' test there.
Good catch. Fix in the next version.

Quote:
Originally Posted by DavidTC View Post
Anyway, feature request #1:
Using & to break apart ships.
...
What sites use '/' for romantic ships and '&' for platonic? I don't recall seeing that before. A few example story URLs would also help.

I want to explore the sites that use that a bit before making any decisions. What happens in cases where it's common to have a '/' as part of the name, such as superhero fandoms?

Quote:
Originally Posted by DavidTC View Post
Feature request #2:
Regexp access to the ships while broken apart.
...
The code that does sort_ships is currently pretty simple. Applying replace_metadata to ship parts may be possible, but I'll have to investigate in more detail.
JimmXinu is online now   Reply With Quote
Old 11-04-2015, 12:51 PM   #704
firefoxxy
Zealot
firefoxxy began at the beginning.
 
Posts: 105
Karma: 10
Join Date: Nov 2012
Location: Germany
Device: Kobo Libra 2
Hello Jim

AO3 uses these tags '/' to indicate romantic and '&' for platonic relations.
I have some examples here:

story 1
story 2
story 3
firefoxxy is offline   Reply With Quote
Old 11-04-2015, 02:22 PM   #705
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,439
Karma: 4276871
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by DavidTC View Post
Not a complication: I have *never* seen something of the form 'X & Y/Z', and, frankly no one would know what that means. I think if FFF ever runs across that, it should not try to sort it at all. (Note that FFF *already* sorts that wrong anyway, because, whatever 'X & Y/Z' means, it probably is not the same thing as 'Z/X & Y', which is what FFF could end up with.)
Actually, AO3 will let you make a story with both '/' and '&' in the same ship tag. With or without space around either. Yay for freeform tags, I guess?
JimmXinu is online now   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:13 PM.


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