View Single Post
Old 04-18-2016, 05:21 PM   #1
szarroug3
Connoisseur
szarroug3 knows the difference between 'who' and 'whom'szarroug3 knows the difference between 'who' and 'whom'szarroug3 knows the difference between 'who' and 'whom'szarroug3 knows the difference between 'who' and 'whom'szarroug3 knows the difference between 'who' and 'whom'szarroug3 knows the difference between 'who' and 'whom'szarroug3 knows the difference between 'who' and 'whom'szarroug3 knows the difference between 'who' and 'whom'szarroug3 knows the difference between 'who' and 'whom'szarroug3 knows the difference between 'who' and 'whom'szarroug3 knows the difference between 'who' and 'whom'
 
Posts: 92
Karma: 10000
Join Date: Apr 2016
Device: Kindle PW2
[GUI Plugin] X-Ray Creator

Shelfari has officially started redirecting their pages to Goodreads. We've updated the plugin to support Goodreads but since they don't have a lot of data (a lot of characters and locations have no description at all), your generated x-rays will probably have a lot less data. Unfortunately, there's nothing we can do about this. I'm investigating getting character data from other places. Thanks.

I've created a Calibre plugin that creates and sends x-ray files to kindle.

Some background information on X-Ray and other Kindle Files:
X-Ray allows you to get information on key characters and terms from shelfari. You can do this in one of a few ways.
1. You can highlight the word in question and if the x-ray file has information on it, a popup with a brief description will show. It will also show you where this character has been mentioned in the past (will show page number and excerpt where mention occurred).
2. You can click X-Ray and search for the word either by looking through the list or using the search bar. Clicking on the word will show you the same popup from #1.

It also has a notable clips section which show quotes from shelfari. If there are not enough shelfari quotes found, the plugin will add more random excerpts so there are least 20 notable clips.

Author profiles allow you to see information on the author such as a bio, other books by the other, etc. You can see this by going to "About the author" on the menu while the book is open.

Start actions show you a description of the book along with other information such as the reading time and the rating (retrieved from Goodreads). It will also allow you to mark the book as currently-reading on Goodreads but you need to be signed into Goodreads on the device and you need to have wifi enabled and connected for this to work. There will be a pop-up showing you this information when you open a new book but you can also see it by going to "About this book" on the menu while the book is open.

End actions show you recommendations for other books based on the current book (retrieved from Goodreads). It will also allow you to mark the book as read on Goodreads but you need to be signed into Goodreads on the device and you need to have wifi enabled and connected for this to work. There will be a pop-up showing you this information when you reach the end of the book.

Note: These files work only work on Amazon products such as the Kindle PW. For more information on X-Ray files, see here: http://www.amazon.com/gp/help/custom...7-239A35EB4119

Github Page: https://github.com/szarroug3/X-Ray_Calibre_Plugin

This plugin will allow you to:
1. Set book specific preferences (This screen may take a while to open if doesn't have the ASIN and shelfari url set in the settings already as it will be searching for them; Use "," or ", " as a separator for words in aliases list)
Auto associate split aliases, when enabled, will split aliases up. For example, if a character on goodreads named "Vin" has a Goodreads alias of "Valette Renoux", this option will add "Valette" and "Renoux" as aliases. You may not want this in cases such as "Timothy Cratchit" who has a Goodreads alias of "Tiny Tim". Having this feature on would add "Tiny", and "Tim" as aliases which is not valid.
Input JSON must have format shown in "JSON Template" section below
2. Create/Update x-ray files for selected books
3. Send previously generated x-ray files to device
Note: Creating an x-ray file using this plugin will automatically search for and use the correct ASIN so you don't need to search for it.
Note: Highlighting words should work but I have not tested with a book that has DRM so I don't know if it will work for them.

JSON Template:
{"characters": {"Character1 Name": {"description": "Character1 Description",
"aliases": ["Character1 Alias1", ...]},
"Character2 Name": {"description": "Character2 Description",
"aliases": ["Character1 Alias2", ...]},
...},
"settings": {"Setting1 Name": {"description": "Setting1 Description",
"aliases": ["Setting1 Alias1", ...]},
...},
"quotes": ["Quote1", "Quote2", ...]}

Preferences:
1. Send files to device if connected
- After creating files, files will automatically be sent to device
2. Create files that don't already exist when sending to device
- When sending previously generated files, files will be generated for selected books that haven't already been created
3. Auto associate split aliases, when enabled, will split aliases retrieved from Goodreads up
- i.e If a character on goodreads named "Vin" has a Goodreads alias of "Valette Renoux", this option will add
"Valette" and "Renoux" as aliases. You may not want this in cases such as "Timothy Cratchit" who has a
Goodreads alias of "Tiny Tim". Having this feature on would add "Tiny", and "Tim" as
aliases which is not valid.
4. Overwrite local files that already exist when creating files
- When using the Create/Update Files function, this will decide whether or not to delete local files that already exist
5. Overwrite files on device that already exist when sending files
- When using the Send Files function, this will decide whether or not to delete files on the device that already exist
6. Files to create/send
- This will let you choose what type of files to create and/or send
- You must choose at least one.
7. Book types to create files for
- Selection of formats to consider when creating and sending files.
- You must choose at least one.
8. If device has both (mobi and azw3) formats, prefer
- This will choose which format to send files for if your device has both file formats
- This matters because there are offsets in the x-ray file that determine whether something that is highlighted is
part of the x-ray
- If you are sure you only have one format of the book type on the device, this does not matter.

Theming:
You can place a file at "\calibre\resources\images\X-Ray Creator\icon.png" (in your calibre application directory) to the plugin's icon.

Testing:
This plugin has been tested using a Kindle PW2 on Windows 10 and Linux.
I am still working on testing some portions of it so if you do find a bug or want to request a feature, please let me know via Github or Mobileread.

Here are some screenshots of the plugin in action:
Plugin will show up on your toolbar (if you enable it - remember: when device is connected, there is a separate toolbar)

Click image for larger version

Name:	toolbar.PNG
Views:	660
Size:	10.7 KB
ID:	152646

You can set general preferences

Click image for larger version

Name:	preferences.PNG
Views:	1108
Size:	17.4 KB
ID:	152645


You can set book specific preferences

Click image for larger version

Name:	book_preferences.PNG
Views:	1059
Size:	15.6 KB
ID:	152642


Plugin will add job to job manager

Click image for larger version

Name:	job_manager.PNG
Views:	975
Size:	25.9 KB
ID:	152644


Plugin will list execution, success, and failure information in job details

Click image for larger version

Name:	job_details.PNG
Views:	994
Size:	21.7 KB
ID:	152643


Donate:
Attached Files
File Type: zip xray_creator_calibre_plugin_3_1_2.zip (114.3 KB, 17369 views)

Last edited by szarroug3; 08-23-2017 at 01:21 PM.
szarroug3 is offline   Reply With Quote