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 10-04-2010, 03:18 PM   #31
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
I made a plugboard:

format: device-db
device: any device
template: {author} - {title} for title

Yet, on my Sony, I still see only {title} for title.

At least for the book I just added.

But, it gets weirder


The books I already had on it, now have a title like this:

- {title}

If I remove the plugboard, and the book, all my existing books are back to normal with a title:

{title}


Edit: on a sony 650
Sweetpea is offline   Reply With Quote
Old 10-04-2010, 03:23 PM   #32
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,029
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Sweetpea View Post
I made a plugboard:

format: device-db
device: any device
template: {author} - {title} for title

Yet, on my Sony, I still see only {title} for title.

At least for the book I just added.

But, it gets weirder


The books I already had on it, now have a title like this:

- {title}

If I remove the plugboard, and the book, all my existing books are back to normal with a title:

{title}


Edit: on a sony 650
First, you spelled authors without the s. Second, that plugboard will change only what the sony displays, not what is in the book. Is that what you want?
chaley is offline   Reply With Quote
Advert
Old 10-04-2010, 03:29 PM   #33
Starson17
Wizard
Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.Starson17 can program the VCR without an owner's manual.
 
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
Quote:
Originally Posted by chaley View Post
First, you spelled authors without the s.
Are you aware that {author} and {authors} are identical for Save to Disk?

Code:
calibre\library\save_to_disk.py line 99:     template = template.replace('{author}', '{authors}')
It can lead to confusion.
Starson17 is offline   Reply With Quote
Old 10-04-2010, 03:42 PM   #34
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,029
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Starson17 View Post
Are you aware that {author} and {authors} are identical for Save to Disk?

Code:
calibre\library\save_to_disk.py line 99:     template = template.replace('{author}', '{authors}')
It can lead to confusion.
Yea, there are a lot of places where names are permitted with variant spellings.
Search is a prime example. author/s, publisher/s, tag/s for example.

I haven't figured out what to do about that, but am thinking about it. Perhaps I will use the search aliases.
chaley is offline   Reply With Quote
Old 10-04-2010, 04:06 PM   #35
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
Quote:
Originally Posted by chaley View Post
First, you spelled authors without the s. Second, that plugboard will change only what the sony displays, not what is in the book. Is that what you want?


That's what you get for trying something out fast...

Ok, that works. But it doesn't work for the book that I'm transfering. All my books now have the {author_sort} - {title} template, except the new book... which only shows the {title} template.

And I don't need it in the book, I never look at the book info anyway And when I do want it in the books (on my mobipocket readers) I do have it, thanks to your plugboard
Sweetpea is offline   Reply With Quote
Advert
Old 10-04-2010, 05:38 PM   #36
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,029
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Sweetpea View Post
Ok, that works. But it doesn't work for the book that I'm transfering. All my books now have the {author_sort} - {title} template, except the new book... which only shows the {title} template.
Found the problem. Will be fixed in the next release.

The device view will always show calibre's metadata. The sony menus will show altered metadata. It now works on the first send.

The bug existed since the beginning of the beta. Sony metadata wasn't being updated when a book was resent. If metadata management is anything but automatic, then collections for resent books would not have been updated.

Last edited by chaley; 10-05-2010 at 02:38 AM. Reason: Completely change post. :)
chaley is offline   Reply With Quote
Old 10-07-2010, 11:12 AM   #37
pchrist7
Addict
pchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animalspchrist7 is kind to children and small, furry animals
 
pchrist7's Avatar
 
Posts: 385
Karma: 6514
Join Date: Aug 2010
Location: Denmark
Device: Kindle 3 3G+Wifi, Oasis
Absolutely Brilliant !

To think I almost missed this thread
THIS is brilliant, especially all the hints you ALL are describing/discussing.
Makes it's possible for me to understand AND use the plugboard.
My K3 loves it, once it's done indexing, I think.
So far it look like the re-transmitted books go into correct Collections with the old ones, but can't say yet, until it's done indexing.

My worst issue with the K3 seems to be resolved with a little work by me, but a LOT of great work by the Calibre TEAM !.
Cheers
P.S. This thread is fast on the way to "sticky" status ?

Last edited by pchrist7; 10-07-2010 at 11:12 AM. Reason: Added PS
pchrist7 is offline   Reply With Quote
Old 10-07-2010, 11:52 AM   #38
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,029
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
@speakingtohe: plugboards now work with the Sony database, as well as with the books on a Sony. To modify the sony's db, use the special format 'device_db'.

