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

This plugin does not work on Kindle Touch because Amazon changed the way the Kindle manages collections on the Touch. This cannot be fixed by modifying the plugin since the collection information is no longer accessible by users. You may want to contact Amazon and ask them to provide a way to manage your collections without having to edit them using the Kindle..

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.

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:

Start Calibre

Connect the Kindle via USB to your PC

Click on the Kindle Collections icon in Calibre to see a drop down menu of options

Select Customize to choose which collections to create from Calibre (set the Action column to "Create")

Click OK to save your customizations

Run Preview to see what collections will be created/modified (edit Customizations again as necessary)

Run Create to save the collections to the Kindle

Eject the Kindle (Devices->Eject)

Disconnect your Kindle from the PC

Restart your Kindle to load the new collections (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

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

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

Restart your Kindle

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.

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

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 http://www.mobileread.com/forums/sho...d.php?t=118563 for more details.

Create a custom column in Calibre to hold your data. See the Custom Columns section of this post for more details.

Select Import Collections then choose the custom column you want to use.

Your Kindle collections will be loaded into your column (only for books already in Calibre)

If you want to update the list, just run Import again and all entries in the column will be updated

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.

These characters are useful for sorting and will 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)

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: -?/]#.\'\\*})&:@%;"!,

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

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:

Start Calibre

Connect the Kindle via USB to your PC

Click on the Kindle Collections icon in Calibre to see a drop down menu of options

Select Edit Collections, then add/remove books from collections

Eject the Kindle (Devices->Eject)

Disconnect your Kindle from the PC

Restart your Kindle to load the new collections (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

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 mustpress 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.

Find some fonts to use.

The font must have 4 Truetype or OpenType files - one each for Regular, Bold, Italic, and BoldItalic variants

Go to the Home screen of your Kindle, then connect your Kindle to your PC

Create the directory "fonts" on your Kindle at the top (e.g. E:\fonts) if it isn't there already

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):

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

Select your font, and click Save

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.

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:

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 debuggingVersion 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.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.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.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 version history to 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,

Initial feedback:
Plugin generally works, no errors displayed. No stray file left without collections (I had three with the othe python script that were always left out). No obvious problems with cyrillic names. I only tried creating collections by authors - I commented out other two options.
Issues:
1. Collections are sorted in apparently random order, no relation to alphabetical order, English and Russian authors mixed together. I can't see any logical order, looks completely random. It should be sorted alphabetically initially (then I think Kindle would put collections you accessed recently on top).
2. For authors that only have one book in my Kindle, collections were still created. Those single books should be left alone, or like the other script there should be an option how many books is enough to create a collection.

I would like to try this out but I only want my collections created based on the tags info, I do not want to put any extra symbols before or after the name. Is this possible with your plugin? This is the tweak I added, is it correct?

Thanks romandesign for trying it out - and posting your feedback. Glad its working for you. Even I got some warnings when running since a couple of my mobi files are corrupted (must get around to regenerating/resending them )

As you saw, just using "authors": "~ " will only pick up authors, and you can change "~" to "-" or even ""

1. You need to change the sort order on the Kindle to Title - see the Tips section above. At least, it sounds like the issue. This will mean you see all your collections in alphabetical order and then your books. Sorting by Collections is showing the collections in most recently accessed order. Right now I'm not putting a timestamp on the file since I use sort by Title. I'll consider putting a timestamp to sort them initially -but as soon as you access a collection it will jump to the top of the list and mess up your order - which is why sort by Title is nicer.

2. Yes, if you are creating collections by authors then it creates a collection even if there is one other. This makes sense to me - otherwise you won't see your author in your list when you expect to. I'll see if there is demand for this as I don't want to keep adding options unnecessarily.

I'm thinking about providing a gui to edit the collection/ignore names to minimize confusion. We'll see how it goes.

I would like to try this out but I only want my collections created based on the tags info, I do not want to put any extra symbols before or after the name. Is this possible with your plugin? This is the tweak I added, is it correct?

Code:

create_kindle_collections_usecolumns = {
"tags"
}

No, you need to use

Code:

create_kindle_collections_usecolumns = {
"tags":, ""
}

but then if you use sort by Title in Kindle the collections won't be on top (which is why you use "-" instead of "")

Quote:

Will this add new books to existing collections?

No - the script ignores the collections on the Kindle and in fact overwrites the file (so back it up before running).

So to make sure I understand, each time it is run it will backup and re-create the collections file?

I am almost afraid to try it, I have over 1200 books on my kindle, all of them in collections but with the other 3 scripts I tried there were over 100 books that I had to put back into collections manually and I although I have backed up the json file and put it back on the kindle, even that doesn't seem to work 100%. I do not know what it is about these books but they will not go into their collections without intervention from me.

