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 07-01-2024, 04:09 PM   #9706
tkshorty
Junior Member
tkshorty began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2024
Device: Koba Aura
Quote:
Originally Posted by JimmXinu View Post
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!'.

Hi JimmXinu,

I was told by the author of ActionChains, that if you add the code above to a file called action_chains.py and save that file to the root directory of your plugin it will automatically add this to the imported events in action chain.

I tried this out while only changing the name in your code and it works fine for me.

would you consider adding such a file in a future version?


also a tip for other users:
if you use this and count pages plugin started from FFF you may run into issues if count pages and some actions of your chain run simultainiously. only your action chain or the count pages may be performed for some books. Guess some actions put a lock on some attributes or the whole book.

To prevent this just disable count pages from the FFF plugin in run it from your action chain and set the checkbox to wait for it to finish
tkshorty is offline   Reply With Quote
Old 07-01-2024, 04:44 PM   #9707
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,592
Karma: 4600349
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
That code & quote are a post I made when I added basic support for Action Chains.

I don't see anything in the Action Chains thread about this recently, so I don't know what capink may have said about it.

There's some discussion from 2021 about action_chains.py, but at the time it was called "Experimental". If there's a post declaring it no longer experimental, I didn't find it.
JimmXinu is online now   Reply With Quote
Advert
Old 07-01-2024, 04:53 PM   #9708
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: 9,543
Karma: 64960981
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
It's in this thread: https://www.mobileread.com/forums/sh...=341497&page=5
ownedbycats is online now   Reply With Quote
Old 07-01-2024, 05:27 PM   #9709
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,592
Karma: 4600349
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
New Version Released

