Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Plugins

Notices

Reply
 
Thread Tools Search this Thread
Old 06-08-2011, 07:31 AM   #1
jmricker
Junior Member
jmricker has learned how to read e-booksjmricker has learned how to read e-booksjmricker has learned how to read e-booksjmricker has learned how to read e-booksjmricker has learned how to read e-booksjmricker has learned how to read e-booksjmricker has learned how to read e-books
 
Posts: 4
Karma: 888
Join Date: Jun 2011
Device: jmricker
Question about populating custom field

I'm working on a metadata source plugin that fetches Dewey Decimal and Library of Congress data. That part of it is working fine -- when it finds a piece of information, it stores it as an identifier. What I'm trying to do next is calculate a genre to plug into a custom column.

Ive got something like this so far:

Code:
mi = Metadata(title, authors)
mi.identifiers = identifiers

mi.set('#genre','im a test')
self.clean_downloaded_metadata(mi)
result_queue.put(mi)
But genre doesn't seem to get populated. Similar results with the .set_userdata method. Whats a better way to do this?

Thanks!
jmricker is offline   Reply With Quote
Old 06-08-2011, 07:37 AM   #2
kiwidude
calibre/Sigil Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,224
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
@jmricker - basically you can't.

See this thread in the development forums for the discussion about it.

All you can do right now is put it into one of the existing fields that Calibre does support, like tags or comments.
kiwidude is offline   Reply With Quote
 
Enthusiast
Old 06-08-2011, 08:09 AM   #3
jmricker
Junior Member
jmricker has learned how to read e-booksjmricker has learned how to read e-booksjmricker has learned how to read e-booksjmricker has learned how to read e-booksjmricker has learned how to read e-booksjmricker has learned how to read e-booksjmricker has learned how to read e-books
 
Posts: 4
Karma: 888
Join Date: Jun 2011
Device: jmricker
Phew. So its not just me I've looked through the api swearing I'm doing it right. Thanks for the pointer.

Now since identifier is populated with my two values, I guess I can build a custom template for a column and display the genre that way. (I think, haven't tried this yet).
jmricker is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search Replcae error on custom field adept22 Library Management 4 03-14-2011 09:47 AM
Add Book Regex to Custom field adept22 Library Management 2 03-14-2011 04:46 AM
Custom Metadata Field gpp Sigil 6 02-22-2011 08:39 AM
Can't clear "custom" date field? joegearhart Calibre 5 12-20-2010 03:32 AM
Bulk Meta Data Edit Resetting Custom Field toomuchreading Calibre 8 10-22-2010 10:19 PM


All times are GMT -4. The time now is 04:54 AM.


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