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 08-10-2014, 11:58 PM   #1
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012464
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
[GUI Plugin] Kindle Collections (Update)

NOTE: The original thread for this plugin can be found here. Since meme is inactive, I took the opportunity of the PyQt5 migration to take over the maintenance of this plugin .


This Calibre plugin allows you to manage your Kindle collections, and, on select devices, margins and fonts.

Main Features
  • Works on the Kindle DX, 2, 3, and 4 non-touch; and in tandem with ixtab's Collections Manager on JailBroken Kindle Touch, PaperWhite, PaperWhite 2, Basic, Voyage, PaperWhite 3, Oasis, Basic 2, Oasis 2, PaperWhite 4 & Basic 3 devices (There may be some hoop-jumping needed to get it running on the PW/PW2/KT2/KV/PW3/KOA/KT3/KOA2/PW4/KT4, see the CM thread for details). On those devices, you can also use LibrarianSync instead of CM. On newer devices/firmwares, you will actually *have* to use LibrarianSync, as CM isn't supported anymore.
  • Create collections automatically on your Kindle using Calibre Authors, Series, Tags, custom columns or categories
    • Preview changes before saving them
    • Customize which collections are automatically created - include or ignore specific collections, add a prefix to sort collections, set minimum books counts, and even rename collections
    • Import collections from your Kindle into a custom column in Calibre
  • Edit collections on your Kindle with a GUI without needing to use Calibre to store or manage your books
  • On select devices (Kindle 2/DX/3/4), modify your Kindle settings including horizontal margin, justification, and fonts
  • View a report of your Kindle collections and books - including collections sorted by most Recent, collections and books sorted by Title, books per collection, collections per book, and any duplicate, invalid, or uncollectable books
  • The plugin does not modify your Kindle books, or Calibre information when creating or editing collections or settings
  • Because of changes in how collections are managed on newer devices, on the Kindle Touch, PaperWhite, PaperWhite 2, Basic, Voyage, PaperWhite 3, Oasis, Basic 2, Oasis 2, PaperWhite 4 & Basic 3, this plugin MUST be used in tandem with a third-party tool (either Collections Manager, or LibrarianSync), which implies JailBreaking the device. On those devices, the plugin is useless on its own. In addition, I'll reiterate what's said in the CM thread: on the PW/PW2/KT2/KV/PW3/KOA/KT3/KOA2/PW4/KT4, Collections Manager is only usable on specific firmware versions, so do take care to read CM's instructions properly first (FYI, LS will probably handle those pesky FW versions better). If you have an older, non-touch device, this doesn't concern you .

Install or Remove the Plugin

Spoiler:

Install or update

Requires Calibre 1.0.0 or later - http://calibre-ebook.com/
  • In Calibre select Preferences->Plugins
  • Click the "Get new plugin" button
  • Select "All" next to Filter list of plugins
  • Click on the entry for Kindle Collections
  • Click Install then Yes to allow the install to continue
    • You will be prompted to add the plugin to the toolbar if you have not installed it before. Select where to put the plugin, e.g. "The main toolbar when a device is connected" and press OK.
    • Restart Calibre
    • If you are NOT prompted or no icon shows up in your toolbar, click on Preferences->Toolbar and select "The main toolbar when a device is connected". Then select the Kindle Collections icon an press OK. Restart Calibre.

Remove
  • Select Preferences->Plugins
  • Expand "User Interface Action plugins" and select "Kindle Collections"
  • Select Remove Plugin
  • Remove the file "plugins/Kindle Collections.json" from your Calibre configuration directory (e.g. $HOME/.config/calibre) to remove all customized configuration information


Create Collections on your Kindle automatically using Calibre data

The first way to manage your collections with this plugin is to create them automatically on your Kindle using the information in Calibre. This is the best approach if you have lots of books in Calibre, especially if they are already tagged or organized.

Spoiler:

