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 05-28-2024, 01:26 PM   #9631
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: 8,784
Karma: 62032371
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by JimmXinu View Post
Someone over on github #1073 has asked:

Some basic research found this and this post.

I've proven that I can add a pyqtSignal() to FFF, emit() it after the "proceed with updating your library" dialog and get an Action Chains custom ChainEvent module to fire a chain.

The questions I have are:
  1. What events in FFF should have signals that Action Chains can monitor?
  2. What information, if any, can or should be passed via the signal(s)?
I was thinking of requesting something similar myself!

I would have it upon adding/updating a new fic, primarily. I have a 'fanfiction cleanup' chain that handles a bit of Calibre metadata processing that can't be done with FFF itself.
ownedbycats is offline   Reply With Quote
Old 05-28-2024, 05:04 PM   #9632
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,376
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by JimmXinu View Post
I've proven that I can add a pyqtSignal() to FFF, emit() it after the "proceed with updating your library" dialog and get an Action Chains custom ChainEvent module to fire a chain.

The questions I have are:
  1. What events in FFF should have signals that Action Chains can monitor?
  2. What information, if any, can or should be passed via the signal(s)?
More info: There are three times in FFF plugin that self.gui.proceed_question() will be called:
  1. Successful update or new download of normal book(s), and (optionally) update of error column for any failures.
  2. Successful update or new download of Anthology book. (Update/download aborts if no stories in the anthology succeeded.)
  3. Update of error column only when all updates/downloads fail (optionally).

If all of these cases emit the same signal, is that useful? Or is someone going to ask to have them separated immediately?
JimmXinu is offline   Reply With Quote
Old 05-28-2024, 06:28 PM   #9633
bigwoof
Connoisseur
bigwoof began at the beginning.
 
Posts: 85
Karma: 18
Join Date: Jun 2020
Device: Kindle Paperwhite 32G
Quote:
Originally Posted by JimmXinu View Post
[*]Successful update or new download of normal book(s), and (optionally) update of error column for any failures.[*]Successful update or new download of Anthology book. (Update/download aborts if no stories in the anthology succeeded.)[*]Update of error column only when all updates/downloads fail (optionally).
I have a chain that I run only when new books are added (it sets all the tags properly). so something that runs when new books are added would be great.

Thanks!
bigwoof is offline   Reply With Quote
Old 05-28-2024, 06:31 PM   #9634
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: 8,784
Karma: 62032371
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by JimmXinu View Post
More info: There are three times in FFF plugin that self.gui.proceed_question() will be called:
  1. Successful update or new download of normal book(s), and (optionally) update of error column for any failures.
  2. Successful update or new download of Anthology book. (Update/download aborts if no stories in the anthology succeeded.)
  3. Update of error column only when all updates/downloads fail (optionally).

If all of these cases emit the same signal, is that useful? Or is someone going to ask to have them separated immediately?
I think some separation for new and updated books makes sense.
ownedbycats is offline   Reply With Quote
Old 05-28-2024, 08:21 PM   #9635
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,376
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by bigwoof View Post
I have a chain that I run only when new books are added (it sets all the tags properly). so something that runs when new books are added would be great.
Quote:
Originally Posted by ownedbycats View Post
I think some separation for new and updated books makes sense.
That's not actually on offer. FFF can and does download new stories and update existing stories at the same time. And errors, all in the same library update.

I assume you'll have to design your Action Chains to find and select the books to operate on based on the metadata written to the library columns by FFF.

I honestly haven't pursued a deep understanding of Action Chains.

