Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 01-25-2015, 11:18 PM   #16
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Quote:
Originally Posted by BetterRed View Post
I thought you'd already done that.

thinking aloud: be better if it was in a PI so the rest of can enjoy the fruits of your labour. Maybe add books preferences could have a hook to a PI that if not null it could get a call after book is added, but before its deleted from the autoadd folder, if that's in play.

BR
I mused upon the idea, but was too lazy. Then I promptly forgot.

Meanwhile I do it by hand.
eschwartz is offline   Reply With Quote
Old 01-26-2015, 10:04 AM   #17
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,636
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by BetterRed View Post
thinking aloud: be better if it was in a PI so the rest of can enjoy the fruits of your labour. Maybe add books preferences could have a hook to a PI that if not null it could get a call after book is added, but before its deleted from the autoadd folder, if that's in play.

BR
I think a way to do it would be something like "tools", a FileTypePlugin plugin, with onPostImport = True (so you already has the database entry to add the file to the column), and you get the File path and the database id. Perhaps this could be a project for forgetting my sad bureaucratic work ;( I'll tell you if I get something, if you're interested.
Terisa de morgan is offline   Reply With Quote
Old 01-26-2015, 10:49 AM   #18
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
I don't think that hook makes the original filename (from the add folder) available.

Someday I might want to rewrite the add_book code to handle custom metadata types and allow keeping the original metadata but overriding with filename-regex metadata.
eschwartz is offline   Reply With Quote
Old 01-26-2015, 10:56 AM   #19
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,740
Karma: 30237526
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by Terisa de morgan View Post
I think a way to do it would be something like "tools", a FileTypePlugin plugin, with onPostImport = True (so you already has the database entry to add the file to the column), and you get the File path and the database id. Perhaps this could be a project for forgetting my sad bureaucratic work ;( I'll tell you if I get something, if you're interested.
Yes - please keep me informed, and feel free to bounce any thoughts around - either here or via PM. I must admit to not even knowing there were file type PI's until now.

One question though - is the path_to_ebook that the onPostImport method gets the path to the file being added or the path to the file that's now in the library -- i.e is it \downloads\ebooks\fred_1234A54.epub or is it \library\author\book (428)\book - author.epub. My impression is that it's the latter.

I should download the source, not so I can run from it or modify it - merely to look at it. I'd rather look at it locally than via a browser.

BR
BetterRed is offline   Reply With Quote
Old 01-26-2015, 10:58 AM   #20
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Exactly -- I believe it is the path to the book in the library. i.e. after a book is imported, you can auto-run things on the new entry.
eschwartz is offline   Reply With Quote
Old 01-26-2015, 11:03 AM   #21
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,636
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by eschwartz View Post
Exactly -- I believe it is the path to the book in the library. i.e. after a book is imported, you can auto-run things on the new entry.
I hope not, I don't want that path but the original name I'll make some tests and, if yo're right, I'll try to do a "both parts" plugin...
Terisa de morgan is offline   Reply With Quote
Old 01-26-2015, 11:17 AM   #22
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,740
Karma: 30237526
Join Date: Mar 2012
Location: Sydney Australia
Device: none
The 'logical' time to get the path to the file being imported would be in a before_import method, which would squirrel it away for use by a post_import method. Sorry about the terminology, but I'm in time warp between smalltalk and ada

BR
BetterRed is offline   Reply With Quote
Old 01-26-2015, 11:19 AM   #23
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,636
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I totally agree with you, but I'm not sure I can make it to run and postimport at the same time . Ada, what a nice old times

Last edited by Terisa de morgan; 01-26-2015 at 11:22 AM.
Terisa de morgan is offline   Reply With Quote
Old 01-26-2015, 01:48 PM   #24
Vortex
Groupie
Vortex began at the beginning.
 
Vortex's Avatar
 
Posts: 171
Karma: 10
Join Date: Dec 2008
Device: Likebook Mars
Quote:
Originally Posted by eschwartz View Post
Which does remind me -- I wanted to create something that would import books and save the original filename to a custom column.
Now that's a good idea
Vortex is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Manage Saved Searchs not working HFC3 Library Management 4 07-07-2013 05:28 PM


All times are GMT -4. The time now is 05:22 AM.


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