![]() |
#2956 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,993
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
Also, Calibre has an apparently identical, but separate set of rules you can configure for Adding books. Which would actually be appropriate to apply? Or one for new books and the other for updates? Or using the same Calibre dialog & code to make a FFF specific set of rules? And are any other users interested in having this? EDIT: Scary discovery--the metadata download / add book tag filter rules are not library specific... |
|
![]() |
![]() |
![]() |
#2957 | |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Aug 2018
Device: none
|
Quote:
Is there documentation for that? I have a vague idea what to do looking at the source. |
|
![]() |
![]() |
Advert | |
|
![]() |
#2958 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,993
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
The key steps of creating an adapter are:
Differences in sites makes it hard to choose which adapter to start from, but this adapter has some comments about making a new one. The code is in GitHub. You can fork your own copy of the repos, work there and then create a Pull Request I can merge in. |
|
![]() |
![]() |
![]() |
#2959 | |
hopeless n00b
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Quote:
Because the author_sort tweak is universal instead of per library, I actually run calibre portable and have two completely separate instances for regular books and fanfiction. ![]() I don't believe it will work for custom columns, though. I'm currently testing a refactor of my entire AO3 library (well, a full copy of metadata.db anyway so I can capture all tags in use - both good and bad/freeform). Current plan is: #ships_freeform -> tags -> Tag Mapper (ships ruleset) -> #ships_clean -> nuke tags (so it can be used with other tags) Also planning on trying CALM plugin which can work directly on custom columns but reading the instructions, it looks like setting that up will take a bit longer so I'm saving that for the weekend. |
|
![]() |
![]() |
![]() |
#2960 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,396
Karma: 27756918
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Since tags and authors are common to all libraries, the rulesets are also common to all libraries. If you want to use them for custom colunm, I would suggest re-using the infrastructure, for creating/applying the rules, but use your own code to store the rulesets and load them as needed.
|
![]() |
![]() |
Advert | |
|
![]() |
#2961 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,993
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
I did look at this, both applying one of the existing rule sets and re-using the infrastructure (aka tag_mapper) to create additional rule sets. These are my observations:
And finally, only Tanjamuse and (maybe?) ilovejedd showed any interest. So I'm shelving this proposed change for the time being. A more general tool, like CALM may be useful. |
![]() |
![]() |
![]() |
#2962 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,993
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
New Test Version Posted
2018-10-03 - Handle stories without cover correctly adapter_wwwlushstoriescom. Closes #344 |
![]() |
![]() |
![]() |
#2963 |
Enthusiast
![]() ![]() Posts: 26
Karma: 110
Join Date: Oct 2018
Device: Kindle
|
Feature request:
De-Zalgo-ifying text Reason: My Kindle does not handle large chunks of Zalgo-ified text gracefully. I noticed this in the fanfic Abaddon Borne - basically, my Kindle just gives up when it reaches the Zalgo-ified chunk of text. It handles smaller pieces without a problem, but I think it is when it reaches several rows that the problem really occurs. A super-graceful way of doing it would be to insert "(Zalgo-text starts)" and "(Zalgo-text ends)" at every Zalgo-chunk which is longer than X (characters/words), but that is definitely not what I need - just an option to remove the Zalgo-ified-text. Python code that I use in my modified "Modify Epub" plugin to remove it (originally from Stack Overflow): Code:
import unicodedata ZALGO_CHAR_CATEGORIES = ['Mn', 'Me'] stripped = ''.join([c for c in unicodedata.normalize('NFD', text) if unicodedata.category(c) not in ZALGO_CHAR_CATEGORIES]) |
![]() |
![]() |
![]() |
#2964 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,993
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
That's a very good idea, actually.
![]() However, rather than stripping Zalgo entirely, I wonder if it could be reduced to a minimum amount that would work in readers while still getting the point across? Or a limit number for it that could be set by the user to 0 to remove it entirely. I'll look into it. |
![]() |
![]() |
![]() |
#2965 |
Enthusiast
![]() ![]() Posts: 26
Karma: 110
Join Date: Oct 2018
Device: Kindle
|
Thanks!
That would certainly work, too - the Kindle have no issues with minor Zalgo-fication, but I suspect it runs into issues when it runs into several lines - then it starts to slow down and becomes unresponsive. Something like this should work for your needs (warning: I am a Python n00b, and rusty on top of that): Code:
import unicodedata ZALGO_CHAR_CATEGORIES = ['Mn', 'Me'] maxZalgo = 0 currentZalgo = 0 def deZalgo(c): isZalgo = unicodedata.category(c) in ZALGO_CHAR_CATEGORIES if isZalgo: currentZalgo += 1 if currentZalgo > maxZalgo: currentZalgo = 0 return False return True stripped = ''.join([c for c in unicodedata.normalize('NFD', text) if deZalgo(c)]) Last edited by fanfictioneer; 10-10-2018 at 07:48 AM. |
![]() |
![]() |
![]() |
#2966 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,993
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
New Test Version Posted
2018-10-10 - Add max_zalgo feature. Code:
## Some authors use 'Zalgo' text--arbitrary and often excessive ## added/combined unicode markings--to indicate 'noise' of some kind. ## While a critical part of some languages, when over used it can also ## cause problems for some ebook readers, such as Kindle. ## https://stackoverflow.com/questions/6579844/how-does-zalgo-text-work ## This setting will reduce the number 'Zalgo' characters. Set to 0 ## to remove all of them, -1 or leave undefined for no limit. ## Note: This will also remove other 'marked' unicode characters. If ## set to 0, café will become cafe, déjà -> deja, etc. 1 will keep ## single marks and is the recommended setting if you use it. #max_zalgo:1 |
![]() |
![]() |
![]() |
#2967 |
Enthusiast
![]() Posts: 45
Karma: 10
Join Date: Dec 2014
Device: Kindle Paperwhite
|
Whenever I try to download a fic from FFnet, I get the following error:
NoneType' object has no attribute '__getitem__' This seems to apply to any FFnet link, but I'm giving an example link now as standard practice: https://www.fanfiction.net/s/8873327/1/ The error does not seem to appear with other websites, such as AO3 and SB. I am running FFF version 3.0.0, calibre version 3.28 |
![]() |
![]() |
![]() |
#2968 | |
hopeless n00b
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Quote:
|
|
![]() |
![]() |
![]() |
#2969 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,993
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
If you're still seeing errors, you can post a debug log (run Calibre in debug, under Preferences drop down) and I'll look at it. But otherwise, I assume you're seeing a temporary site issue like ilovejedd said. |
|
![]() |
![]() |
![]() |
#2970 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,993
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
New Test Version Posted
2018-10-11 - Fix adapter_wuxiaworldco date format for 24 hour clock. Closes #345 |
![]() |
![]() |
![]() |
Tags |
fanfiction |
|
![]() |
||||
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 |