I think I am going to try this one on my husband's kindle before venturing into beta-land with mine.

1. You need to change the sort order on the Kindle to Title - see the Tips section above. At least, it sounds like the issue. This will mean you see all your collections in alphabetical order and then your books. Sorting by Collections is showing the collections in most recently accessed order. Right now I'm not putting a timestamp on the file since I use sort by Title. I'll consider putting a timestamp to sort them initially -but as soon as you access a collection it will jump to the top of the list and mess up your order - which is why sort by Title is nicer.

Nope, it doesn't work. If I choose "Title" in sorting options on the top - Kindle does not display any collections at all - just whopping 61 pages of books, one by one. To display collections I have to choose "collections" and I don't see any sorting method just for collections, so all I see is random names all over the place. Am I doing something wrong? Is there a way to choose sorting method for collections display?

So to make sure I understand, each time it is run it will backup and re-create the collections file?

Yes, it recreates it each time. But it only backs up the one previous collections file, so if you run the plugin once you still have your original collections file to restore. If you run it twice, it will delete the original backup. So I recommend copying the file to your PC before using the plugin - the backup of the file is just for emergencies.

Quote:

I do not know what it is about these books but they will not go into their collections without intervention from me.

I wonder if they are Amazon books?

Quote:

I think I am going to try this one on my husband's kindle before venturing into beta-land with mine.

Yes, please test it only if you can afford to lose your collections - its still early days for the script and I'd like more testing first.

Nope, it doesn't work. If I choose "Title" in sorting options on the top - Kindle does not display any collections at all - just whopping 61 pages of books, one by one. To display collections I have to choose "collections" and I don't see any sorting method just for collections, so all I see is random names all over the place. Am I doing something wrong?

Ah, this is why developing plugins for the Kindle is so painful/fun - it never seems to do the same thing for 2 people

Are you sure the collections are not there in the Title display - maybe at the end? Are you using "" as the prefix? Can you recheck your usecolumns setting to make sure its "tags": "" (I left the : off on a previous post) And test using the prefix "_" to force the collections to the top in the Title display just to see if they show up

Quote:

Is there a way to choose sorting method for collections display?

I believe the Collections display sorts by most recently used - if you open a collection it will jump to the top of the list. I don't think this can be changed, though my script could simulate it using fake access dates.

I'm not Roman, but I'm interested in this and have some of the same concerns he posted. I've been using the script from the other thread for well over a month now so I'm used to its behavior too.

Quote:

Originally Posted by meme

1. You need to change the sort order on the Kindle to Title - see the Tips section above. (snip)I'll consider putting a timestamp to sort them initially -but as soon as you access a collection it will jump to the top of the list and mess up your order - which is why sort by Title is nicer.

I see your point, but having the access time reset option does make it easier to make sure all your expected collections are there. It also, for me, ends up working like this - I have my most accessed collections at the top and the rest alphabetically while in collections-only view. This works because I update my collections at least once a week and I don't go rummaging through my collections much unless I'm reading something - that's one of the many things Calibre is for, so I don't have to rummage through my collections on the Kindle.

Quote:

2. Yes, if you are creating collections by authors then it creates a collection even if there is one other. This makes sense to me - otherwise you won't see your author in your list when you expect to. I'll see if there is demand for this as I don't want to keep adding options unnecessarily.

You can add a +1 to the demand for this. Honestly, the plugin isn't much use to me unless I can tweak the minimum number for a collection to be created. One reason is because I don't want to have a series collection unless I have at least three books for that series, and I don't want collections for my "low volume" authors. I can get around this by adding an author tag or creating a custom column to handle it, but I'd rather just stick with the script that's already configured that way.

Quote:

I'm thinking about providing a gui to edit the collection/ignore names to minimize confusion. We'll see how it goes.

That would be awesome. If you could put the most common options into a Plugin Configuration GUI, this plugin could be arguably the most versatile, user-friendly collection management option available.

Please don't take my comments as meaning "the script is better" because I'd much rather use the plugin if more of the same functionality was able to be implemented, such as that already mentioned as well as an option to run it in update instead of rebuild mode. I really don't want to have to stick my random non-modified Amazon files back in collections any more often than I have to. Those are the things that would make it useful to me. I think it's great that you've done this much - this is a plugin that many have been waiting on.

I just did a bunch of updates to my library and rebuilt my collections yesterday, so I really don't want to test the plugin right now. I'm collectioned-out at the moment. But I will give it a run this weekend. Does it produce a job log?

One more thing - in your first post (I think) you stated that you could replace the collection prefix character ("~", etc) with any text. This has not been my experience. For example, "> " will show up as gibberish on the Kindle, or at least it did when I've tried it in the past. I have no idea what other characters produce similar results. If I get ambitious this weekend maybe I'll test a bunch of characters and see what else works or doesn't.