FFF has options to mark Success/Fail/Chapter Error books and then 'show' them, but even then, the books are not selected.
JimmXinu is offline   Reply With Quote
Old 05-28-2024, 10:01 PM   #9636
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: 8,784
Karma: 62032371
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
In my specific case, I design my chains to be as non-destructive as possible (I've accidentally run it over non-fanfics and gotten zero changes), but it might be a concern for other users.
ownedbycats is offline   Reply With Quote
Old 05-28-2024, 11:00 PM   #9637
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,376
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Test Version

2024-05-28
- Add download_finished_signal for Action Chains #1073
- New Site: touchfluffytail.org (#1071) thanks dbhmw

The FFF plugin has a signal it will emit after the "proceed with updating your library" dialog.

The code for the Action Chains Module I tested with is:
Code:
from calibre_plugins.action_chains.events import ChainEvent

class SearchChanged(ChainEvent):

    # replace with the name of your event
    name = 'FFF done'

    def get_event_signal(self):
        return self.gui.iactions['FanFicFare'].download_finished_signal
All I've done with it is call a chain that printed 'HERE!'.
JimmXinu is offline   Reply With Quote
Old Yesterday, 06:10 PM   #9638
johansolo
Hero for hire
johansolo began at the beginning.
 
johansolo's Avatar
 
Posts: 6
Karma: 10
Join Date: Aug 2009
Location: Sol-3
Device: KOReader (in a Kobo Clara HD)
First of all, this plugin is wonderfull!!!

And now with my question.

I have downloaded several stories from Scribblehub. (The conversion was perfect I only had to edit personal.ini to modify the css and add indentation.)

But I use KOReader to read epubs and the cover is tiny.

I have seen that cover.xhtml does not have "<link href="stylesheet.css" type="text/css" rel="stylesheet"/>" and "<img src="images/cover.jpg" alt="cover "/>" has no class.

Is there a way to add that code automatically so later I can tinkering with personal.ini to adjust css?

Thanks.

SFW link
https://www.scribblehub.com/series/1...iverse-litrpg/

Screenshots from KOReader and Calibre reader attached. The KOReader screenshot my appear large but the e-reader actually has only 6''.

EDIT: Sorry for my English, is not my native language.
Attached Thumbnails
Click image for larger version

Name:	Versewalker (KOReader).png
Views:	8
Size:	69.5 KB
ID:	208573   Click image for larger version

Name:	Versewalker (Calibre reader).jpg
Views:	6
Size:	149.1 KB
ID:	208574  
johansolo is offline   Reply With Quote
Old Yesterday, 06:39 PM   #9639
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,376
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by johansolo View Post
Is there a way to add that code automatically so later I can tinkering with personal.ini to adjust css?
You can customize the HTML generated for cover.xhtml using the cover_content setting. Changing it to include <link href="stylesheet.css" type="text/css" rel="stylesheet"/> should be easy enough.

See CustomOutput wiki page.

Also, be aware that by default FFF reduces the size of large cover images to a 'reasonable' default:
Code:
[epub]
# ...
## Resize images down to width, height, preserving aspect ratio.
## Nook size, with margin.
image_max_size: 580, 725
Your example already has a smaller image, so it wouldn't matter in that case.
JimmXinu is offline   Reply With Quote
Old Yesterday, 07:32 PM   #9640
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: 8,784
Karma: 62032371
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by JimmXinu View Post
The FFF plugin has a signal it will emit after the "proceed with updating your library" dialog.

The code for the Action Chains Module I tested with is:
Code:
from calibre_plugins.action_chains.events import ChainEvent

class SearchChanged(ChainEvent):

    # replace with the name of your event
    name = 'FFF done'

    def get_event_signal(self):
        return self.gui.iactions['FanFicFare'].download_finished_signal
All I've done with it is call a chain that printed 'HERE!'.


If 'mark added/updated books when finished' is enabled, these selection modifier settings will select all updated books.

Click image for larger version

Name:	2024-05-29 20_30_43-Selection Modifier.png
Views:	11
Size:	25.1 KB
ID:	208578

I created a chain with this selection modifier and then a chain caller to my fanfic cleanup chain. Seems to work as intended.

Last edited by ownedbycats; Yesterday at 07:35 PM.
ownedbycats is offline   Reply With Quote
Old Yesterday, 08:03 PM   #9641
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,376
Karma: 3966377
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
That reminds me about something that could be helpful.

FFF actually uses different marks for successful, failed and chapter error, as well as for an updated/created anthology:
  • fff_success
  • fff_failed
  • fff_chapter_error
  • fff_anthology

Technically, each book is marked with a sequence number like, "fff_success_0001" so that order is also preserved.
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 08:32 AM.


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