![]() |
#2881 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,015
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
|
|
![]() |
![]() |
#2882 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 408
Karma: 1050547
Join Date: Mar 2011
Device: Kindle Oasis 2
|
Choose any two from here: http://nocturnal-light.net/fanfiction/. You'll need to use one of my attached zip files.
And what about the extra metadata include feature? Does that exist currently? Last edited by cryzed; 06-09-2014 at 07:54 AM. |
![]() |
![]() |
#2883 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,015
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
I'll add a note about that to defaults.ini in the next version. Sorry for the confusion.
|
![]() |
![]() |
#2884 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,015
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
Attached is a test version with all of cryzed's committed changes and a fix for the anthology-without-wordcount problem. Last edited by JimmXinu; 06-09-2014 at 07:31 PM. Reason: Remove obsolete beta versions |
|
![]() |
![]() |
#2885 | ||
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,015
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
In the case shown above, "Thor (Movies)" is changed into "Thor" and then doesn't match the next 'Thor \(Movies\)' pattern any more. I expect davidfor is actually using the technique where you add a new metadata item with extra_valid_entries, populate it with a copy of an existing one, then change each separately and merge back together. Quote:
I've arbitrarily chosen '{{,}}' as a separator to indicate to split the replacement string at that point(s) into a list and append the new entries to the end of the list. Because they go to the end, they will in turn have replace_metadata applied. There's a risk of infinite recursion, that I haven't thought about very deeply yet. If you're curious, here's my test case: Spoiler:
Last edited by JimmXinu; 06-10-2014 at 10:08 AM. Reason: Correct typo - was Remove obsolete beta versions |
||
![]() |
![]() |
#2886 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,015
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
But for straightforward cases, it seems to work as intended. The attached version moves the in/exclude_metadata_post checks after the '{{,}}' splitting. Last edited by JimmXinu; 06-12-2014 at 06:49 PM. Reason: Remove obsolete beta versions |
|
![]() |
![]() |
#2887 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,188
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
Code:
replace_metadata: fandoms=>Marvel Cinematic Universe=>Marvel fandoms=>Thor \(Movies\)=>Thor fandoms=>Captain America \(Movies\)=>Captain America fandoms=>Captain America \(Movies\){{,}}Thor \(Movies\)=>Marvel Code:
replace_metadata: fandoms=>Marvel Cinematic Universe=>Marvel fandoms=>Thor \(Movies\)=>Thor fandoms=>Captain America \(Movies\)=>Captain America fandoms=>Thor \(Movies=>\)Thor{{,}}Marvel Thanks for all your help on this, Amalthia |
|
![]() |
![]() |
#2888 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,015
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
![]() Hmmm. Checking the code, the AO3 adapter populates both 'category' and 'fandoms' with the same list. So which ever you prefer to use. But 'category' is a "standard" metadata for FFDL and listed on the Custom Column tab etc. You were trying to use {{,}} backwards. It goes in the output to indicate more than one list entry, not the pattern. If I understand correctly, this will do what you want: change 'Marvel Cinematic Universe' to just 'Marvel' remove the ' (Movies)' part from Captain America and Thor, and make sure that Captain America and Thor movies also have 'Marvel'. Code:
replace_metadata: fandoms=>Marvel Cinematic Universe=>Marvel fandoms=>Captain America \(Movies\)=>Captain America{{,}}Marvel fandoms=>Thor \(Movies\)=>Thor{{,}}Marvel Code:
replace_metadata: fandoms=>Marvel Cinematic Universe=>Marvel fandoms=>(Captain America|Thor|The Avengers) \((Marvel )?Movies\)=>\1{{,}}Marvel |
|
![]() |
![]() |
#2889 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,188
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
|
Quote:
![]() Best Regards, Amalthia |
|
![]() |
![]() |
#2890 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
![]() Quote:
|
||
![]() |
![]() |
#2891 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 408
Karma: 1050547
Join Date: Mar 2011
Device: Kindle Oasis 2
|
@matteo65
Attached is a test version of the plugin with an adapter for http://fanfiction.csodaidok.hu/. Please let me know how it performs. Last edited by cryzed; 06-10-2014 at 04:08 PM. |
![]() |
![]() |
#2892 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,015
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
![]() Yes, that's a typo. My bad. |
|
![]() |
![]() |
#2893 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 408
Karma: 1050547
Join Date: Mar 2011
Device: Kindle Oasis 2
|
Jimm, since you are already using "\s" for a "forced space", wouldn't it make sense to simply use "\," instead of "{{,}}"? Just a suggestion.
|
![]() |
![]() |
#2894 | |
Member
![]() Posts: 13
Karma: 10
Join Date: May 2013
Location: Hungary
Device: Kindle 3, Paperwhite
|
@cryzed
Thank you, its working great with most of the books. Little request to set the language tag to Hungarian instead of English. But I got an error message downloading this story: http://fanfiction.csodaidok.hu/viewstory.php?sid=4146 calibre, version 1.39.0 HIBA: Ismeretlen hiba történt: <b>AttributeError</b>:'NoneType' object has no attribute 'replace' calibre 1.39 [64bit] isfrozen: True is64bit: True Windows-7-6.1.7601-SP1 Windows ('64bit', 'WindowsPE') ('Windows', '7', '6.1.7601') Python 2.7.5 Windows: ('7', '6.1.7601', 'SP1', 'Multiprocessor Free') Traceback (most recent call last): File "calibre_plugins.fanfictiondownloader_plugin.dialo gs", line 607, in do_loop File "calibre_plugins.fanfictiondownloader_plugin.dialo gs", line 614, in do_when_finished File "calibre_plugins.fanfictiondownloader_plugin.ffdl_ plugin", line 1130, in start_download_job File "calibre_plugins.fanfictiondownloader_plugin.ffdl_ plugin", line 2062, in escapehtml AttributeError: 'NoneType' object has no attribute 'replace' Quote:
|
|
![]() |
![]() |
#2895 |
Member
![]() Posts: 13
Karma: 10
Join Date: May 2013
Location: Hungary
Device: Kindle 3, Paperwhite
|
@cryzed
In the Summary I see some special Hungarian characters are missing and replaced by '?' marks. Maybe a character encoding issue? The problematic characters are ő,Ő,ű,Ű The summary as it looks now: Mi történik, ha négy ?rültet szabadítanak rá a Roxfort mit sem sejt? népére? And the correct version: Mi történik, ha négy őrültet szabadítanak rá a Roxfort mit sem sejtő népére? |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Count Pages | kiwidude | Plugins | 1846 | 08-02-2025 10:44 PM |
[GUI Plugin] Resize Cover | kiwidude | Plugins | 100 | 07-10-2025 08:50 AM |
[GUI Plugin] Find Duplicates | kiwidude | Plugins | 1124 | 04-18-2025 09:19 AM |
[GUI Plugin] Open With | kiwidude | Plugins | 404 | 02-21-2025 05:42 AM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |