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 04-14-2021, 02:09 PM   #5791
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,993
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by ownedbycats View Post
I think I figured it out. The regexes are running in the opposite order than I thought; it's changing The Rescuers to Other before it can get changed into Disney.

Unfortunately I am not sure how to fix this—moving the ## Some more tagcategory standardization portion above the others didn't seem to work.
Actually moving the standardization part up did work. I just accidentally pressed cancel instead of ok.
ownedbycats is online now   Reply With Quote
Old 04-14-2021, 02:11 PM   #5792
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,993
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by JimmXinu View Post
Multi-reply



No idea. I would guess duplicate story URLs? Can you duplicate? If so, how?
It happens rather sporadically, unfortunately. It seems to happen only on ffnet ones though so I wonder if it's something to do with caching.
ownedbycats is online now   Reply With Quote
Old 04-14-2021, 02:30 PM   #5793
Ascello
Enthusiast
Ascello began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite 4
Quote:
Originally Posted by JimmXinu View Post
Make a copy of the title using (add_to_)extra_valid_entries:newtitle, set the value using include_in_newtitle:title.NOREPL, change title using replace_metadata. Customize title page to show newtitle. (Internal epub metadata will probably still show title.)
Thx a lot for answers, just one more question: How do I customise the titlepage to show newtitle, not title? Cuz that is my main issue with this problem, because the default code says:

Code:
## All current formats already include title and author.
titlepage_entries: seriesHTML,category,genre,language,characters,ships,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,numWords,publisher,description
So I understand that if I just add newtitle to this list, the titlepage will still show a giant title and then a small newtitle below. Or am I wrong? I would preferably want newtitle to be there in place of title.

Quote:
Originally Posted by ownedbycats View Post
I think you can use a custom_column_setting to put a new_entry to a column and it shouldn't touch the title page.
That only works for custom colums not default columns, no? Is there a way to put a custom column in place of default Calibre title column?
Ascello is offline   Reply With Quote
Old 04-14-2021, 03:04 PM   #5794
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,974
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Ascello View Post
So I understand that if I just add newtitle to this list, the titlepage will still show a giant title and then a small newtitle below. Or am I wrong? I would preferably want newtitle to be there in place of title.
Customizing output:
https://github.com/JimmXinu/FanFicFa...pub-title-page

Quote:
Originally Posted by Ascello View Post
That only works for custom colums not default columns, no? Is there a way to put a custom column in place of default Calibre title column?
No. Title will be filled with title. The only options are to change title or set it 'New Only'.
JimmXinu is offline   Reply With Quote
Old 04-14-2021, 05:51 PM   #5795
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,993
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
For the cover generation, I think it was stated that FFF can pass a cover image onto Generate Cover to use. Currently, my generated cover for FanFiction.net looks like this:

Click image for larger version

Name:	Test Book.jpeg
Views:	276
Size:	29.4 KB
ID:	186616

I was thinking since the ffnet covers are small, it would fit rather nicely where the oversized logo is now...

