![]() |
#481 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 139
Karma: 21754
Join Date: Mar 2011
Device: Kindle 3, Icarus Illumina XL, Boyue T62
|
Quote:
|
|
![]() |
![]() |
#482 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,999
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
|
![]() |
Advert | |
|
![]() |
#483 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 408
Karma: 1050547
Join Date: Mar 2011
Device: Kindle Oasis 2
|
By the way, Jimm, I found the bug that prevents the fallback labels in base_writer.py (BaseStoryWriter.titleLabes) from being used when there is no title label specified in the configuration files.
Your call getConfigList(entry) in BaseStoryWriter.writeTitlePage always evaluates to true, because self.getConfig(key).split(',') in Configurable.getConfigList returns "['']" instead of "[]" even if empty due to your use of string.split, I added a simple if-statement checking if vlist equals [''], and in case it does set it to [] to circumvent that, you might prefer checking the length of the list and then the 0-index value. Also, I'm not sure if this sounds useful to you (it certainly did to me though), a really easy way to implement being able to use HTML on the title page is this (line 20-21) in BaseStoryWriter.writeTitlePage; this way it is possible to relatively easy change the appearance of the title page, like so by modifying the "titlepage_entries" in the configuration file (I'm specifically talking about the line break between "Words" and "Summary"). Last edited by cryzed; 06-30-2012 at 11:04 PM. |
![]() |
![]() |
#484 | |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Jun 2012
Device: Nook SimpleTouch
|
Quote:
I will try as soon as I can, and let you know. |
|
![]() |
![]() |
#485 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,999
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
@cryzed--Thanks for pointing out the bug with fallback labels. It's a real corner case--you have to be practically trying to hit the fallback labels and it can only happen to CLI users who edit or delete defaults.ini, so thankfully it hasn't been biting many people.
The problem isn't really with getConfigList returning "['']", but with the fact BaseStoryWriter.writeTitlePage should have been checking for the existence of "<entry>_label" all along. It'll be fixed in the next version. As for additional HTML included in titlepage_entries, OTOneH, you can accomplish the same thing by adding HTML to the label, like "description_label:<br/>Summary". OTOtherH, simply outputting non-matching entries allows for some extra flexibility and readability, and will show typo'ed metadata entries that might otherwise escape notice. So I'll go one better--rather than outputting anything in titlepage_entries that starts with '<', in the next version I'll output anything that isn't a valid metadata entry name. That way it will work with text format, too. Thanks for the suggestion. Last edited by JimmXinu; 07-01-2012 at 01:17 AM. |
![]() |
Advert | |
|
![]() |
#486 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,999
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Ugh. You have bigger problems to worry about. I'm 98% sure I've fixed it, so it will be in the next release anyway.
|
![]() |
![]() |
#487 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 173
Karma: 8098
Join Date: Jun 2012
Location: Germany
Device: Kindle Voyage, Kindle Oasis
|
If I try to download "http://www.fanfiktion.de/s/4a0b18160000c64e06514438" I get the following error message: 'NoneType' object has no attribute 'string'
debug output: url ![]() ![]() ![]() FanFictionDownLoader v1.5.39 url:http://www.fanfiktion.de/s/4a0b18160000c64e06514438/1 Exception: {u'comment': u"'NoneType' object has no attribute 'string'", u'begin': None, u'good': False, u'end': None, u'author': u'Unknown', u'url': u'http://www.fanfiktion.de/s/4a0b18160000c64e06514438/1', u'author_sort': u'Unknown', u'calibre_id': None, u'added': False, u'title': u'Unknown'}:'NoneType' object has no attribute 'string' Traceback (most recent call last): File "calibre_plugins.fanfictiondownloader_plugin.dialo gs", line 308, in do_loop File "calibre_plugins.fanfictiondownloader_plugin.ffdl_ plugin", line 462, in get_metadata_for_book File "calibre_plugins.fanfictiondownloader_plugin.fanfi cdownloader.adapters.base_adapter", line 237, in getStoryMetadataOnly File "calibre_plugins.fanfictiondownloader_plugin.fanfi cdownloader.adapters.adapter_fanfiktionde", line 95, in extractChapterUrlsAndMetadata AttributeError: 'NoneType' object has no attribute 'string' Is it possible related to the fact that I have to identify myself as adult on fanfiktion.de to read the story direct on fanfiktion.de? To identify I need my personal ID card (not just to click on "Yes, I am adult" or similar) |
![]() |
![]() |
#488 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 408
Karma: 1050547
Join Date: Mar 2011
Device: Kindle Oasis 2
|
@JimmXinu, oh that might be, I'm not _that_ familiar with the whole architecture of the code, and good call on outputting all the non-valid entries. And yep, I only noticed the bug because I added parsing for the review count.
Also I feel that I should mention this: in FanFictionNetSiteAdapter.extractChapterUrlsAndMeta data at the very end you retrieve the chapter title, but this always includes the prefix, meaning: "X. XXXXX"; I did this to fix it: "title = title.split(None, 1)[1]". Related to this bug (I assume) I changed something in EpubWriter.writeStoryImpl around line 350 during the story cover generation: PHP Code:
Last edited by cryzed; 07-01-2012 at 08:27 AM. |
![]() |
![]() |
#489 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 139
Karma: 21754
Join Date: Mar 2011
Device: Kindle 3, Icarus Illumina XL, Boyue T62
|
Quote:
I've added the login portion to the adapter which would be available in the next update. However, since I do not have a German ID, I cannot actually test if it ever gets to the story. Last edited by iatheia; 07-01-2012 at 12:29 PM. |
|
![]() |
![]() |
#490 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,999
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Re: fanfiktion.de - I think we're going to have to have a beta version again this time. I should have it posted here with these changes later today.
|
![]() |
![]() |
#491 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,999
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
@cryzed - Essentially, you're asking for the leading chapter numbers to be removed from the chapter titles at the start of each chapter, but be kept (or even added) in the TOC.
It's not a bad idea, but it's more complex than just changing the ffnet adapter and epub writer. First, there are 50+ sites, many of which include leading chapter numbers, many of which don't, and a number of which do sometimes--and sometimes switch back and forth in the same story. So removal must be smarter and should be done in the common code somewhere. Second, putting the numbers back in the epub TOC is fine, but they need to be added to the explicit TOC page, too, since that's what mobi/html/txt use. Third, not everyone's going to agree that the numbers should be removed or added. So I'm thinking three new configuration options (names subject to change):
Opinions, everybody? |
![]() |
![]() |
#492 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 408
Karma: 1050547
Join Date: Mar 2011
Device: Kindle Oasis 2
|
Ah yeah, I feared something like that (then on and off existing chapter numbers). Your suggestion sounds great to me, but the code that detects and possibly removes the leading chapter numbers is probably going to be somewhat complex, I think...
One way would be writing a RegEx that checks if the first few characters are digits followed by a delimiter ('.', ' ', ':' ...) and if that is true for every chapter title in the list, remove this part. The last condition (true for every chapter title) is a precaution so no part of the actual title is accidentally removed... I'm sure there are some corner case where a chapter might be named "5. Night" instead of "5th Night" or something similiar, but if it is true for every chapter the chance that the chapter number is added by the site itself is higher. Or am I making things too complicated? About adding the numbers to the other writers, yes, of course, I expected as much -- these simply weren't that relevant to me since I use your software mostly for downloading fanfiction.net stories and converting them to EPUB afterwards, I expected that you'd add them to the other writers if you thought it was a good idea. Also: I'll be honest, I'm not sure if this is already implemented, but what about a custom:
Last edited by cryzed; 07-01-2012 at 03:46 PM. |
![]() |
![]() |
#493 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,999
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
New Beta version with:
Note that www.fanfiktion.de doesn't just require you to say 'yes, I'm an adult'. To see adult content there, you have to have an official government German, Austrian or Swiss ID card or passport number. We (the developers) don't have any of those, so some one who does, please test it. Note: As part of the archiveofourown.org fix, the configuration section for AO3 is now [archiveofourown.org], not [www.archiveofourown.org]. Please change your personal configuration accordingly, if you have customized your settings for archiveofourown.org. As usual, thanks to Ida for the new sites. Last edited by JimmXinu; 07-02-2012 at 12:23 PM. Reason: Remove obsolete beta versions |
![]() |
![]() |
#494 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() Posts: 69
Karma: 520
Join Date: Jun 2012
Location: France
Device: Kindle Paperwhite 5 & iPad Mini & Galaxy Tab10
|
![]() Quote:
Thanks for your quick response anyway ![]() |
|
![]() |
![]() |
#495 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 139
Karma: 21754
Join Date: Mar 2011
Device: Kindle 3, Icarus Illumina XL, Boyue T62
|
Quote:
|
|
![]() |
![]() |
|
![]() |
||||
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 |