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-14-2021, 05:04 PM   #6541
Hortensia
Enthusiast
Hortensia began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jul 2021
Device: Kindle Paperwhite, Kobo Libra 2
Hello,

Using the personal.ini file, I am trying to simplify the ships tags which are automatically downloaded with the fic from: "Character A & Character B, Character A/Character B" to "Character A/Character B".

I think this should go after the following bit of code in my personal.ini file:
Code:
sort_ships:true
sort_ships_splits:
 [ ]*/[ ]*=>/
 [ ]*&[ ]*=>\s&\s
and be written like:
Code:
[ ]*&[ ]*\,[ ]*/[ ]*=>[ ]*/[ ]*
but I do not know how to check if the brackets contain the same characters.

Is there a possibility to do so?

Thanks!
Hortensia is offline   Reply With Quote
Old 10-14-2021, 05:43 PM   #6542
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,995
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by Hortensia View Post
Using the personal.ini file, I am trying to simplify the ships tags which are automatically downloaded with the fic from: "Character A & Character B, Character A/Character B" to "Character A/Character B".
If you simply change all '&' to '/', that will accomplish what you literally ask:

Code:
sort_ships:true
sort_ships_splits:
 [ ]*/[ ]*=>/
 [ ]*&[ ]*=>/
"Character A & Character B, Character A/Character B" becomes "Character A/Character B, Character A/Character B" and then the built-in de-duping will reduce it to "Character A/Character B".

However, that will affect all values of ships.

If what you mean is to remove "Character A & Character B" only when "Character A/Character B" is also present--and not change "Character C & Character D" to "Character C/Character D", that's more complex.

Instead of changing sort_ships_splits, you would use replace_metadata. sort_ships:true is still needed to catch "Character A & Character B" vs "Character B & Character A" (note order), and you cannot have set keep_in_order_ships:true--this solution depends on having the & version immediately before the / version.

Code:
sort_ships:true
replace_metadata:
  ships_LIST=>([^&]+) & ([^&]+), \1/\2=>\1/\2
The \1 and \2 match the prior () groupings as usual for regex.

You have to use ships_LIST instead of just ships because otherwise the & and / entries are treated separately.

This works for the small handful of test cases I've done, but I won't be surprised if it has issues I haven't thought of.

It's usually easier to talk about concrete examples (ideally with story URLs) than in the abstract, BTW. Then we can test directly.
JimmXinu is online now   Reply With Quote
Advert
Old 10-14-2021, 06:09 PM   #6543
Hortensia
Enthusiast
Hortensia began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jul 2021
Device: Kindle Paperwhite, Kobo Libra 2
Works like a charm, thank you!
Hortensia is offline   Reply With Quote
Old 10-15-2021, 11:15 AM   #6544
fanfictioneer
Enthusiast
fanfictioneer doesn't litterfanfictioneer doesn't litter
 
Posts: 26
Karma: 110
Join Date: Oct 2018
Device: Kindle
Quote:
Originally Posted by JimmXinu View Post
Apparently the last test version upload didn't take or something. I've uploaded it again.
Sorry for not responding earlier - I grabbed the test version (4.6.4) and it is still not retrieving royalroad mails, it does seem to take a while, so it is probably retrieving the mails (my notification mailbox has about 220 unread royalroad mails atm, should probably fix the dupes), but it doesn't seem to actually find the links.

Sorry to be a bother. Hope you're going to have a great weekend!
fanfictioneer is offline   Reply With Quote
Old 10-15-2021, 11:42 AM   #6545
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,995
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Sending myself an email containing a copy-paste of the email text you previously posted works for me.

Without more info, I can't help you. If there's a different issue, I'll need to see email(s) with the problematic links.

I suppose that if you can suggest a story on royalroad that updates especially frequently, I could follow it and see what I get in emails.

I would suggest that you reduce the unread emails to only a few for testing.

For each of those emails, FFF is fetching (potentially) several links links because (as previously discussed) royalroad is masking which links are stories and which aren't behind click-through links for purposes of email tracking.

It's possible that hitting so many of the click through links at a time may cause the site to block you.
JimmXinu is online now   Reply With Quote
Advert
Old 10-16-2021, 12:39 PM   #6546
Hortensia
Enthusiast
Hortensia began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jul 2021
Device: Kindle Paperwhite, Kobo Libra 2
After using FanFicFare, I would like to perform some actions using the Action Chains plugin. This plugin has an Event Manager which can be used to run a chain when an event is triggered. Custom events can be created if the correct trigger is known (see last part of capink's post on Action Chains' module editor).

Is there some sort of signal/flag sent to Calibre by FFF which could be used as a trigger for Action Chains?
Hortensia is offline   Reply With Quote
Old 10-16-2021, 03:03 PM   #6547
serpi
Member
serpi began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Oct 2021
Device: kindle
New to FanFicFare, have a few questions.

I've recently gotten the calibre+fanficfare combo and wanted to know if I can do a few things.

-When trying to add all my bookmarks from AO3 using 'Get story URLS from Webpage' I get a "No valid story URLs found on given page" is there something I have to do to get this to work? All my bookmarks are private, will that effect it?
-I have used Bookmarker tags for some fics to keep them organised. Is there a way I can create columns for these specific tags, so they're organised in Calibre.
serpi is offline   Reply With Quote
Old 10-16-2021, 04:34 PM   #6548
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,995
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
New Test Version Posted