Can generate_cover_settings use different profiles depending on whether a cover image is found? (Preferably, I'd also want to do this only for FanFiction.net; I use a different cover profile with different colours and oversized logo for AO3.)

Code:
replace_metadata: 
## Prettyizes fanfiction publishers.
 site=>www.fanfiction.net=>FanFiction.net
 site=>archiveofourown.org=>Archive of Our Own

generate_cover_settings:
## Per-publisher
 ${site}=>^FanFiction.net$=>FFNet
 ${site}=>^Archive of Our Own$=> AO3

Last edited by ownedbycats; 04-14-2021 at 06:05 PM.
ownedbycats is online now   Reply With Quote
Old 04-14-2021, 06:24 PM   #5796
Ascello
Enthusiast
Ascello began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite 4
Quote:
Originally Posted by JimmXinu View Post
Thanks, this is extra helpful!

And is there a way to add prefix to title of Anthology conditional on category? I mean for fics that have series turned into anthology title. For example this series: https://archiveofourown.org/series/2222022 I want to have prefix MC. Is there a way to automate it, or just by hand?

And also how do I change Anthology title from "title" to "origtitle"? Typing ${origtitle} did not work.

Last edited by Ascello; 04-14-2021 at 06:28 PM.
Ascello is offline   Reply With Quote
Old 04-14-2021, 06:38 PM   #5797
Ascello
Enthusiast
Ascello began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite 4
Quote:
Originally Posted by ownedbycats View Post
For the cover generation, I think it was stated that FFF can pass a cover image onto Generate Cover to use. Currently, my generated cover for FanFiction.net looks like this:

Attachment 186616

I was thinking since the ffnet covers are small, it would fit rather nicely where the oversized logo is now...

Can generate_cover_settings use different profiles depending on whether a cover image is found? (Preferably, I'd also want to do this only for FanFiction.net; I use a different cover profile with different colours and oversized logo for AO3.)

Code:
replace_metadata: 
## Prettyizes fanfiction publishers.
 site=>www.fanfiction.net=>FanFiction.net
 site=>archiveofourown.org=>Archive of Our Own

generate_cover_settings:
## Per-publisher
 ${site}=>^FanFiction.net$=>FFNet
 ${site}=>^Archive of Our Own$=> AO3
Well, if you want to do this only for fanfiction, just stuff it under [fanfiction.net]

Basically i think everything is here:
Code:
## If you have the Generate Cover plugin installed, you can use the
## generate_cover_settings parameter to intelligently decide which GC
## setting to run.  There are three parts 1) a template of which
## metadata part(s) to look at, 2) a regular expression to match the
## template, and 3) the name of the GC setting to use, which must
## match exactly.  Use this parameter in [defaults], or by site eg,
## [ficwad.com]
## Make sure to keep at least one space at the start of each line and
## to escape % to %%, if used.
## template => regexp to match => GC Setting to use.
## To use this, make sure you go to the Generate Cover tab in FanFicFare
## config and check 'Allow generate_cover_settings from personal.ini
## to override'
## You can check for an existing cover image in the metadata
## cover_image.  cover_image can be:
## specific -- The site has an image that is specifically this story's cover
## first -- The first image in the story or story desc is used as cover
## default -- A default_cover_image was used
## old -- There was already a cover image in the epub.
## This is useful because GC plugin can use the existing image.
#generate_cover_settings:
# ${category} => Buffy:? [tT]he Vampire Slayer => BuffyCover
# ${category} => Star Trek => StarTrekCover
# ${cover_image} => => CompleteCover
# ${cover_image} => (specific|first|default) => CoverWithOrigImage
This says the plugin can check for existing images. But I don't really deal in covers, so, can't help more.

Edit: Oops, sorry for double-post.
Ascello is offline   Reply With Quote
Old 04-14-2021, 08:40 PM   #5798
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,974
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by ownedbycats View Post
Can generate_cover_settings use different profiles depending on whether a cover image is found? (Preferably, I'd also want to do this only for FanFiction.net; I use a different cover profile with different colours and oversized logo for AO3.)
What Ascello said. As I recall, you can are not limited to only one entry in the template part, eg '${cover_image} ${category}' then match both.

Quote:
Originally Posted by Ascello View Post
And is there a way to add prefix to title of Anthology conditional on category? I mean for fics that have series turned into anthology title. For example this series: https://archiveofourown.org/series/2222022 I want to have prefix MC. Is there a way to automate it, or just by hand?

And also how do I change Anthology title from "title" to "origtitle"? Typing ${origtitle} did not work.
Anthology title is not nearly as configurable as individual story title. All of FFF's complex replace_metadata etc is done at the story level and is already finished before the anthology is stitched together.

This setting exists:
Code:
## Uses a python template substitution.  The ${title} is the default
## title of a new anthology, <series name> in the case of a series, or
## the first book title otherwise.  This is only applied to new
## anthologies.
anthology_title_pattern:${title} Anthology
...but title is literally the only variable available. So you could add an 'MC:' prefix with it, but how widely would that be applied? You'd have to try it to see if [https://archiveofourown.org/series/2222022] as an INI section would work.

(anthology_title_pattern only exists because of some users hating the word 'Anthology' back when the feature was introduced.)
JimmXinu is offline   Reply With Quote
Old 04-14-2021, 08:51 PM   #5799
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,974
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
New Test Version Posted

2020-04-14
- Include code for nsapa_proxy for dealing with Captchas (by nsapa -- coming soon!)
- Some other import cleanup.

This is a more interactive alternative to the browser_cache feature of FFF for dealing with captchas. See #677 and fanfictionnet_ff_proxy.

This is code in active development at a pre-release stage. Nicolas SAPA AKA nsapa is responsible for the proxy--this isn't something I will be personally supporting a whole bunch.
JimmXinu is offline   Reply With Quote
Old 04-14-2021, 08:59 PM   #5800
Ascello
Enthusiast
Ascello began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite 4
Thx for the new version!

Another question, rather technical one:
How does the (A|B|C|D|...) regex work? If I type:
Code:
replace_metadata:
 category=>^(A|B|C|D|E)$=>F
will the program check every category against every position in my regex (i.e. five checks) or will it just instantly find the correct one? Basically I am asking, because I wonder that if I fill this sort of regex with like a 1000 variables, will the program slow down and process everything forever, or will it be fine?

Edit: Also, I am one of those ppl who really appreciate the possibility of deleting the "Anthology" word, soooo
Ascello is offline   Reply With Quote
Old 04-14-2021, 10:39 PM   #5801
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,993
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
did I make a mistake? I just got the cover image

Code:
[www.fanfiction.net]
## Embed cover in generated cover
generate_cover_settings:
 ${cover_image} => (specific|first|default) => FFNetWithImage
 ${site}=>^FanFiction.net$=> FFNet
ownedbycats is online now   Reply With Quote
Old 04-14-2021, 11:56 PM   #5802
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,974
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Ascello View Post
Thx for the new version!

Another question, rather technical one:
Detailed discussion of regular expression complexity and efficiency is rather out of scope for this group. FFF uses Python's re library, I'm sure one can find both practical and scholarly articles on regexp complexity--I know it featured in several of my ComSci classes once upon a time.

Short answer: yes, replace_metadata lines are checked against everything that they might apply to and adding more numerous and more complex lines can cause noticeable slowdowns.

I believe the practical limit is somewhere that I would call "waaaay beyond reasonable". Because there are regulars here who routinely use setups that I would call "waaaay beyond reasonable".

Quote:
Originally Posted by ownedbycats View Post
did I make a mistake? I just got the cover image
site for ffnet is 'www.fanfiction.net'. And regexp is case sensitive.

If that doesn't help, I don't know--not enough information.
JimmXinu is offline   Reply With Quote
Old 04-15-2021, 12:48 AM   #5803
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 10,993
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by JimmXinu View Post
site for ffnet is 'www.fanfiction.net'. And regexp is case sensitive.

If that doesn't help, I don't know--not enough information.
Do the site-specific ones run before or after defaults? I have a replace_metadata in defaults that changes it:

Code:
replace_metadata: 
## Prettyizes fanfiction publishers.
 site=>www.fanfiction.net=>FanFiction.net
 site=>archiveofourown.org=>Archive of Our Own
also, commenting out the line with FanFiction.net didn't help anyways....

Last edited by ownedbycats; 04-15-2021 at 12:50 AM.
ownedbycats is online now   Reply With Quote
Old 04-15-2021, 06:42 AM   #5804
Ascello
Enthusiast
Ascello began at the beginning.
 
Posts: 45
Karma: 10
Join Date: Jan 2021
Device: Kindle Paperwhite 4
Quote:
Originally Posted by ownedbycats View Post
Do the site-specific ones run before or after defaults? I have a replace_metadata in defaults that changes it:

Code:
replace_metadata: 
## Prettyizes fanfiction publishers.
 site=>www.fanfiction.net=>FanFiction.net
 site=>archiveofourown.org=>Archive of Our Own
also, commenting out the line with FanFiction.net didn't help anyways....
Shouldn't that be "publisher" not "site"? That's what I use to change the publisher look in the title page.

Quote:
Originally Posted by JimmXinu View Post
Detailed discussion of regular expression complexity and efficiency is rather out of scope for this group. FFF uses Python's re library, I'm sure one can find both practical and scholarly articles on regexp complexity--I know it featured in several of my ComSci classes once upon a time.

Short answer: yes, replace_metadata lines are checked against everything that they might apply to and adding more numerous and more complex lines can cause noticeable slowdowns.

I believe the practical limit is somewhere that I would call "waaaay beyond reasonable". Because there are regulars here who routinely use setups that I would call "waaaay beyond reasonable".
Yeah, I was actually thinking about doing something waaaaay waaaaaay beyond reasonable, but now that I know, I won't. I don't want FFF to download one fic for 5 hours.

Also, just wanted to add that https://archive.skyehawke.com/ seems to be down for good.

EDIT: Another two things. Sorry for being a pain and a bother.

1. FFF seems not to collect ratings from ncisfiction.com. Is there a way i can fix it? Example: https://www.ncisfiction.com/viewstory.php?sid=6625
2. Is there a way to delete certain words from descriptions (summaries) of fics?

Last edited by Ascello; 04-15-2021 at 08:39 AM. Reason: Always more problems.
Ascello is offline   Reply With Quote
Old 04-15-2021, 11:00 AM   #5805
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 JimmXinu View Post
Re: adapter_storiesonlinenet login: I'm not seeing any problems. Transient site issue?

I vaguely recall hitting the site manually in a browser 'primes' it some how and makes downloads work again?
I think you are right about it being transient. I saw problems last night, both with FFF and the browser. But tonight there are no problems.
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 05:41 PM.


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