View Single Post
Old 11-28-2010, 08:15 PM   #1
thermopyle has learned how to read e-booksthermopyle has learned how to read e-booksthermopyle has learned how to read e-booksthermopyle has learned how to read e-booksthermopyle has learned how to read e-booksthermopyle has learned how to read e-booksthermopyle has learned how to read e-books
Posts: 43
Karma: 874
Join Date: Nov 2010
Device: Kindle
AKC! - Automatic Kindle Collection Generator

Hey, first post here, just wanted to share a program I wrote for my Kindle 3 with you guys because this place was a great information resource for while I was writing the thing.

AKC! is a console-based application written in C# that generates collections on your Kindle based on your Kindle's directory structure. Running it is as simple as putting it in the root directory of your Kindle, double-clicking on it, and then you're done. No user-input required, though .net 4.0 needs to be installed.

The program basically allows for emulating a "View by Folders" option on the Kindle, which sadly is not a built-in function. With that in mind, this program does nothing more than run through the directory structure of your Kindle's documents folder and adds every file to a collection based on the sub-directories it's in. For example:

x:\documents\Jim Butcher\Dresden Files\Storm

Storm Front is added to the collections Jim Butcher and Dresden files. As I said, it's small.

I suggest using this program with Calibre. If you do so, you can create all kinds of collections based on Calibre column values. You can, for example, add a Genre1 and Genre2 field, putting books into multiple categories such as Paranormal and Mystery, or an Read Status field, with values of Read and Unread for easy sorting of which books you've yet to go through. Simply adding the column and including it in the "Send to Disk" template, then running AKC!, will allow you to easily sort your books according to any categories you wish.

Now, as I'm sure most people are aware, there are tricks to get the kindle to display collections alphabetically (choose "Sort by Title" and have a character before the collection name, such as ( or [ to force it to the top) Here are the two I'm using, plus an extra, in from top to bottom as the Kindle will display them (with this program, you have to use symbols that can be used in folder names):

( -- These are my author collections

[ -- These are my series collections

{ -- This would follow the above two. Just FYI if anybody has a use for it.

Here is my Calibre "sending to device" template: ({author_sort}/[{series}/{title} - {authors}

If you look at it, you'll realize that if the author or series is missing, you'll end up with a folder named ( or [, respectively. The program will automatically add files in such folders to (No Collection and [No Collection, respectively. This acts as a catch-all for those books that do not belong in any other collection. For me, standalone books will end up in [No Collection, as a grouping of books that are not in a series. Same with books without a defined author; they'll appear in (No Collection. You can use whatever template you wish, and the program will use those symbols interchangeably with your template.

So, to use the program:

Download the program here.
Backup your collections.json file from your your /system/ folder(this program currently does not do so).
Put CollectionGenerator in the root directory of your Kindle.
Double-click on CollectionGenerator.
Reboot your Kindle, and your collections will be there. ^_^

Note: I do not have any DRM books, so I do not know if this will work for them. Let me know if it does, please. If not, I'll try to fix it.

Version information: Current version is .62

.6 - Initial Version
.61 - ( now creates a (No Collection collection, similar to [ created [No Series originally. [ now gives the more generic [No Collection to fit other directory templates.
.62 - Fixed a bug that caused partial matches to be dumped together. For example, books in a directory named Dr. Who Adventures would be added instead to the Dr. Who collection, if both are present.


.7 - Will add the ability to leave user-defined collections intact. Users can create their own collections with a leading ~, which the program would leave alone when generating the directory-based collections.

Last edited by thermopyle; 12-12-2010 at 12:06 AM. Reason: Couple of misspellings.
thermopyle is offline   Reply With Quote