2021-10-16
- Update bundled certifi to 2021.10.08
- Switch config _filelist feature from using urllig.request.build_opener to fetcher.RequestsFetcher.
- Switching royalroad.com specific 'get from imap' code to use fetcher instead of urllib. For #746
JimmXinu is online now   Reply With Quote
Old 10-16-2021, 04:50 PM   #6549
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,995
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Multi-reply

Quote:
Originally Posted by Hortensia View Post
...
Is there some sort of signal/flag sent to Calibre by FFF which could be used as a trigger for Action Chains?
I confess that I haven't looked at Action Chains in any detail. FFF already performs all the actions I want done automatically.

I'm not opposed to FFF sending some signal to Action Chains--FFF integrates with several other plugins--but I don't know how or when would be appropriate. And the existing auto-actions and integration with other plugins must also be taken into account.

Quote:
Originally Posted by serpi View Post
-When trying to add all my bookmarks from AO3 using 'Get story URLS from Webpage' I get a "No valid story URLs found on given page" is there something I have to do to get this to work? All my bookmarks are private, will that effect it?
Yes, you probably need to configure these in personal.ini before FFF can see your bookmarks:
Code:
[archiveofourown.org]
always_login:true
username:You
password:YourPassword
Quote:
Originally Posted by serpi View Post
-I have used Bookmarker tags for some fics to keep them organised. Is there a way I can create columns for these specific tags, so they're organised in Calibre.
Some of the site-specific metadata collected for AO3 are: bookmarked, bookmarktags, bookmarksummary, bookmarkprivate, bookmarkrec

You should be able use custom_columns_settings in personal.ini to set those to custom columns as desired. Also will require user/pass and always_login:true to see your personal bookmarks. Look in the defaults.ini (there's a button on the personal.ini tab) and search for custom_columns_settings.
JimmXinu is online now   Reply With Quote
Old 10-16-2021, 04:56 PM   #6550
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: 11,037
Karma: 75555555
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Quote:
Originally Posted by JimmXinu View Post
Multi-reply



I confess that I haven't looked at Action Chains in any detail. FFF already performs all the actions I want done automatically.

I'm not opposed to FFF sending some signal to Action Chains--FFF integrates with several other plugins--but I don't know how or when would be appropriate. And the existing auto-actions and integration with other plugins must also be taken into account.
I figure that it would be triggered at the same time that the count page plugin would be triggered; this would allow the chain to do a selection modifier for marked:fff and run the actions on those books.

I have a chain myself that does a handful of cleanup tasks that I couldn't figure out how to do within FFF itself (e.g. copy the URL identifiers to custom ffnet/ao3 ones, removing the "crossover" tag from specific combinations of fandoms), though I prefer to trigger it manually.

Last edited by ownedbycats; 10-16-2021 at 05:00 PM.
ownedbycats is online now   Reply With Quote
Old 10-16-2021, 05:01 PM   #6551
Hortensia
Enthusiast
Hortensia began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jul 2021
Device: Kindle Paperwhite, Kobo Libra 2
Quote:
Originally Posted by JimmXinu View Post
I'm not opposed to FFF sending some signal to Action Chains--FFF integrates with several other plugins--but I don't know how or when would be appropriate. And the existing auto-actions and integration with other plugins must also be taken into account.
It is more not really a question of integrating both plugins together but mostly whether you already inform Calibre than FFF is done working (after a fic is downloaded and converted, for example) or if it simply happens without any additional signal being given to Calibre.

I don't want to give you additional work, it is already a wonderful plugin!
Hortensia is offline   Reply With Quote
Old 10-16-2021, 05:12 PM   #6552
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,995
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
FFF 'notifies' Calibre in so far as Calibre requires plugins to use the proceed_question() dialog when updating metadata to guarantee nothing else will conflict.

For auto-conversion, FFF launches a Calibre background conversion process. It doesn't return to FFF after that, so there's no way for FFF to notify anyone about it.
JimmXinu is online now   Reply With Quote
Old 10-16-2021, 05:15 PM   #6553
Hortensia
Enthusiast
Hortensia began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jul 2021
Device: Kindle Paperwhite, Kobo Libra 2
Thank you! That's very helpful to know!
Hortensia is offline   Reply With Quote
Old 10-17-2021, 11:34 AM   #6554
serpi
Member
serpi began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Oct 2021
Device: kindle
I asked this earlier, but I'm still a bit lost on how exactly to do a custom column with bookmarker tags in AO3.

When I bookmark a fic it's either tagged with 'private' or not. I don't have any other personalised bookmarker tag.

How and where do I create a custom column that when I download a fic it checks if it has the private tag from my bookmarker tags and will organise it into a column just for the fics tagged with private?

Really I just need to know what piece of code am I putting into the personal.ini, where do I put it, and then where do I access in the GUI or calibre preferences this sorting option. I apologise if this is a big ask, I'm not great with code, so this is my first time playing with it.
serpi is offline   Reply With Quote
Old 10-17-2021, 12:31 PM   #6555
serpi
Member
serpi began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Oct 2021
Device: kindle
Quote:
Originally Posted by serpi View Post
I asked this earlier, but I'm still a bit lost on how exactly to do a custom column with bookmarker tags in AO3.

When I bookmark a fic it's either tagged with 'private' or not. I don't have any other personalised bookmarker tag.

How and where do I create a custom column that when I download a fic it checks if it has the private tag from my bookmarker tags and will organise it into a column just for the fics tagged with private?

Really I just need to know what piece of code am I putting into the personal.ini, where do I put it, and then where do I access in the GUI or calibre preferences this sorting option. I apologise if this is a big ask, I'm not great with code, so this is my first time playing with it.

Managed to figure it out!
serpi 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 09:19 AM.


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