First Use
Spoiler:

  1. Start Calibre
  2. Connect the Kindle via USB to your PC
  3. Click on the Kindle Collections icon in Calibre to see a drop down menu of options
  4. Select Customize to choose which collections to create from Calibre (set the Action column to "Create")
  5. Click OK to save your customizations
  6. Run Preview to see what collections will be created/modified (edit Customizations again as necessary)
  7. Run Create to save the collections to the Kindle
  8. Eject the Kindle (Devices->Eject)
  9. Disconnect your Kindle from the PC
  10. Follow the instructions in the popup to load the new collections (which, depending on your exact device, will be either unplug, restart, or import in CM/LS. Note: If you need to restart your Kindle (this is not the same as using the power on/off switch):
    • On the Kindle press the Home key, then press Menu, select Settings, then press Menu again and select Restart
To update your collections for new/changed books, just run Create Collections again.

Examples
Spoiler:

These are examples of how to customize the plugin to choose which collections are automatically created. You can test your settings using Preview Collections without any changes being made to your Kindle. Use the "Customize" menu option of the plugin to change what the plugin does.

Choose a Calibre field to use for creating collections by selecting "Create" from the down down menu in the field's "Action" column.

See the Customization Details section in this post for extensive details on the options available.
  • Collections for every Author, or every Series, or every Tag, etc.
    Spoiler:
    Set 'Authors' to 'Create' (or set 'Series' or 'Tags' or any field)
    Make sure other fields have no Action selected
    You can select 'Create' for multiple fields
  • Collection names that sort to the top of the list when Sorting by Title on the Kindle
    Spoiler:
    Set the Prefix column to '_'
    (You can use other symbol besides "_" - see Customizations Details for more information. Note that, depending on your device, the sort order will be different. This example is valid for the Kindle 2/DX/3/4. On the Touch & the PW, use a single quote instead of an underscore.)
  • Collections for just 1 Author, or 1 Tag, etc.
    Spoiler:
    Set 'Authors' (or 'Tags' or any field) to 'Create'
    Enter the name of the author or tag into the 'Include' column
  • Collections for Series if there are more than 3 books in the series
    Spoiler:
    Set 'Series' to 'Create'
    Set Minimum column for 'Series' to "3"
  • Collections using a Custom Column
    Spoiler:
    You can select any of your custom columns just like Calibre's built in fields
    See the Custom Columns section in this post for how to create custom columns - if you want more control of your collections, custom columns are the way to go
  • Collections for tags except those starting with "-"
    Spoiler:
    Set 'Tags' to 'Create'
    Set the 'Ignore' column for 'Tags' to "^-.*" (without the quotes)
    (See Customization for more information on patterns)
  • Collections only for the tags starting with "+" and removing the "+" before saving to the Kindle
    Spoiler:
    Set 'Tags' to 'Create'
    Set the 'Include' column to: ^\+.*
    Set the 'Rename from' column to: ^\+(.*)$
    Set the 'Rename to' column to: \1
  • Collections A-Z using Author Sort
    Spoiler:
    Set 'Author Sort' to 'Create
    Set prefix to: _
    Set rename_from to: ^(.).*$
    Set rename_to to: \1
  • Collections [A-Z] using Title
    Spoiler:
    Set 'Title' to 'Create
    Set prefix to: [
    Set suffix to: ]
    Set rename_from to: ^[the|a|an]*(.).*$
    Set rename_to to: \1

Collections for Special Books:

News Feeds
Spoiler:

The Kindle will only allow files to be added to Collections if the file is of certain type:
  • In order to get other file types into Collections, we can use Calibre to modify the file's type
  • To do this you need to use the steps below to tell Calibre that books with a specific tag (a Personal doc tag) should have their type updated
  • If you have setup a Preferences->Metadata Plugboard to re-write tags it may prevent this from working

Option 1 - using the default Personal doc tag "[PDOC]"
  • Set Preferences->Output Options->Mobi output->Personal doc tag to "[PDOC]"
  • Select "Fetch News" then select your specific news feed.
  • Under the Advanced Tab set "Extra tags" to include "[PDOC]"
  • Select Download now
  • Save
  • You may need to delete your news feeds before running these steps
  • Calibre should send the news feed to your device automatically
  • Run Preview to verify it is added to a collection, then run Create to save the collections

Option 2 - using the default tag "News" given to News items
  • Set Preferences->Output Options->Mobi output->Personal doc tag to "News"
  • Download your news items

Option 3 - use a different Personal doc tag other than "[PDOC]" or "News" for your news items
  • Follow Option 1, but substitute "Myowntagname" for "[PDOC]"

Option 4 - Also put the News Feeds into another collection
  • Follow Option 1, but add "Myowntagname" to your "Extra tags" field along with "[PDOC]"

Calibre Catalogs
Spoiler:

The Kindle will only allow files to be added to Collections if the file is of certain type:
  • In order to get other file types into Collections, we can use Calibre to modify the file's type
  • To do this you need to use the steps below to tell Calibre that books with a specific tag (a Personal doc tag) should have their type updated
  • If you have setup a Preferences->Metadata Plugboard to re-write tags it may prevent this from working

Option 1 - using the default Personal doc tag "[PDOC]"
  • Set Preferences->Output Options->Mobi output->Personal doc tag to "[PDOC]" (without the quotes)
  • Delete all copies of your Catalogues from your library and device
  • Go to Convert books->Create a Catalogue
  • Uncheck "Send Catalogue to devices automatically"
  • Click OK, and wait for the catalogue file to be generated
  • Manually add the tag "[PDOC]" to the Catalogue book
  • Click the catalog file and then Send to Device
  • Run Preview to verify it is added to a collection, then run Create to save the collections

Option 2 - using a Personal doc tag name other than "[PDOC]"
  • Follow Option 1, but substitute "Myowntagname" for "[PDOC]"

Option 3 - Also put the Catalog into another collection
  • Follow Option 1, but add "Myowntagname" to your catalog book along with "[PDOC]"

Periodicals - Magazines, Newspapers
Spoiler:


Magazines and newspapers downloaded to the Kindle can be put into collections using this plugin and Calibre even though they can't be put into collections manually on the Kindle.

Option 1 - Just put the periodical into a collection
  • Used Edit Collections and select the collection you want to use
  • Select the periodical to include (make sure there is a checkmark in the Include box)
  • Save the collections
  • Follow the instructions in the popup to load the new collections (which, depending on your exact device, will be either unplug, restart, or import in CM/LS. Note: If you need to restart your Kindle (this is not the same as using the power on/off switch):
    • On the Kindle press the Home key, then press Menu, select Settings, then press Menu again and select Restart
  • Be aware that the Kindle automatically deletes older periodicals unless you mark them Keep

Option 2 - Import the periodical into Calibre and put it in a collection
  • Import the periodical into Calibre
  • Select Send to Device
  • Run the plugin, making sure you use customizations that select your periodical
  • If you have a Calibre save Template that changes the pathname of books sent to the Kindle you may end up with 2 copies of the periodical. The plugin will warn you about this the next time you run View Collections.


Calibre Tips: Custom Columns, Book Titles, Authors
Spoiler:

Custom Columns

Creating custom columns in Calibre gives you more options when naming your collections with Create Collections. So instead of just using Author or Tag names as collection names, you can create your own names. They are also needed if you want to use Import Collections. For full details see the Calibre User Manual entry for Templates at http://calibre-ebook.com/user_manual/template_lang.html or this thread https://www.mobileread.com/forums/sh...d.php?t=118563s , but some basic examples are below.

Empty custom column which you can use to type in your own text (or use with Import Collections)
Spoiler:
  • Select Preferences->Add your own columns
  • Click Add custom column
  • Enter a Lookup name, e.g.: kindlecollections
  • Enter a Column heading that will be displayed in the GUI, e.g.: Kindle Collections
  • Select Column type, for example: "Comma separated text, like tags, that display in the tag browser"
  • Restart Calibre
  • You now have a new column in which you can enter comma separated names, and use in the plugin
  • In the plugin's Customization window, select 'Create' for the new custom column


For more advanced custom columns that use the information found in other columns, you have to define a Template to tell Calibre what to display. Use the steps in the example below for all of the examples that follow.

Example: Author Lastname, Firstname
Spoiler:
  • Select Preferences->Add your own columns
  • Click Add custom column
  • Enter a Lookup name, e.g.: mycollectioncolumn
  • Enter a Column heading that will be displayed in the GUI, e.g.: My Collection Column
  • Select Column type: "Column built from other columns"
  • Enter this text into the Template box: {author_sort}
  • Restart Calibre
  • In the plugin's Customization window, select 'Create' for the new custom column

Author - Series if the book is in a series, otherwise Author
Spoiler:
  • Template: {author}{series:| - |}

Author - Series if the books is in a series, otherwise empty
Spoiler:
  • Template: {series:|{author} - |}

AuthorLastname, Firstname: Series only if the book is in a series
Spoiler:
  • Template: {series:|{author_sort}: |}

Series if the book is in a series, otherwise Author
Spoiler:
  • Template: {series:'ifempty($, field('author'))'}
  • Change 'author' to 'author_sort' to display Author's Lastname, Firstname

The text "Short Stories" if there is a tag called "Short", otherwise Author
Spoiler:
  • Template: {tags:'contains($,"Short","Short Stories", field("author"))'}


Book Titles:

Book titles don't really have anything to do with this plugin or collections, but since its common to modify them using Calibre plugboards to make them more useful on the Kindle, here are some basic examples. These changes only affect the titles on your Kindle and not the information in Calibre. See this thread https://www.mobileread.com/forums/sho...d.php?t=118563 for more details.

Titles with the format: SeriesName - SeriesNumber - Title
Spoiler:
  • Go to Preferences->Metadata plugboards
  • Under "Add new plugboard" select Format "any format", and Device "KINDLE2" (even for Kindle 3)
  • In Source template type: {series}{series_index:0>2s| - | - }{title}
  • Set Destination to "title"
  • Click "Save plugboard", then click Apply, Close
  • Resend your books to the Kindle



Authors:

To show Authors as "Firstname Lastname" instead of "Lastname, Firstname" (and thus handling multiple authors properly) on your Kindle:
  • Click on Preferences
  • Select Output Options
  • Click on Mobi Output on the left
  • Check the box labelled "Use author sort for author"
  • Resend your books to your Kindle

Import Collections to Calibre from your Kindle
Spoiler:
  1. Create a custom column in Calibre to hold your data. See the Custom Columns section of this post for more details.
  2. Select Import Collections then choose the custom column you want to use.
  3. Your Kindle collections will be loaded into your column (only for books already in Calibre)
  4. If you want to update the list, just run Import again and all entries in the column will be updated
  5. Now you can use Create Collections to create collections from this column (select it in the Customize window) or just use the column to show you what collections are on your Kindle

You can use any of the following types of custom columns:
  • Comma separated text, like tags (Recommended)
  • Text, column shown in the tag browser
  • Long text, like comments
  • Yes/No

If you want to import the actual books on your Kindle into Calibre, change to the Device view (click the Device icon), then select one or more books and right click on the books and select Add.


Note on Commas and Semicolons:
  • Since collection names are separated by commas, in order to allow commas in collection names (like "Lastname, Firstname") the plugin temporarily replaces them with semicolon when you Import collections.
  • When you use Create Collections to generate collections the ";" will be changed back to a "," on the Kindle.
  • If you want to manually edit the collection name in the Calibre column you will need to use ";" instead of a ",".
  • If you have a semicolon in a collection name on the Kindle and you import it and export it, it will get converted to a comma.





Customization Details
Spoiler:

Customizations are used when running Preview or Create Collections.



Column Settings:
  • Action:
    • Select what to do for each Calibre column:
      Create - create collections based on the column
      Delete - delete Calibre collections if you changed your mind
  • Prefix:
    • Choose text to add to the start of collection names to allow sorting
    • You can change the prefix once the collection is created
    • For example: "_" or "~" or ":" or "__" - force collection names to appear at the start of sort By Title. Don't include quotes (") in any of the fields unless you need them.
    • You can use more than one character to allow indenting ("_", "__", "___")
    • Leaving the prefix blank will sort collections by title along with books - works best if just using Collections view
    • Sort order on the Kindle is not straightforward. The plugin attempts to sort titles exactly as they'll show up on the Kindle 3 when you use View collections or see them in the detailed report, but this may not always be accurate. In particular, it is completely different on the Touch & PaperWhite, and may vary depending on the exact FW version used. Since the PaperWhite, the single quote is the only character assured to be sorted at the top.
      • These characters are useful for sorting and will potentially be sorted in this order: _`^~'([{$+<=>|"
      • The full order of the characters used when sorting by Title on the Kindle 3 is: - _,;:!?/.`^~'"()[]{}@$*&#%+<=>|0-9a-z (case is ignored)
      • The full order of the characters used when sorting by Title on the Kindle Touch is: _-`^§©®+<=>¬|~¢$£¥€0-9 a-zA-Z#[:·?)\"{.!/%…;&]},*'(@ (case is unpredictable)
      • The full order of the characters used when sorting by Title on the Kindle PaperWhite is: '0-9 a-zA-Z_·™…].¢#*`)"¬£-;@&{^/,©%~=|®}€>[($+:?!¥\<§ (case is unpredictable)
      • You should avoid using a comma (",") to avoid issues with import into comma separated custom columns

        But the following characters are invisible to the sort order (on the Kindle 3): -?/]#.'\*})&:@%;"!,
        same thing on the Kindle Touch: #[:?)\"{.!/%…;&]},*'(@
        and finally, on the Kindle PaperWhite: _·™…].¢#*`)"¬£-;@&{^/,©%~=|®}€>[($+:?!¥\<§
  • Suffix
    • Choose text to add to the end of collection names, e.g. use prefix "(" and suffix ")"
    • Use symbols if you want to be able to automatically change suffixes later
  • Minimum - Set the minimum number of books required in a collection before creating the collection
    • "3" - If there are only 2 books in the collection, it won't create the collection
    • leaving blank is the same as "1" - at least 1 book
    • If the book count goes below the minimum, the existing collection will not be removed (unless you uncheck preserve Kindle-only)
  • Ignore
    • Skip certain words or patterns when creating collections:
    • "History, Not this author,Or this one" - ignore the exact names (do not include the quotes)
    • "-.*" - ignore any entry in the column starting with "-"
    • ".*anywordinthemiddle.*" - ignore any entry in the column containing the word "anywordinthemiddle"
    • ".*-nocollect" - ignore any entry in the column ending with "-nocollect"
    • "\[.*\]" - ignore any entry containing in brackets. The "\[" is necessary because the "[" is a special character in patterns
    • leaving blank means no entries in the column are ignored
  • Include:
    • Select only certain words/patterns when creating collections
    • "History,Biography" - create only the History and Biography collections if they exist in this column
    • "\+.*" - create collections from entries in this column only if they start with "+"
    • If you use an ignore pattern it will be applied before the include pattern
  • Rename
    • Advanced feature to allow you to rename Calibre collections before saving them to the Kindle.
    • Uses the python command re.sub(from_pattern, to_pattern, collection_name) on your patterns to do the renaming.
    • Rename is run after the ignore/include patterns
    • For example, to remove the '+' at the start of any collection in Calibre, use from: ^\+(.*)$ to: \1
    • To rename a specific collection, e.g., use from: "\[PDOC\]" to: "Personal Documents"
    • To merge 2 names into one use: from: ^(FirstTag|SecondTag)$ to: NewMergedName (the old collections will still be on the Kindle until you remove them)
  • Split on character
    • If you have a plain text column instead of a tags like column, you can split the text into separate collection names
    • For example, if you had a plain text column containing "A/B/Sea" and entered "/" as the split character, the plugin would treat "A", "B", and "Sea" as separate collection names.

