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 Today, 12:04 PM   #10231
chicleeblair
Connoisseur
chicleeblair began at the beginning.
 
Posts: 89
Karma: 10
Join Date: Sep 2018
Device: iPad mini
Getting this error repeatedly with a fic from ff.net

Quote:
"Browser Cache Failed to Load with error ''utf-8' codec can't decode byte 0x8b in position 1: invalid start byte'"

URL: https://www.fanfiction.net/s/14434163/1/
M3 Macbook running Sequoia 15.2 Calibre and plugin up to date.
Browser: Chrome
chicleeblair is offline   Reply With Quote
Old Today, 12:07 PM   #10232
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,656
Karma: 4600391
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Quote:
Originally Posted by chicleeblair View Post
Getting this error repeatedly with a fic from ff.net
Have you tried the test version? That sounds like this issue addressed a couple days ago.
JimmXinu is offline   Reply With Quote
Old Today, 02:40 PM   #10233
enquidu
Junior Member
enquidu began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2023
Device: none
Hello,

Is there a way to prepend a string to all fandom tags that don't match a given list?

For example, I have all my Hobbit and LotR tags automatically renamed to "Tolkien.Hobbit" and "Tolkien.LotR" but my Stranger Things tag is just "Stranger Things (TV 2016)". Is there any code I can put in after add_to_replace_metadata, that if it the fandom tags don't match a given list of tags (in this case, if they don't start with "Tolkien." or match "Stranger Things (TV 2016)"), then to put "_Misc." in front of each tag that doesn't match?

I'd like to be able to see at a glance which fandom tags need to be cleaned up and to reduce the clutter from random one-off fandoms in my fandom tags list and I think this might be the way to do it.

Thank you!
enquidu is offline   Reply With Quote
Old Today, 03:02 PM   #10234
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,656
Karma: 4600391
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
Each replace_metadata line is considered separately, there isn't a mechanism for "didn't match any other line".

One option would be:

You might add your "_Misc." prefix to all entries before looking for specifics like Tolkien and then remove it as part of setting Tolkien.

A second option would be:

There are '.'s in some fandoms, so we can't use that reliably detect already prefixed lines. But it would be possible if you use something other than '.' as the separator during processing--something reasonably expected to be unused anywhere else. Subsitute in "Tolkien__MYDELIMITER__Hobbit" for example.

Then add lines to first prepend your "_Misc." to any entry that doesn't contain "__MYDELIMITER__" (needs to use negative lookahead (?!...) ) and then a final line to change "__MYDELIMITER__" back to '.'.
JimmXinu is offline   Reply With Quote
Old Today, 04:37 PM   #10235
enquidu
Junior Member
enquidu began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2023
Device: none
Quote:
Originally Posted by JimmXinu View Post
You might add your "_Misc." prefix to all entries before looking for specifics like Tolkien and then remove it as part of setting Tolkien.
Thank you! I like the idea of just applying "_Misc." to all fandom tags and then that prefix would be removed as the fandom tag gets formatted correctly.

I added "category=>(.*)=>_Misc.\1" to replace_metadata, but it's adding "_Misc." to both the the beginning and the end of each fandom tag.

Did I do that correctly, or should I maybe add it somewhere other than replace_metadata?
enquidu is offline   Reply With Quote
Old Today, 04:49 PM   #10236
enquidu
Junior Member
enquidu began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jun 2023
Device: none
Quote:
Originally Posted by enquidu View Post
Thank you! I like the idea of just applying "_Misc." to all fandom tags and then that prefix would be removed as the fandom tag gets formatted correctly.

I added "category=>(.*)=>_Misc.\1" to replace_metadata, but it's adding "_Misc." to both the the beginning and the end of each fandom tag.

Did I do that correctly, or should I maybe add it somewhere other than replace_metadata?
Nevermind! It turns out it needs to be + instead of a * to prepend it, so: "category=>(.+)=>_Misc.\1"

Thanks again!
enquidu is offline   Reply With Quote
Old Today, 05:51 PM   #10237
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,656
Karma: 4600391
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
I would use "category=>^(.*)$=>_Misc.\1" adding ^ (beginning string) and $ (end of string) anchors, just to be sure. There have been cases in past where it was necessary.
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 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 07:30 PM.


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