This works very nicely. For example, I use a plugboard to put 8 characters of the series plus the series index at the end of the title. This extra info helps when browsing by author or by title, or by non-series collections.

The plugboard is:
Code:
device_db:PRS505 = ([{title}{series:<.8s| [|}{series_index:| [|]]}] -> title)
chaley is offline   Reply With Quote
Old 10-09-2010, 08:10 AM   #39
GRiker
Comparer of the Ephemeris
GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.GRiker ought to be getting tired of karma fortunes by now.
 
Posts: 1,496
Karma: 424697
Join Date: Mar 2009
Device: iPad
Plugboards + iTunes

(This is an excerpt from the 'Calibre + iTunes: Start here' thread. It's largely redundant with other posts already in this thread, but I wanted to add it here in case an iDevice user comes across this thread first.)
  • Title transformations
    A common use of plugboards is transforming a book's title when it is part of a series. For example, consider 'The Girl with the Dragon Tattoo' by Stieg Larsson, book 1 of the Millenium series. By default, iBooks would list it as simply 'The Girl with the Dragon Tattoo'.

    To have the book listed in iTunes/iBooks as 'Millenium 1: The Girl with the Dragon Tattoo':
    • Open the Metadata plugboards dialog - Preferences|Import/Export|Metadata plugboards.
    • Select any format, epub or pdf from the Format dropdown list, then APPLE from the Device dropdown list.
    • In the Source template field, add this template:
      Code:
      {series}{series_index:| |: }{title}
      This tells the templating engine "If there is a series_index for the book, prepend the series name, a space, the series_index, then a colon and a space before the book's title."
    • Select title from the Destination field dropdown list.
    • Click the Save plugboard button, then Apply (upper left corner of the dialog) to save and close.
    • All books matching the specified formats sent to iTunes/iBooks will have this plugboard transform applied.
  • Using a custom column as Genre/Category
    Creating a custom 'Genre' column is useful when you want exact control of the Genre/Category applied in iTunes/iBooks:
    • In Preferences|Interface|Add your own columns, click the Add custom column button. In the Lookup name field, type genre. In the Column heading field, type Genre (or 'iBooks Category', or whatever you please). In Column type, select Text, column shown in the tag browser. Click OK to exit the dialog. Restart calibre.
    • Populate your new custom column with the Genre/Category names to be used with iTunes/iBooks.
    • Open the Metadata plugboards dialog - Preferences|Import/Export|Metadata plugboards.
    • If you already have an existing plugboard for APPLE, select it in the Existing plugboards list, otherwise follow the steps described in the first example to create a new plugboard.
    • In the Source template field, add this template:
      Code:
      {#genre}
      In the Destination field, select tags. This tells the templating engine "Retrieve the value stored in the custom column whose lookup name is 'genre', and apply it to the tags field."
    • Click the Save plugboard button, then Apply (upper left corner of the dialog) to save and close.
    • All books matching the specified formats sent to iTunes/iBooks will have this plugboard transform applied.
    In the event that Preferences|Advanced|Plugins|Device Interface Plugins|Apple device interface|Customize plugin|Use Series as Category in iTunes/iBooks is checked, the normal behavior is to use the Series name as the Genre/Category in iTunes/iBooks. However, if a plugboard transform is defined for tags, it takes priority over using the Series name.
  • Display Authors as LN, FN in iTunes/iBooks
    • If you already have an existing plugboard for APPLE, select it in the Existing plugboards list, otherwise follow the steps described in the first example to create a new plugboard.
    • In the Source template field, add this template:
      Code:
      {author_sort}
      In the Destination field, select authors. This tells the templating engine "Retrieve the authors_sort value, and apply it to the authors field."
    • Click the Save plugboard button, then Apply (upper left corner of the dialog) to save and close.
    • All books matching the specified formats sent to iTunes/iBooks will have this plugboard transform applied.
  • Force <dc:language> to specific value (ePubs only)
    • If you already have an existing plugboard for APPLE, select it in the Existing plugboards list, otherwise follow the steps described in the first example to create a new plugboard.
    • In the Source template field, add this template:
      Code:
      fr
      In the Destination field, select language. This tells the templating engine "Set the value of <dc:language> to 'fr'."
    • Click the Save plugboard button, then Apply (upper left corner of the dialog) to save and close.
    • All books matching the specified formats sent to iTunes/iBooks will have this plugboard transform applied.
GRiker is offline   Reply With Quote
Old 10-10-2010, 03:51 PM   #40
everklear
Enthusiast
everklear shines like a glazed doughnut.everklear shines like a glazed doughnut.everklear shines like a glazed doughnut.everklear shines like a glazed doughnut.everklear shines like a glazed doughnut.everklear shines like a glazed doughnut.everklear shines like a glazed doughnut.everklear shines like a glazed doughnut.everklear shines like a glazed doughnut.everklear shines like a glazed doughnut.everklear shines like a glazed doughnut.
 
Posts: 30
Karma: 8644
Join Date: Oct 2010
Location: Edmonton, Alberta, Canada
Device: Kobo
I can verify that the plugboard "Metadata: Show series - series Index - Title as Title (Kindle) (economix)" works for the Kobo.

And I am once again pleased as punch with Calibre.
everklear is offline   Reply With Quote
Old 10-14-2010, 05:09 AM   #41
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,029
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by MikeP1212 View Post
Trying to get a "Save to Disk" (Metadata Plugboard) that inserts an Abbreviated Series Name & No in front of the Title (in the ePub metadata).
{series} {series_index:0>3s| - | - }{title} would result in a very long name.
I'd like to abbreviate the series down to the first letter of each word.
Instead of: "The Lord of the Rings - 002 - The Two Towers."
I'd Like: "TLotR - 002 - The Two Towers."
Any Help would be greatly appreciated.
Try
Code:
{series:re(([^\s])[^\s]+(\s|$),\1)}{series_index:0>3s| - | - }{title}
Personally, I would prefer
Code:
{series:shorten(4,-,4)}{series_index:0>3s| [|] }{title}
(for some values in the shorten) because the first letter of a single-word series name doesn't tell me enough, and it gets rid of 2 extra spaces.
chaley is offline   Reply With Quote
Old 10-14-2010, 06:59 AM   #42
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
Quote:
Originally Posted by chaley View Post
Try
Code:
{series:re(([^\s])[^\s]+(\s|$),\1)}{series_index:0>3s| - | - }{title}
Personally, I would prefer
Code:
{series:shorten(4,-,4)}{series_index:0>3s| [|] }{title}
(for some values in the shorten) because the first letter of a single-word series name doesn't tell me enough, and it gets rid of 2 extra spaces.
I tried your second one, but that one isn't foolproof either:


"The -dren [00] - The Clan of the Cavebear"

The "The" (and "A", etc) should be removed first...
Sweetpea is offline   Reply With Quote
Old 10-14-2010, 07:06 AM   #43
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,867
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by Sweetpea View Post
"The -dren [00] - The Clan of the Cavebear"

The "The" (and "A", etc) should be removed first...
I believe if you didn't have your save_template_title_series_sorting tweak set to strictly_alphabetic it would have been more successful.
DoctorOhh is offline   Reply With Quote
Old 10-14-2010, 07:14 AM   #44
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
Quote:
Originally Posted by dwanthny View Post
I believe if you didn't have your save_template_title_series_sorting tweak set to strictly_alphabetic it would have been more successful.
Got a better example:

The -Saga [001] - Rides a Dread Legion

vs

The -Saga [001] - Shadow of a Dark Queen


And no, that tweak doesn't do anything...
Sweetpea is offline   Reply With Quote
Old 10-14-2010, 07:23 AM   #45
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,029
Karma: 7257323
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Sweetpea View Post
I tried your second one, but that one isn't foolproof either:


"The -dren [00] - The Clan of the Cavebear"

The "The" (and "A", etc) should be removed first...
I don't have the problem, because I don't put leading articles on my series names.

Of course, the way to 'fix' it is to strip the articles before it gets to the plugboard. Create a (probably hidden) composite column called #stripped_series (or some such) containing something like
Code:
{series:re(^(A|The|An)\s+,)||}
Then the plugboard expression becomes
Code:
{#stripped_series:shorten(4,-,4)}{series_index:0>3s| [|] }{title}
As for your second example, yes, shortening can always create collisions. You pays your money and makes your choice.
chaley is offline   Reply With Quote
Reply

Tags
custom column, tag, tags


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
custom column i need a little help shinken Calibre 3 09-15-2010 04:41 AM
Using Custom Metadata in Save Template EJvdH Calibre 1 07-02-2010 07:06 AM
Accessories Decalgirl Kindle 2 custom skin template srmalloy Amazon Kindle 6 04-09-2010 10:55 PM
Donations for Custom Recipes ddavtian Calibre 5 01-23-2010 05:54 PM
Help understanding custom recipes andersent Calibre 0 12-17-2009 03:37 PM


All times are GMT -4. The time now is 02:43 PM.


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