General Settings:
  • Never delete or modify Kindle collections matching certain words or patterns:
    • A failsafe list of Kindle collection names (with prefix/suffix) that will not be modified regardless of the other settings
    • "___Currently Reading" - never delete the "___Currently Reading" collection on Kindle - whether it is in Calibre or not
    • "\[.*\], Dictionaries" - never delete or overwrite any collection like "[somename]" or named "Dictionaries"
    • "\*.*" - never delete or overwrite anything starting with "*" - "*" is a special pattern character
  • Preserve existing Kindle-only collections
    • Defaults to true - keep collections that won't be modified/created by Calibre
    • Calibre-managed collections are any collections that are selected by your customizations, Kindle-managed collections are any that are not selected
    • This will make sure the collection will be kept in case the collection is not in the 'never delete' list and Calibre is not updating it
  • Toolbar icon default menu
    • By default the icon on the Calibre toolbar will open a menu to choose what action to run
    • You can change this so that clicking on the icon will automatically run an action (Create, Edit, Import, etc.)
    • You can always access the menu of other actions using the small down arrow to the right of the icon
  • Ignore Prefix and Suffix
    • Set whether to ignore the prefix and suffix when checking if a Calibre collection matches a Kindle collection
    • Only considers non-alphanumeric characters as part of the prefix or suffix
    • Useful to allow changing the prefix without creating new collections instead of replacing them
  • Ignore uppercase/lowercase
    • Defaults to ignoring case when checking words/patterns
  • Fast reboot when you unplug your Kindle
    • Only visible if you have the screensaver or font hack installed on a Kindle 2/DX/3/4
    • If checked, creates the 'reboot' file to cause the Kindle to quickly reboot once you disconnect the USB cable and load the new collections without restarting the Kindle
  • Reset timestamps on Collections
    • By default the plugin updates the timestamps for each collection in order to force the collections to sort in alphabetical order when you use Sort by Collections or Sort by Most Recent on the Kindle
    • Uncheck this option to keep the timestamps set when you last opened the collections on your Kindle
  • Ignore exported collections database (Kindle Touch/PW/PW2/KT2/KV/PW3/KOA/KT3/KOA2/PW4/KT4 only)
    • Completely discard the existing collections.json file when creating collections, since it may not be in sync (if you didn't do an export in Collections Manager or Librarian Sync recently), and Collections Manager will never delete a collection. That helps avoid losing items in Kindle only collections with "Preserve existing Kindle-only collections", and saves Collections Manager some time, since that effectively leaves only Calibre managed collections to import.
  • Only generate data for created/updated collections (Kindle Touch/PW/PW2/KT2/KV/PW3/KOA/KT3/KOA2/PW4/KT4 only)
    • Only populate the json db with collections that have been updated (created/modified [added/removed items]). Since Collections Manager never deletes a collection, and always rebuilds modified collections from scratch, that can save a considerable amount of time by simply not feeding CM stuff that it would only waste time rebuilding with the exact same content. It tremendously speeds up the Calibre => Kindle sync for incremental updates.

      Note that while this works with LibrarianSync too, it's completely redundant there, since LS does its own optimisation to avoid doing unnecessary work .
  • Kindle Model
    • Should be autodetected on most OSes. If by chance it's not accurate, set it properly to get accurate feedback from the plugin.

A special note on patterns:
  • In order to be flexible, the ignore, include, rename and never overwrite/delete fields can support patterns
  • Patterns use special characters to represent normal letters/numbers (sometimes called regex or regular expression patterns)
  • For example "." means any character, "*" means 0 or more of the preceding character, ".*" means ignore 0 or more of any character, "^" means start of the text, "$" means end of the text
  • To use a normal "." in your word/pattern you have to put a "\" in front of it like "\."
  • A pattern like "^\[.*\]$" will match words that start with "[" with any number of characters up to "]" at the end of the word
  • Special characters in patterns include: \ | + . * [ ( ? ^ $

Reading List/Book Sync plugin
Spoiler:

To automatically sync books and recreate collections when you connect your Kindle you can use kiwidude's Reading List plugin
  • Once you have customized this plugin to generate the collections you want, you can use the Reading List plugin to select new books to automatically sync/send to your Kindle AND to automatically run Kindle Collection's Create option when you next connect your Kindle.


Edit Collections Manually on your Kindle using a GUI

You can also use this plugin to manage your collections without entering any data into calibre by selecting Edit Collections to display a simple GUI editor. You can add/remove books to collections, add/remove/rename collections, and see a list of books in collections that you can sort by title/author/date (so it is also a useful way to view your collections).

Spoiler:

  1. Start Calibre
  2. Connect the Kindle via USB to your PC
  3. Click on the Kindle Collections icon in Calibre to see a drop down menu of options
  4. Select Edit Collections, then add/remove books from collections
  5. Eject the Kindle (Devices->Eject)
  6. Disconnect your Kindle from the PC
  7. Follow the instructions in the popup to load the new collections (which, depending on your exact device, will be either unplug, restart, or import in CM/LS. Note: If you need to restart your Kindle (this is not the same as using the power on/off switch):
    • On the Kindle press the Home key, then press Menu, select Settings, then press Menu again and select Restart




Modify Kindle Settings such as Margins and Fonts

On older, non-touh devices (Kindle 2/DX/3/4), you can also set your Kindle's horizontal justification, margin size, and even fonts without installing any hacks using this option.

Spoiler:

Before connecting your Kindle to your PC and changing any of these settings, you must press the Home key on the Kindle to go to the Home page or your changes will be ignored.


Justification
Control whether the text is left justified (ragged right edge) or fully justified (straight left and right edges). Not all books will be affected by this setting depending on how they were created. You can change the setting on the Kindle once you run the plugin and if check 'Allow user justification'.

Margin
Control the amount of space between the edge of the screen and the text. The Kindle allows you to set to a few values (fewest, fewer, default), but you can use the plugin to set other margins (e.g. 20).

Fonts
The Kindle does allow you to use a different font for your books without jailbreaking and without installing a font hack. But you need to follow a few steps so that the plugin can find your font and the Kindle can use your font.
  1. Find some fonts to use.
    • The font must have 4 Truetype or OpenType files - one each for Regular, Bold, Italic, and BoldItalic variants
    • For example, DroidSerif is popular and free, available from http://www.google.com/webfonts/famil...ly=Droid+Serif (you will need to extract the 4 files from the zip file, and rename DroidSerif.ttf to DroidSerif-Regular.ttf)
  2. Go to the Home screen of your Kindle, then connect your Kindle to your PC
  3. Create the directory "fonts" on your Kindle at the top (e.g. E:\fonts) if it isn't there already
  4. Copy the 4 font files to your Kindle's directory - you must use a specific name format, e.g. if your font is called "DroidSerif", then the 4 files in the font directory must be named as follows (use "-" not "_", and use ".ttf" even if its an OpenType font):

    DroidSerif-Regular.ttf
    DroidSerif-Bold.ttf
    DroidSerif-Italic.ttf
    DroidSerif-BoldItalic.ttf
  5. Run the plugin - your font should be visible in the drop down menu for fonts. If it is not visible then check that the 4 file names are correct and in the right directory
  6. Select your font, and click Save
  7. Eject and Restart your Kindle

Notes:
  • If you get the message "The selected item could not be opened" when you try to open a book, it means the font you selected is not compatible with the Kindle for some reason. Go to the Home screen of your Kindle, reconnect it to your PC, use the plug to select a default font, and restart your Kindle.
  • You can copy any number of fonts to your Kindle's font directory. The plugin will show a list of all fonts it finds (but each font must have the 4 files with the name pattern above, e.g. MyFont-Regular.ttf, ...). Only 1 font can be used by the Kindle at a time - you will need to use the plugin and restart the Kindle to change fonts.
  • To change back to a regular font, just use the "Aa" key to select "std". To use your custom font select "alt" (if "alt" is no longer available, use the plugin to reselect your custom font).
  • The plugin actually copies the 4 font files to the names alt-Regular, alt-Bold, etc. It sets the preferences to use the font name you gave, but when the Kindle restarts its automatically changed to "alt". The Kindle only seems to recognize the "alt" name and not other names, so the plugin just copies your font files to the "alt" name when you select it.
  • If you have only 3 of the 4 variants of a font, you could copy/rename one of the others, but this does not always work or look right

Font Size
The size of the text on your Kindle will depend on the font you use. You can also set the size directly on your Kindle.

Line Spacing
You can already control this on the Kindle, but you can use this to set more values.

Other
There are various other settings that the plugin will allow you to change, but they have no known effect.





Working in Tandem with Collections Manager On the Touch, PaperWhite, PaperWhite 2, Basic, Voyage, PaperWhite 3, Oasis, Basic 2, Oasis 2, PaperWhite 4 & Basic 3

On those devices, the plugin needs a third-party tool running on your JailBroken device to actually load the new collections. That implies an extra degree of indirection (meaning an extra step). It also means means that, while possible, keeping a two-way sync gets pretty tedious, so I'll mostly be focusing on a speedy Calibre => Kindle one-way sync workflow.
Installing CM and its prerequisites is out of scope here, so if you're not familiar with the process, read the CM thread, and the stickies in the Kindle Dev subforum . To that effect, I'll be assuming you have CM properly installed & running.
In the same vein, for PaperWhite, PaperWhite 2, Basic, Voyage, PaperWhite 3, Oasis, Basic 2, Oasis 2, PaperWhite 4 & Basic 3 owners, I'm assuming you're running a FW version that plays nice with CM, and isn't concerned by the Cloud Collections mess (again, refer to the CM thread for details) [If you're wondering why you seem to be missing some Collections, and that you're running FW >= 5.4.2, Cloud Collections are probably to blame].

Speaking of CM particulars, while this plugin doesn't handle nesting, CM does. Know that an import will never change the nesting of existing items, and that new items will always be flat, and at the root. With a bit of manual work after an import, you can handle the nesting to your liking yourself, without having to do it all over again on the next import.

Spoiler:
  • Setup the plugin as usual, making sure that your Kindle model is accurately detected. If you exclusively intend to do a one-way sync (Calibre => Kindle), I recommend enabling both the "Ignore exported collections database" & the "Only generate data for created/updated collections" options, it'll speed things up in CM later on.
  • Save your collections, eject & unplug your device. The popup should be mentioning Collections Manager, so let's launch it.
  • Once CM has started, tap the Menu button in the top bar.
  • Enter the "Synchronization" menu, and tap "Import collections from Calibre"
  • CM will churn for a while, printing its progress in the status bar at the top. Once it's done, quit CM (by hitting the Home or Prev button). Tada! Your collections are here .


Working in Tandem with LibrarianSync On the Touch, PaperWhite, PaperWhite 2, Basic, Voyage, PaperWhite 3, Oasis, Basic 2, Oasis 2, PaperWhite 4 & Basic 3

Much like CM, this is another third-party tool that can be used in tandem with this plugin to handle collections on FW 5.x. It has a much narrower focus than CM (it only does import/export), but is less burdened with compatibility woes, which means it should work on the full range of FW 5.x FirmWares, and will probably deal with CloudCollections and FW >= 5.4.2 in a saner manner than CM. It's also faster than CM when importing/exporting .
Installing LS and its prerequisites is out of scope here, so if you're not familiar with the process, read the LS thread, and the stickies in the Kindle Dev subforum . To that effect, I'll be assuming you have LS & co properly installed & running.

Spoiler:
  • Setup the plugin as usual, making sure that your Kindle model is accurately detected. If you exclusively intend to do a one-way sync (Calibre => Kindle), I recommend enabling the "Ignore exported collections database" option.
  • Save your collections, eject & unplug your device. The popup should be mentioning Librarian Sync, so let's access its KUAL menu.
  • Launch KUAL, and click on the Librarian Sync button.
  • Tap the Update collections (from calibre plugin json) button. (Note that the Rebuild variant of this button deletes every non-empty collections first, which is probably not what you want if you don't have a solid two-way sync in place).
  • LS will churn for a while, printing its progress in the bottom left corner of your screen. Once it's done, quit KUAL (by hitting the Home or Prev button). Tada! Your collections are here .


Troubleshooting

Click on the Show buttons in this post to see more details.
If you have questions not answered here, just post - there are too many old/irrelevant posts to read through.

Spoiler:
  • Restart your Kindle if you don't see the collections you created or changes you made:

    On the Kindle press the Home key, then press Menu, select Settings, then press Menu again and select Restart

  • To change the Kindle to sort By Collections, or By Title, or By Most Recent:
    • On the Kindle press the Home key, then go up on the 5-way pad, then go right on the 5-way pad and select a sort method
    • Use sort By Collections to see just your collections in alphabetical order. If you open a collection it will move to the top of the list (until you run the plugin again) because the list is actually sorted by most recently accessed. If you only use this view, you can change the prefix text to blank since there are no books to mess up the sort order.
    • Use sort By Title to browse your collections in alphabetical order. This isn't affected by what collections/books are most recently opened, but it does show all your books after your collections and requires using prefix text (e.g. "_") to force collections to the top of the list (see Customization details for the sort order of characters)
  • Use Restore if you've saved collections to the Kindle but want to go back to the previous version
  • If you delete books from the Kindle using Calibre, restart the Kindle to make sure it updates the collections
  • If News Feeds, Catalogs, Magazines, Newspapers, or other items are missing from collections check the Examples section for details on how to add them
  • If you want to automatically create collection names with a comma in them you need to replace the comma with a ";" in Calibre (commas on the Kindle are ok, but semicolons on the Kindle will convert to "," on import to Calibre), - see Import Collections
  • A collection is either Kindle Managed or Calibre Managed. If you manually edit a Calibre-Managed collection, the collection will just get overwritten the next time you run Create collections. (The Preview report indicates whether collections are Kindle or Calibre managed - its determined by what Customizations you enter)
  • If the report indicates files aren't found, try resending the file to the Kindle
  • If the report indicates an invalid Mobi file, try reconverting the file to Mobi format from either the current Mobi file or another format, and resending to the Kindle. And test opening the book to make sure it isn't empty.
  • Some files on the Kindle are hidden from normal view - usually dictionaries. The plugin can only see these if you manually add them to a collection on the Kindle
  • When using patterns certain characters are special and must have a "\" in front of them to treat them like normal characters
  • If you click on the Device icon you can probably see a list of books on the Kindle and what collections they are in (after ejecting/restarting/reconnecting your Kindle) - but NOT for any Amazon purchased books, and sometimes it doesn't seem to work
  • If you still get more collections/different collections than you expected - check your Calibre templates in Preferences -> Sending books to devices, Preferences -> Plugins -> Device Interface Plugins -> Kindle 2/3 Device Interface, and check any Metadata Plugboards. Calibre can modify a lot of what gets written - so check your settings.
  • You can use Debug mode to view details about collection creation if you are having issues:
    • Select the menu (down arrow icon) attached to the Calibre Preferences icon
    • Choose "Restart in debug mode"
    • Re-run the plugin and you will see a debug file and filename displayed once you close Calibre
      OR
    • run "calibre-debug -g" from the command line ("calibre-debug -g > output.txt" to save it to a file)

Version History:
Spoiler:

Version 1.7.29 - 01 Oct 2020
- Guess what? Python 3 fixes.

Version 1.7.28 - 27 Sep 2020
- More Python 3 fixes.

Version 1.7.27 - 26 Sep 2020
- Some Python 3 fixes.

Version 1.7.26 - 08 Jun 2020
- Fixed an unfortunate dependency on future in the previous version.

Version 1.7.25 - 07 Jun 2020
- Initial port to Python 3, thanks to an initial patch by @ArcensLay (bumped minimum Calibre version to 3.42.0)

Version 1.7.24 - 04 Jun 2019
- Handle & detect the Kindle Basic 3.

Version 1.7.23 - 03 Dec 2018
- Fix issues with metadata parsing on KFX files (authors being stored as a list instead of a unicode string)
This actually really fixes what v1.7.20 attempted to.
As such, deleting the on-device cache [kindle_collections_path_cache.calibre] is strongly recommended,
(and just plain necessary if you were actually encountering the issue).
- Fix model autodetection on Windows
This actually re-implements what v1.7.19 removed, but updated for the current Calibre backend.

Version 1.7.22 - 14 Nov 2018
- Handle & detect the Kindle PaperWhite 4.

Version 1.7.21 - 30 Aug 2018
- Fix a bug with multi-author books not found in Calibre's db

Version 1.7.20 - 31 Jul 2018
- KFX support (thanks to @stefano.sb!)
- Fix a giant oversight in the filtering of unwanted file extensions when walking the device's directory tree...
This should speed things up to a certain extent.
(You may also want to delete the on-device cache [kindle_collections_path_cache.calibre] to purge bogus directories from there, but that'll entail re-parsing the metadata of every book on your device, which may take a while the first time).

Version 1.7.19 - 15 Jul 2018
- Fix device autodetection on Windows (bumped minimum Calibre version to 2.50.1)

Version 1.7.18 - 03 Jun 2018
- Handle & detect the Kindle Oasis 2.
- Much like other devices on current FW, you'll have to use LibrarianSync and not Collections Manager .

Version 1.7.17 - 19 Jul 2016
- Handle & detect the White Kindle PaperWhite 3, the Kindle Oasis & the Kindle Basic 2.

Version 1.7.16 - 21 Apr 2016
- Handle & detect the Kindle Basic, Kindle Voyage & Kindle PaperWhite 3

Version 1.7.15 - 9 Sep 2014
- Mention LibrarianSync alongside Collections Manager where appropriate.

Version 1.7.14 - 12 Aug 2014
- Bump the settings store version to make sure everyone runs a model autodetect, and that it's stored in its correct format.
- Check that the settings are current in a few more places where it might be important, instead of blowing up in weird and interesting ways .

Version 1.7.13 - 12 Aug 2014
- Minor cosmetic changes to the docs & some UI elements to more accurately reflect the current state of things
- The plugin has a new icon. It's still terrible. .

Version 1.7.12 - 11 Aug 2014
- Multiple changes needed to work in tandem with ixtab's Collections Manager on the Touch, PW & PW2
- Autodetect the Kindle model (should work on every OS, except possibly Windows XP). Upped the store revision to force people to at least launch the settings once to trigger an auto-detect/set a kindle model.
- Disable the 'Modify Kindle Settings' stuff on >= K5
- Disable the fast reboot via hack setting on >= K5
- Add a new setting (only enabled on >= K5) to completely discard the existing collections.json file when creating collections, since it may not be in sync (if the user didn't do an export in Collections Manager), and Collections Manager will never delete a collection. That helps avoid losing items in Kindle only collections with keep_kindle_only, and saves Collections Manager some time, since that effectively leaves only Calibre managed collections to import.
- Use the correct sort order on the Touch (might not be 100% accurate, it's boring and annoying as hell to check, and there might be some unicode issues since the Touch handles some unicode chars...).
- Don't ask >= K5 users to reboot their Kindle in the confirmation popup, instead ask them to do an import in Collections Manager.
- Add a new Touch/PW only setting that will only populate the json db with collections that have been updated (created/modified [added/removed items]). Since Collections Manager never deletes a collection, and always rebuilds modified collections from scratch, that can save us a considerable amount of time by simply not feeding CM stuff that it would only waste time rebuilding with the exact same content. It tremendously speeds up the Calibre => Kindle sync for incremental updates.
- Handle the sort order on the PW. And it sucks. Basically, the only things that we're sure will be in front are the single quote and digits...
- Minor formatting tweaks of some settings' tooltips
- Handle azw3 & pobi files
- Add more extensions to the exclude list (some 3.4 & 5.x stuff), and don't even look in the sidecar folder on the Touch/PW.
- Added some topaz stuff to the exclude list
- Rework the Mobi metadata code (based on MobiUnpack)
- Try harder to decode metadata title & authors properly to try to help with the few encoding related issues reported
- Support the language & rating default columns as a possible data source
- Handle multiple authors properly in mobi metadata, even in files built by KG 2 & recent Calibre versions.
- Some minor tweaks to make use of the newdb API (requires Calibre >= 1.0.0)
- Fix various case issues with file extensions (thanks to zelo for reporting this)
- Packaged it properly, should be infinitesimally faster to load.
- Ported to PyQt5

Version 1.7.11 - 30 Sep 2012
- Added support for azw3 files in collections using NiLuJes patch.

Version 1.7.10 - 23 Nov 2011
- Fixed non-english locales (@fr-FR) showing up at end of collection names

Version 1.7.9 - 6 Nov 2011
- Fixed error message about Nonetype object appearing after Create completes
- Fixed debug output to better handle encoding of text on some systems

Version 1.7.8 - 1 Nov 2011
- Added warning to Modify Settings to show any misconfigured fonts
- Fixed issue with locale sometimes showing up in Edit Collections for collections created on the Kindle

Version 1.7.7 - 14 Oct 2011
- Fixed failure when book contains apparently invalid utf8 characters in name

Version 1.7.6 - 08 Oct 2011
- Fixed failure when book contains invalid published date

Version 1.7.5 - 30 Aug 2011
- Added code to catch error in Topaz book metadata

Version 1.7.4 - 22 Aug 2011
- Added timestamp (Date of adding book to calibre) as a selectable field for collection names

Version 1.7.3 - 04 Aug 2011
- Added cbz as a valid extension to support books in comic format
- Added audio formats mp3, aa, aaz as valid extensions to help support audio books in collections

Version 1.7.2 - 17 July 2011
- Added audio subdirectory to directories checked for books

Version 1.7.1 - 25 June 2011
- Fixed error when encountering invalid utf8 character when sorting names

Version 1.7.0 - 17 June 2011
- Changed create/preview/view to background jobs to avoid blocking calibre and to support Reading List correctly
- Changed collections to merge when multiple Calibre columns have the same collection name
- Added code to refresh collection list in Device Tab after Create (but all collections won't be visible until calibre is updated to correctly show Kindle collections)
- Fixed issue with rare crash if a particular book's timestamp could not be read
- Moved warning about books being manually edited to report instead of dialog
- Removed unnecessary extra call to get device info which confused job percentage complete
- Requires Calibre 0.8.6 - in order to support jobs and syncing correctly

Version 1.6.3 - 30 May 2011
- Fixed creating extra collections in some circumstances when using a split character
- Added check in Import to skip import if no collections are found on the Kindle
- Added option to keep existing Collection timestamps instead of forcing them to sort by name in Sort by Collections
- Added information on how to restart Kindle to save dialog

Version 1.6.2 - 21 May 2011
- Fixed creating only empty collections when Kindle is reconnected on Windows
- Fixed incorrect number of books in collections when using split character
- Fixed crash of calibre when using Customize to change toolbar icon menu style
- Fixed incorrectly showing error if FONT_FAMILY setting does not exist
- Changed Edit to sort author by Calibre author_sort if available else name defined in Mobi book
- Removed invalid extension warnings to avoid false positives, but left in debug output
- Added warning message if two collection names from Calibre would conflict if prefix/suffix is ignored
- Added error message if no books on device are retrieved from Calibre
- Added error message if no books on device are retrieved from Kindle
- Added title of book in warning message about manually edited Calibre collections instead of code
- Changed displayed pathnames to full paths in correct windows/linux style
- Requires Calibre 0.8.2 or later due to tool bar fix

Version 1.6.1 - 07 May 2011
- Removed warning message about system encoding left over from debugging
Version 1.6.0 - 04 May 2011
- Added new feature to allow modifying Kindle settings such as margins, justification, and fonts
- Modified sorting code to improve performance and remove unnecessary custom and confusing sorting routines
- Modified encoding to convert windows cp1252 encoded titles/authors to utf8 correctly for display/sorting
- Added an About box to show plugin's version
- Fixed issue where Create would run even when icon was set to Show Menu
- Cleanup of routines loading calibre library data

Version 1.5.7 - 24 April 2011
- Fixed (hopefully) dealing with non-ascii characters in collections and pathnames
- Sorted book details in reports by title instead of path

Version 1.5.6 - 24 April 2011
- Fixed setting title and author from mobi file contents
- Fixed failure when encountering non-utf-8 characters in pathname

Version 1.5.5 - 23 April 2011
- Fixed failure when printing empty values in report

Version 1.5.4 - 23 April 2011
- Added customization option to change toolbar icon to either launch an action (create/edit/etc) or just show menu
- Added support for "," in collection names by converting to ";" when importing and re-converting to comma on export
- Added warning if you try to use the plugin before Calibre has loaded all book metadata from the Kindle
- Added error message if no columns have 'Create' or 'Delete' selected when running Create/Preview Collections
- Added version number to create/preview/view reports
- Modified boolean columns to create a collection name the same as the column name including books where column value is True
- Modified default keys in menu (e.g. after opening menu, pressing 'C' runs Create)
- Fixed crash when reporting that the collections file had an incorrect format that was fixed
- Fixed error when trying to create collections from a boolean column
- Replaced os.path.walk with os.walk and removed unicode encoding of path
- Various cleanup of messages, layout change to Customization window
- Requires 0.7.57 (book metadata check)

Version 1.5.3 - 17 April 2011
- Fixed failure when book has no author and calibre has multiple authors
- Fixed setting correct defaults for books without files

Version 1.5.2 - 16 April 2011
- Fixed setting of default values

Version 1.5.1 - 16 April 2011
Import
- Fixed failure to import on Windows due to pathname
- Fixed incorrect collections assigned to books
Create
- Fixed failure when column selected that has no data
- Fixed failure in Delete collections due to calling routing with an extra argument
Customize
- Fixed reset to defaults not working

Version 1.5.0 - 15 April 2011
Major rewrite to make use of new Calibre 0.7.53 plugin api
General
- Fixed adding periodicals to collections (corrected check to use code type not mobi type)
- Added caching of Kindle book data to improve performance
- Modified reading of calibre data to improve performance
- Added support for Palm Doc Mobi format to show titles instead of pathnames
- Added using author/title from Calibre if not available from Kindle
- Added additional debug output including timestamps
- Added support for skinning/replacing plugin icons
Quality Checks:
- Report empty files, invalid extensions, duplicate codes
- Report files with same title, author and date
- Report personal doc tag settings
- Warn of additional invalid patterns
- Warn of patterns containing special characters
- Cleanup for invalid entries in collections.json file
Edit Collections:
- Added columns for author and date
- Added column to indicate if book is in Calibre
- Added column to indicate if book is visible or can be added to a Kindle collection
- Added sort by Include/Title/Author/Date/In Calibre/Visible/Collections by clicking on header column
- Added ability to select multiple books using shift-click and add/remove them at the same time
- Added tooltip hints and details (path, code, etc.) to each book
- Added save/restore window size
- Removed requirement to run customization before using the first time
Import Collections:
- Added new function to import collection names from Kindle into custom columns
- Supports text or boolean custom columns and warns if data already exists in the column
Reports:
- Added author/date of book/periodical
- Added list of titles per collection, sorting by date for same titles as per Kindle
- Added "Periodical: Back Issues" collection if it exists to match Kindle
- Fixed listing of periodicals (show only 1 in main list, rest in back issues)
- Added listing of collections per book in the book details
Customization:
- Added Title column to customization choices
- Added ability to split a Calibre text column into separate collections
- Modified rename to convert single character collections to uppercase (make A-Z look better)
- Prevent saving if there are any errors
- Removed View report link to avoid confusion
- Changed default to not create any collections to avoid creating too many unexpectedly
Menus
- Added shortcut keys to menu and re-ordered menu list
- Added the option to add plugin to right-click context menus in Calibre
Create/Preview:
- Added deletion of Kindle collections that don't meet minimum counts
- Added deletion of Kindle collections if they are in Calibre but have no books on the Kindle
- Added check if collections other than Never Delete are manually edited since last Create

Version 1.4.3 - 16 March 2011
Fixed author_sort not being collected
Fixed encoding in edit collection titles
Fixed Sample Books can't be added to collections (EBSP type)
Added report messages about book types that can't be collected without updating their cdetype
Added additional file extensions to ignore in Edit
Added additional debug statements

Version 1.4.2 - 14 March 2011
Added detection of invalid book types such as news feeds that can't be put into collections
Fixed new users being unable to run plugin because customizations would not save
Fixed encoding to UTF-8 for title/collection list
Fixed allow same collection name to be created with different prefixes/suffixes
Fixed map ignore_prefix to ignore-prefix_suffix from legacy versions
Fixed import author_sort from legacy versions
Fixed set settings from older legacy versions

Version 1.4.1 - 12 March 2011
Fixed minimum count being ignored
Fixed encoding to UTF-8 for report

Version 1.4.0 - 11 March 2011
Renamed to Kindle Collections
Requires Calibre 0.7.48
- to show custom columns (0.7.45)
- to show error message when trying to customize when Kindle not connected (0.7.46)
- to support customization for multiple libraries / devices (0.7.48)
Added Edit existing Kindle collections (intended for non-Calibre managed collections)
Added View existing Kindle collections - sorted by title and by last access time
Added support for User Categories
Added support for multiple Libraries and multiple Kindles
- automatically migrate old customizations to new format
Added option to Delete Calibre-related collections (previously could only add/rename)
Added option to add suffix to collection names
Added option to do fast reboot/framework reset if hacks are installed (visible only if hack installed)
Added a customized Kindle Collections toolbar icon
Changed toolbar icon to only open a menu - to avoid accidentally running Create
Changed to using live Calibre data instead of Kindle's metadata.calibre file
- Setting Automatic Management is no longer required
- Changes to column data are immediately reflected in collections without re-syncing/sending to device
Changed sort order of collection names to match Kindle 3
Changed last access timestamp to keep existing timestamps for Kindle-only collections
Changed Column names to use actual names in customization window and reports
Changed report:
- display report in a messagebox instead of separate file
- added details on all books processed and what collections they've been added to
- showing deleted books separately to added/modified books
- using debug mode is no longer necessary for investigating issues
- use book titles for warnings instead of path names
Changed tooltips to include even more information
Changed version numbering in customization file to be independent of plugin version
Fixed warning to not show if no collections exist on the Kindle (1st time use)
Fixed Cancel in customization after running preview to restore original values correctly
Fixed the location where 1.3 saved the plugin customization json
Fixed preferences to be customized via Preferences->Plugins
Fixed regex symbols in collection names
Fixed ebook format exception checking
Fixed customization_help command line to work correctly
Restructured/rewrote/cleaned up most routines, converting many into classes
Moved the changelog to a separate file

Version 1.3.3 - 12 February 2011
Fixed skip any books in metadata.calibre that are not active in Calibre
Fixed trap invalid Mobi files

Version 1.3.2 - 11 February 2011
Fixed exception handling for invalid unpack of Mobi
Fixed exception handling for invalid pattern or pattern in text
Added tooltip about special characters

Version 1.3.1 - 10 February 2011
Fixed help to change from hyperlink to automatically showing report due to windows bug

Version 1.3.0 - 10 February 2011
Added option to keep existing Kindle-only collections
Added option for general ignore - , e.g. to allow keeping Kindle collections just in case
Added option to ignore prefix when comparing on what to delete when keeping Kindle-only
Added preview collections without saving to Kindle to menu and Customize screen
Added displaying of a detailed report after running/previewing (before/after changes)
Added check for first time use to force user to see Customize window
Added check for Automatic management setting
Changed case-sensitive to global to avoid confusion with general ignore
Changed customization fields to preserve leading/trailing spaces to allow space in prefix
Removed Dictionary references since new keep Kindle-only will do similar function
Changed reference to plugin json to use os.path to avoid possible issues on windows
Added tooltips to customize window
More cleanup

Version 1.2 - 3 February 2011
Rewrote code to support GUI customization instead of tweaks
Specify collections to include as well as ignore, per column
Support case sensitivity in ignore/include patterns
Allow a couple built-in books/dictionaries to be put into collections
Split code into separate files to match example plugins

Version 1.1.1 - 28 January 2011
Fixed minimum books and lastAccess to make collections least recent

Version 1.1 - 28 January 2011
Added sorting by last access time, minimum books per collection type,

Version 1.0 - 27 January 2011
Initial release


Donations

If you find this plugin useful, feel free to say thanks with Paypal (goes towards the original developer, meme).



$Id: KC_MR_THREAD 17820 2020-10-01 18:20:54Z NiLuJe $
Attached Thumbnails
Click image for larger version

Name:	Calibre_Plugins.png
Views:	220306
Size:	84.0 KB
ID:	126710   Click image for larger version

Name:	Calibre_Plugboard.png
Views:	219713
Size:	81.6 KB
ID:	126711   Click image for larger version

Name:	Calibre_Mob_PDOC.png
Views:	219577
Size:	103.0 KB
ID:	126712   Click image for larger version

Name:	Calibre_KColl_Settings.png
Views:	219572
Size:	95.3 KB
ID:	126713   Click image for larger version

Name:	Calibre_KColl_Edit.png
Views:	218444
Size:	107.5 KB
ID:	126714   Click image for larger version

Name:	Calibre_KColl_KSettings.png
Views:	218151
Size:	60.0 KB
ID:	126715   Click image for larger version

Name:	Calibre_CustomColumnTpl.png
Views:	217914
Size:	45.1 KB
ID:	126716   Click image for larger version

Name:	Calibre_Feed_PDOC.png
Views:	217812
Size:	86.2 KB
ID:	126717   Click image for larger version

Name:	Calibre_CustomColumn.png
Views:	217099
Size:	37.8 KB
ID:	126718   Click image for larger version

Name:	Calibre_Catalog.png
Views:	217518
Size:	44.0 KB
ID:	126719   Click image for larger version

Name:	CM_Menu.png
Views:	219623
Size:	39.3 KB
ID:	126720   Click image for larger version

Name:	CM_Menu_Sync.png
Views:	218864
Size:	39.1 KB
ID:	126721   Click image for larger version

Name:	kual_ls.png
Views:	215414
Size:	10.7 KB
ID:	128100   Click image for larger version

Name:	librariansync.png
Views:	215277
Size:	14.5 KB
ID:	128101  
Attached Images
 
Attached Files
File Type: zip Kindle Collections.zip (317.8 KB, 64311 views)

Last edited by NiLuJe; 10-01-2020 at 02:22 PM. Reason: 1.7.29
NiLuJe is offline   Reply With Quote
Old 08-11-2014, 12:05 AM   #2
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,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Um, this plugin does support the Kindle Touch/PW, right?
eschwartz is offline   Reply With Quote
Advert
Old 08-11-2014, 12:06 AM   #3
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012464
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@eschwartz: Yup, haven't gone through the docs in the first post yet, besides the changelog .
NiLuJe is offline   Reply With Quote
Old 08-11-2014, 12:09 AM   #4
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,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Ah, oh right you just posted it. It's very confusing when you sprout these giant posts and then go back and edit them. You've done this before.... Perils of being a quick noticer of things, I guess.

Anyway, great work on porting to Qt5 and, errm, things (whatever they may be).
eschwartz is offline   Reply With Quote
Old 08-11-2014, 12:14 AM   #5
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012464
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Yeah, guilty as charged . Even a random two lines post can be Frankensteined with edits ;p.

That said, speaking of the docs, if anything looks outdated or weird, don't hesitate to mention it. It's 6AM here, so I'll crash soon, but I'll look it over tomorrow^Wlater today .

All the 'Kindle Settings' (margins/fonts) stuff comes to mind, for example. Also, properly documenting the CM workflow would be neat. (Mostly talking to myself so I don't forget here ).

EDIT: Hahaha. Updated the beginning of the post re: K5, managed to miss the big red paragraph. Time to go to sleep ;p. (That, and my commit messages are starting to look crazy).

----

Kovid just switched the master list of plugins, so this should now be hitting Calibre installs everywhere . (That means you can shout at me if I broke something ^^).

Last edited by NiLuJe; 08-11-2014 at 12:32 AM.
NiLuJe is offline   Reply With Quote
Advert
Old 08-11-2014, 03:56 PM   #6
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012464
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Right! The doc should now be up to date .

I also pushed 1.7.13, which only contains fairly minor cosmetic tweaks.
NiLuJe is offline   Reply With Quote
Old 08-11-2014, 04:20 PM   #7
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,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
If my Kindle shows up as a Kindle Touch, should it still offer in the dropdown to Modify Kindle Settings?

Last edited by eschwartz; 08-11-2014 at 04:28 PM.
eschwartz is offline   Reply With Quote
Old 08-11-2014, 04:22 PM   #8
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012464
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@eschwartz: Yep, but clicking it will popup a warning instead of the unsupported stuff. I think I can't get rid of the menu entry because it's initialized before the settings, IIRC.

Last edited by NiLuJe; 08-11-2014 at 04:34 PM.
NiLuJe is offline   Reply With Quote
Old 08-11-2014, 04:28 PM   #9
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,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
No warning here, but there was an:

Quote:
calibre, version 1.205.0
ERROR: Kindle Collections: Unable to write new preferences to the Kindle.<P>
When I clicked save.

(I tried this from Windows, and it does autodetect as a Kindle Touch.)
eschwartz is offline   Reply With Quote
Old 08-11-2014, 04:37 PM   #10
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012464
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@eschwartz: Hrmm. Can't reproduce here. Did you *save* the Plugin settings first (And not simply popped the menu up and clicked cancel)?

I'll check with a Calibre beta, see if there's something wonky going on.
Attached Thumbnails
Click image for larger version

Name:	Calibre_KS_Shoo.png
Views:	2191
Size:	36.0 KB
ID:	126723  
NiLuJe is offline   Reply With Quote
Old 08-11-2014, 04:52 PM   #11
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,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Didn't realize I had to do that. It was autodetected after all.
eschwartz is offline   Reply With Quote
Old 08-11-2014, 04:55 PM   #12
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012464
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@eschwartz: I'll look into blowing up early if the settings are out of date .

Well, at least I got to finally test it on PyQt5 ;p.
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2014-08-11 at 22.53.45.png
Views:	2221
Size:	41.1 KB
ID:	126724  
NiLuJe is offline   Reply With Quote
Old 08-11-2014, 06:56 PM   #13
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012464
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
And, err, bumped to 1.7.14, to fix the stale settings issue @eschwartz encountered .
NiLuJe is offline   Reply With Quote
Old 08-11-2014, 07:01 PM   #14
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,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)


Three versions in two days -- you have been busy!



Is there something strange in the post that is stopping calibre from seeing the version history?

Last edited by eschwartz; 08-11-2014 at 07:06 PM.
eschwartz is offline   Reply With Quote
Old 08-11-2014, 07:03 PM   #15
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012464
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Or a bit too light on QA, depending on how you see it ;p.
NiLuJe is offline   Reply With Quote
Reply

Tags
collections plug-in, kindle

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle Collections plugin JosephWebber Plugins 1 08-21-2017 11:44 AM
[GUI Plugin] Kindle Collections (old) meme Plugins 2070 08-11-2014 12:02 AM
KIndle collections Calibre plugin atp Library Management 0 02-21-2012 07:26 PM
[GUI Plugin] WebOS Kindle-Import CranstD Plugins 0 01-24-2012 03:36 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 03:36 AM.


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