Version 4.36.0 - 2024-07-01
- Built-in Event For Action Chains plugin
- Catch bad href searches during internal link anchor search.
- adapter_spiritfanfictioncom: use_basic_cache:true
- adapter_spiritfanfictioncom: Cheesy fix for py2 not knowing %z in dates.
- New Site: SpiritFanfiction.com Portuguese language site (#1078) thanks kilandra
- XF2: SB/SV changed the header for thread_status
- adapter_ficbooknet: adapter_ficbooknet: Better fixes for py2 from dbhmw
- adapter_ficbooknet: Fix breakage for proxies & add covers #1077 - #1076, thanks dbhmw

Hopefully I don't regret including this last minute change.
JimmXinu is online now   Reply With Quote
Old 07-02-2024, 12:37 AM   #9710
capink
Wizard
capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.capink ought to be getting tired of karma fortunes by now.
 
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
Quote:
Originally Posted by JimmXinu View Post
That code & quote are a post I made when I added basic support for Action Chains.

I don't see anything in the Action Chains thread about this recently, so I don't know what capink may have said about it.

There's some discussion from 2021 about action_chains.py, but at the time it was called "Experimental". If there's a post declaring it no longer experimental, I didn't find it.
The action_chain.py part is stable, I have no intention of changing it. I use this in two of my other plugins to provide resources to action chains. So this part went through multiple iterations until it reached this version that I am satisfied with.

The Experimental part has to do with the second modules aspect. This part of the API is not used in any of my plugins, and I am not sure it is currently implemented in the best possible way. I've updated the post to differentiate between the two.

Last edited by capink; 07-02-2024 at 12:55 AM.
capink is offline   Reply With Quote
Advert
Old 07-02-2024, 02:05 AM   #9711
oenwolf
Junior Member
oenwolf began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jul 2020
Device: none
Bit of a strange request. I have a bunch of ao3 HTML files. The author deleted his stories from the ao3 website, but before deleting he downloaded his stories in the html format, which he provides as an archive.

I'd like to convert them to EPUBs, formatted in the classic FanFicFare way. Is there a way I can feed the html files to fanficfare and have it convert them for me? Maybe through the CLI?

If the code needs to be modified, I'm decent at coding, so if you could provide even a brief roadmap, I'll try my hand at it.
oenwolf is offline   Reply With Quote
Old 07-02-2024, 08:11 AM   #9712
tkshorty
Junior Member
tkshorty began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Jun 2024
Device: Koba Aura
Thumbs up

Quote:
Originally Posted by JimmXinu View Post
New Version Released

Version 4.36.0 - 2024-07-01
- Built-in Event For Action Chains plugin
- Catch bad href searches during internal link anchor search.
- adapter_spiritfanfictioncom: use_basic_cache:true
- adapter_spiritfanfictioncom: Cheesy fix for py2 not knowing %z in dates.
- New Site: SpiritFanfiction.com Portuguese language site (#1078) thanks kilandra
- XF2: SB/SV changed the header for thread_status
- adapter_ficbooknet: adapter_ficbooknet: Better fixes for py2 from dbhmw
- adapter_ficbooknet: Fix breakage for proxies & add covers #1077 - #1076, thanks dbhmw

Hopefully I don't regret including this last minute change.
Thank you for including it
tkshorty is offline   Reply With Quote
Old 07-03-2024, 06:09 PM   #9713
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,592
Karma: 4600349
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by oenwolf View Post
Bit of a strange request. I have a bunch of ao3 HTML files. The author deleted his stories from the ao3 website, but before deleting he downloaded his stories in the html format, which he provides as an archive.

I'd like to convert them to EPUBs, formatted in the classic FanFicFare way. Is there a way I can feed the html files to fanficfare and have it convert them for me? Maybe through the CLI?

If the code needs to be modified, I'm decent at coding, so if you could provide even a brief roadmap, I'll try my hand at it.
There is a way using the [teststory] development feature which is implemented in fanficfare/adapters/adapter_test1.py

Example:
Code:
[teststory:1000]

## Add additional sections with different numbers to get different
## parameters for different story urls.
## test1.com?sid=1000
# note the leading commas when doing add_to_ with valid_entries and *_list
add_to_valid_entries:,favs
title:Testing New Feature {{storyId}}
author_list:Bob Smith
authorId_list:45
authorUrl_list:http://test1.com?authid=45
datePublished:2013-03-15
dateUpdated:2013-04-15
numWords:1456
favs:56
series:The Great Test [4]
seriesUrl:http://test1.com?seriesid=1
rating:Tweenie
category_list:Harry Potter,Furbie,Crossover,Puella Magi Madoka Magica/魔法少女まどか★マギカ,Magical Girl Lyrical Nanoha
genre_list:Fantasy,Comedy,Sci-Fi,Noir
warnings_list:Swearing,Violence
characters_list:Bob Smith,George Johnson,Fred Smythe
chapter_urls:
 file://....,Chapter 1 Title
 file://....,Chapter 2 Title
 file://....,Chapter 3 Title
I'm away from computer for a lot of this week, FYI.
JimmXinu is online now   Reply With Quote
Old 07-03-2024, 11:08 PM   #9714
Shiznat
Junior Member
Shiznat began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2024
Device: Kidler
Gracias

Quote:
Originally Posted by JimmXinu View Post
New Version Released

Version 4.36.0 - 2024-07-01
- Built-in Event For Action Chains plugin
- Catch bad href searches during internal link anchor search.
- adapter_spiritfanfictioncom: use_basic_cache:true
- adapter_spiritfanfictioncom: Cheesy fix for py2 not knowing %z in dates.
- New Site: SpiritFanfiction.com Portuguese language site (#1078) thanks kilandra
- XF2: SB/SV changed the header for thread_status
- adapter_ficbooknet: adapter_ficbooknet: Better fixes for py2 from dbhmw
- adapter_ficbooknet: Fix breakage for proxies & add covers #1077 - #1076, thanks dbhmw

Hopefully I don't regret including this last minute change.
Thank you for including this page although I have not been able to get the caliber plugin to work with it spiritfanfictioncom
Shiznat is offline   Reply With Quote
Old 07-04-2024, 11:55 PM   #9715
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: 9,543
Karma: 64960981
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Code:
[archiveofourown.org]
add_to_keep_html_attrs:,title,align,blockquote,div

[https://archiveofourown.org/works/55777813]
strip_chapter_numbers: true
add_to_keep_html_attrs:,title,blockquote,div
keep_empty_tags:td,th
I'm still getting <p align="left"> on this specific story due to the two keep_html_attrs getting added together. Is there an opposite of keep_html_attrs that specifically removes them?

EDIT: Also, a separate issue - upon downloading any fanfics from this site, it doesn't seem to be picking up the category, only the extracategory defined in defaults.ini (and if I blank it out in personal it results in no categories). Is this something intended or the adapter not working as expected?

Last edited by ownedbycats; 07-05-2024 at 04:14 AM.
ownedbycats is online now   Reply With Quote
Old 07-05-2024, 02:09 PM   #9716
zencricket
Junior Member
zencricket began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2024
Device: kindle paperwhite
Quote:
Originally Posted by fishing_forever View Post
I'm not too sure how to check if it's a cover image. In the Edit Book feature, the title page is an .xhtml file.

Also, in the Edit Book feature, the margins are changing accordingly, but that doesn't show up if I use the Calibre ebook reader. In the Calibre ebook reader, the margins don't change at all, but none of the words get cut off there.
I have found some pretty significant differences in the style rendering between the Edit Book feature and the Calibre ebook reader. When I am working on changing a style I use the inspector in the ebook reader to look at and modify the styles first. Then I copy the style to the stylesheet.css in Edit Book.
zencricket is offline   Reply With Quote
Old 07-05-2024, 03:08 PM   #9717
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,443
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by fishing_forever View Post
I'm not too sure how to check if it's a cover image. In the Edit Book feature, the title page is an .xhtml file.

e.
In the Editors Booklist: There is a blue icon (happens to be the same as in the Metadata editor, only smaller) next to the declared 'Cover' page
AND
Next to the image filename

(both are required to be a books 'Cover'
theducks is offline   Reply With Quote
Old 07-06-2024, 03:10 AM   #9718
bianca.slate
Junior Member
bianca.slate began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2014
Device: kindle/calibre
Fanfiction.Net Gives Me Trouble

I had hoped this latest version would help me update the stories I follow on fanfiction.net. Unfortunately, I have only more errors. First I got an error saying:

"HTTP Error in FFF '403 Client Error: Forbidden for url:https://www.fanfiction.net/s/126004882/1/'(403)."

So I changed my browser to Firefox and changed the browser_cache_path to:
Spoiler:

C:\Users\<my-username>\AppData\Local\Mozilla\Firefox\Profiles\2 oc00l9a.default-release\cache2

I now get a different error:

"Directory does not contain a known browser cache type: 'C:\Program Files\Calibre2'"

Now I am really confused. Any ideas? Thanks in advance!

************************************************** ***
Copy of Safe.ini:

[defaults]
is_adult:true


## Fanfiction.net workaround start
## 1. Figure out where your browser cache directory is and in personal.ini (see INI File page for location)
## set browser_cache_path under [defaults]. Many browsers will tell you your cache location if you enter about:cache
## into the address bar. There are additional suggestions listed below.
##
## 2. Set use_browser_cache:true under [www.fanfiction.net].
## 3. Navigate in your browser to chapter 1 of the the story you want to download.
## 4. Click the cover image thumbnail to see the bigger version--if you care about covers.
## 5. Click the author link once if you care about not getting the author image as cover.
## 6. Click through all the chapters of the story. Or, if you are updating an existing story, click the first and last chapters (or all new chapters).
## Note: If you see a Cloudflare page before you see a story chapter page (usually when you first go to the site), that page is
## not loaded in cache correctly. You need to load it again by clicking in the address bar and hitting Enter (remove ?__cf...
## you may see), or by clicking to a different chapter/page and clicking a link back (not your browser back button). You may
## also need to hit Ctrl-R or click the reload button--if you see a 'Resend data' dialog on reload, you aren't on the direct page yet.
## Also see the section below about WebToEpub.(https://github.com/JimmXinu/FanFicFa...ture#WebToEpub)
## Download story in FanFicFare as normal.
## Alternatively, starting with v4.20, you can skip steps 3-6 and instead set open_pages_in_browser:true in personal.ini. FFF will open
## pages it doesn't already find in browser cache in your default browser to populate the browser cache. This requires that you use your default
## browser with browser_cache_path.


browser_cache_path:C:\Users\<my-username>\AppData\Local\Mozilla\Firefox\Profiles\2 oc00l9a.default-release\cache2


[epub]
include_images:true
keep_summary_html:true


[www.fanfiction.net]
## slow_down_sleep_time:2
username:XXXXXXXX
password:XXXXXXXX
use_browser_cache:true
open_pages_in_browser:true


## This section will override anything in the system defaults or other
## sections here.
[overrides]
## default varies by site. Set true here to force all sites to
## collect series.
#collect_series: true

Last edited by theducks; 07-06-2024 at 12:53 PM. Reason: SPOILER LOG files
bianca.slate is offline   Reply With Quote
Old 07-06-2024, 11:05 AM   #9719
MrKonan
Member
MrKonan began at the beginning.
 
Posts: 22
Karma: 10
Join Date: Sep 2017
Device: iPad/Kindle App
Hi, ever since the last update I'm having issue with FFF+SOL site. Whenever I've added or updated books to my library. FFF is adding an " 's Page" to the end of the author name metadata (ie: John Doe's Page)

second issue (not relating to last update) whenever I'm updating an anthology from SOL. FFF is using multiple urls for single book

ie: from https://<sol>/a/pars001

sol/s/13452/killing-time
sol/s/13452
sol/s/12893/plain-joe
sol/s/12893
sol/s/12715/the-mission
sol/s/12715
sol/s/17757/times-like-these
sol/s/17757

Thanks

Last edited by MrKonan; 07-06-2024 at 11:12 AM.
MrKonan is offline   Reply With Quote
Old 07-07-2024, 11:23 AM   #9720
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,592
Karma: 4600349
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Multi-reply

Quote:
Originally Posted by ownedbycats View Post
Code:
[archiveofourown.org]
add_to_keep_html_attrs:,title,align,blockquote,div

[https://archiveofourown.org/works/55777813]
strip_chapter_numbers: true
add_to_keep_html_attrs:,title,blockquote,div
keep_empty_tags:td,th
I'm still getting <p align="left"> on this specific story due to the two keep_html_attrs getting added together. Is there an opposite of keep_html_attrs that specifically removes them?
No, this is a known limitation.

Quote:
Originally Posted by ownedbycats View Post
EDIT: Also, a separate issue - upon downloading any fanfics from this site, it doesn't seem to be picking up the category, only the extracategory defined in defaults.ini (and if I blank it out in personal it results in no categories). Is this something intended or the adapter not working as expected?
adastrafanfic.com didn't get all the same defaults.ini setting. I'll add them.

Quote:
Originally Posted by MrKonan View Post
Hi, ever since the last update I'm having issue with FFF+SOL site. Whenever I've added or updated books to my library. FFF is adding an " 's Page" to the end of the author name metadata (ie: John Doe's Page)
Site has changed from using 's Page to s Page. Fix in next test version.
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 495 10-19-2024 07:06 AM
[GUI Plugin] Open With kiwidude Plugins 403 04-01-2024 09:39 AM
[GUI Plugin] Marvin XD Philantrop Plugins 126 01-29-2017 01:48 PM
[GUI Plugin] KiNotes -axel- Plugins 0 07-14-2013 07:39 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 01:27 PM


All times are GMT -4. The time now is 03:25 PM.


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