![]() |
#2596 |
Occassional Beta Tester
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 284
Karma: 3516
Join Date: Nov 2010
Location: Hungary
Device: none
|
Code:
Traceback (most recent call last): File "downloader.py", line 317, in <module> main(sys.argv[1:]) File "downloader.py", line 248, in main adapter.getStoryMetadataOnly() File "/fanficdownloadercli/fanficdownloader/adapters/base_adapter.py", line 261, in getStoryMetadataOnly self.story.setMetadata('dateUpdated',self.story.getMetadataRaw('datePublished')) File "/fanficdownloadercli/fanficdownloader/story.py", line 269, in setMetadata self.addToList('lastupdate',value.strftime("Last Update Year/Month: %Y/%m")) AttributeError: 'NoneType' object has no attribute 'strftime' ![]() |
![]() |
![]() |
#2597 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,024
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
|
|
![]() |
![]() |
#2598 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 401
Karma: 1597305
Join Date: Mar 2010
Device: Ipod G4, MacOS 10.12, Calibre, Pocketbook Touch HD 3
|
Okay, getting scared now. I've just run the plugin from the CMD line. But I'm getting closer (I think).
Code:
File "calibre_plugins.fanfictiondownloader_plugin.fanficdownloader.adapters.adapter_fictioningnet", line 109, in extractChapterUrlsAndMetadata TypeError: object of type 'NoneType' has no len() Code:
self.story.setMetadata('title',stripHTML(a)[:(len(a.string)-3)]) Spoiler:
|
![]() |
![]() |
#2599 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,024
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
So think about what happens before that--where did variable 'a' come from? What's in 'a'? Toss a line before that prints out the value of 'a'. |
|
![]() |
![]() |
#2600 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 401
Karma: 1597305
Join Date: Mar 2010
Device: Ipod G4, MacOS 10.12, Calibre, Pocketbook Touch HD 3
|
LOL I've got NO idea where the 'a' came from. I used someone else's py adapter (that's using efiction - I think the ncis one). I'm beginning to see that it may've been a bad idea...
I'll keep going. |
![]() |
![]() |
#2601 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 164
Karma: 3100
Join Date: Sep 2011
Device: Kobo Auro H2O, PRS-T1
|
Deleting AO3's junk characters
I've recently been going through my personal ini to clean it up. I've been working on the categories (fandoms) and characters for both FFN and AO3. Unfortunately, AO3 lets the author put anything in the character slots. I downloaded 135 stories and now have 70 characters that I consider junk (ex: and some more).
I've asked about getting rid of these characters before and received this code: characters=>^.*?(|Anime/Manga|Book.LOTR.Aragorn <Estel-Strider>)$=>\1 But that isn't working. It seems to be erasing all the characters, even the ones I want to keep. Most of the code for editing characters is under default, as I want it to be used for all sites. However, as AO3 is the only site that needs to have junk characters deleted, I placed that code under the testing site in the Personal ini. Should I place it under the default settings with the rest of the code? Also, I'm hoping to tweak the code so that it can look for keywords at the beginning of each character (Book|Cartoon|Movie|etc) and then delete any that don't match. Is there any code I can use or do I need to delete those junk characters manually? |
![]() |
![]() |
#2602 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,024
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
But I don't do anything nearly as complicated with metadata as some of you guys do. So I don't have a tool kit of solutions for metadata manipulation; just the answers given here to previous questions. Which I've mostly forgotten. |
|
![]() |
![]() |
#2603 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 164
Karma: 3100
Join Date: Sep 2011
Device: Kobo Auro H2O, PRS-T1
|
One of the stories I'm working with is:
http://archiveofourown.org/works/935...apters/1821204 I don't have a problem managing the ones I want to keep (ie. Bilbo Baggins, Gandalf, etc). It's the metadata that I don't want to keep (ie. anyone else who feels like popping in) that I'm having trouble with. my metadata looks like this: Spoiler:
The last line of code is supposed to get rid of the extra metadata I don't want. I figured out why the testing (Aragorn <Estel-Strider>) was not working. Unfortunately, this code means I have to give the entire metadata I want to keep (ie. Book.LOTR.Bilbo Baggins, Book.LOTR.Gandalf). I would have to include a lot of names and pairings to get that to work. I'd rather just look at the beginning of the the metadata to determine whether or not to keep it. I've tried to replace the last line of code with four different lines: Code:
#Let's nothing through characters=>^.*?(|Anime/Manga|Book)$=>\1 #Let's everything through characters=>^.*?(|Anime/Manga|Book)=>\1 characters=>^.*?((|Anime/Manga|Book)(.*?))$=>\1 characters=>^.*?((Anime/Manga|Book)(.*?))$=>\1 None of the codes I've tried has worked. Basically, I want the code to look for keywords at the beginning of the metadata (Book, Game, Movie, etc.). If the metadata does not start with those keywords, then it should be erased. Of course, I am assuming that all the code in the defaults section will be done before the code in the website sections. Maybe it would work better if I put that last line of code into the defaults section at the end of the replace_metadata code. |
![]() |
![]() |
#2604 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,024
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Well, for one thing, settings under [test1.com] obviously aren't going to effect a story from an AO3 URL.
So presumably you also have a [teststory:1001] section or some other number you're testing with? Because right now, I can't even duplicate your test setup. (Does putting blank lines and comments in an extended replace_metadata setting block even work? I guess it must.) |
![]() |
![]() |
#2605 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,024
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
You know what? This has gotten really out of hand.
I'm sure there are other users who'd like a simple feature to include or exclude metadata values that's separate from the regex driven replace_metadata feature. Let me go see what I can think up. |
![]() |
![]() |
#2606 | |
Occassional Beta Tester
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 284
Karma: 3516
Join Date: Nov 2010
Location: Hungary
Device: none
|
Quote:
![]() ![]() |
|
![]() |
![]() |
#2607 | |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 164
Karma: 3100
Join Date: Sep 2011
Device: Kobo Auro H2O, PRS-T1
|
Quote:
Of course, after I had condensed my personal ini code and was writing a reply to your last post, I think I solved my problem. I tried this code: Code:
characters=>^.*?(|(Anime/Manga|Book)(.*?))$=>\1 Even though I figured out my problem, a way to do that without the replace_metadata feature would be great. |
|
![]() |
![]() |
#2608 |
Connoisseur
![]() Posts: 80
Karma: 10
Join Date: Dec 2009
Device: none
|
ok... just found this pluging and might be the only reason i would use calibre right now
i read a lot of fimfiction storys, right now i still use manual download as a solution will calibre and this plugin give the the right solution to auto download new chapters and showing changes in storys i'm reading? |
![]() |
![]() |
#2609 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,024
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
FFDL can update existing epubs--that is, download only the new chapters when new chapters are added to the end of a story. But it won't do it automatically. It's not recommended to use FFDL to poll for changes; ie, select every book in your library and tell FFDL to try to update them. I highly recommend that you use each fanfic site's email notification for the stories you follow and then use that to know which books to update. You can drag story URLs from email onto the FFDL icon on the calibre toolbar, or into the URL box when FFDL's add/update by URL dialog is open. |
|
![]() |
![]() |
#2610 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,024
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Well, I set out to make a simple way to include or exclude metadata values. But like most of my projects, it quickly spiraled into something considerably more complex than I'd first intended.
This is very much a test version because I'm not convinced this should even be done, let alone done this way. And the explanation is crazy long: Spoiler:
Everybody, but Jade & FireDancer especially, let me know what you think. Last edited by JimmXinu; 05-05-2014 at 02:04 PM. Reason: Remove obsolete beta versions |
![]() |
![]() |
|
![]() |
||||
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 |