|
|
#286 | ||
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 328
Karma: 800105
Join Date: Feb 2013
Device: PW1
|
Quote:
Quote:
In the case of this book, where there's so many (aka whatever)'s in the names, the automatic split won't work (which is what caused that error). The duplicate errors you can usually ignore. A lot of the issues on this one are caused by the person who edited Shelfari and decided that having 'Nickname (aka THEIR FULL NAME)' for every single character was a good idea... If you go through and edit the aliases to look more like this (feel free to copy/paste this bit as a starting point), it should work: Code:
Rand (aka Rand al'Thor, Car'a'carn, Dragon Reborn, Chosen One, Coramoor)|Rand al'Thor,Car'a'carn,Dragon Reborn,Chosen One,Rand Mat (aka Matrim Cauthon)|Matrim Cauthon,Mat Perrin (aka Perrin t'Bashere Aybara)|Perrin t'Bashere Aybara,Perrin If I get a chance later, I'll throw one together and put it on the server anyway. Huh, interesting. How far off are the highlights? The offset might be different for yours (making it that much more difficult to figure out lol). Last edited by Ephemerality; 01-26-2016 at 11:53 AM. |
||
|
|
|
|
|
#287 |
|
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 41
Karma: 40200
Join Date: Jun 2012
Device: Kindle PW3, Kindle 4
|
It is kind of random how it highlights the words, sometimes in the middle of pages, but the names are always highlighted correctly. I'll make a screenshot later.
|
|
|
|
| Advert | |
|
|
|
|
#288 | |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 328
Karma: 800105
Join Date: Feb 2013
Device: PW1
|
Quote:
The randomness of the excerpts could be due to the shortening process. If a character shows up too far within a paragraph to display, the builder will cut off the excerpt roughly around where the character is, depending on where sentences end. I don't think it does much for the start of the excerpt though. I haven't had a look at that portion in a while, I'll have to go through it and see if it can be improved easily at all... Edit: Now that I think of it, the entire reason I added the 'offset' option to the original command-line version was for Amazon books that didn't have X-Ray support yet. I pulled them off my Kindle, removed DRM, created X-Rays for them, then loaded the X-Rays alongside the original DRM-protected copy. I always attributed the offset to the DRM-removal process, but it looks like it's AZW3 as a whole. I've been scouring through the mobi format documentation and the unpacking process to see if I can figure out where the 16 character offset is coming from, but no luck so far.... If -16 works for *everyone* who tries it, I may just have to make it automatically use that value for AZW3s unless another solution is found. Last edited by Ephemerality; 01-26-2016 at 03:34 PM. |
|
|
|
|
|
|
#289 | |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 328
Karma: 800105
Join Date: Feb 2013
Device: PW1
|
Quote:
|
|
|
|
|
|
|
#290 |
|
Member
![]() Posts: 10
Karma: 10
Join Date: Feb 2016
Location: Georgia
Device: Kindle Paperwhite
|
Table of contents including too much text.
The answer to my question may be available, but I have not found it. When I run x-ray builder, it adds essentially all of the text into the chapter heading in the table of contents. The original only includes the actual chapter titles, but after the build, the table of contents is larger due to the added text. What am I doing wrong? |
|
|
|
| Advert | |
|
|
|
|
#291 | |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 328
Karma: 800105
Join Date: Feb 2013
Device: PW1
|
Quote:
You should be able to go into the ext folder and modify the chapter headings that were dumped to the chapters file. If you want, you can post the build log here in a spoiler tag and pm the book to me so I can investigate and improve the chapter detection. |
|
|
|
|
|
|
#292 |
|
Member
![]() Posts: 10
Karma: 10
Join Date: Feb 2016
Location: Georgia
Device: Kindle Paperwhite
|
I changed some setting and the problem went away. Not sure what I did wrong.
Thanks for such a great utility! |
|
|
|
|
|
#293 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 328
Karma: 800105
Join Date: Feb 2013
Device: PW1
|
|
|
|
|
|
|
#294 | |
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Feb 2016
Device: Kindle Paperwhite 3
|
Quote:
First I built an alias file without any parameters. The file worked but "Will" was suddenly the most important character in "A Game of Thrones". So I searched and found the /c parameter. Building the xray file still works but my kindle still shows every "Will" and "will", the same happens for "Ned" Stark and others. Does the Kindle cache the definitions somewhere or is there maybe a problem with the case sensitive parameter? By the way, the preview in the builder shows the same number of mentions as below. I'm using a .mobi file, as it didn't find any chapters in my .azw3. Here are some examples:
And as a feature suggestion: What do you think about a switch to only search for full words? Usefull for short names like Ned or Arry (so it wouldn't find turned and parry). |
|
|
|
|
|
|
#295 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 328
Karma: 800105
Join Date: Feb 2013
Device: PW1
|
Yeah, sorry about that. The /c parameter is actually broken in 2.0.10, it will be fixed in .11. The /r parameter for regex searches also isn't available in .10. I'll PM you a copy of the new version, but it should be out later this week as well if I get a chance.
Realistically, it should only be looking for whole words by default. I'll look into making that change, hopefully without breaking anything. |
|
|
|
|
|
#296 |
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Feb 2016
Device: Kindle Paperwhite 3
|
Thanks for the swift reply. In .11 the case-sensitive switch works. I already had a look at your github but as I use Mono on OS X I didn't finish optimizing it, yet. I'll continue with it now.
2.0.11 on Windows 7 works as it should. EDIT: Now I see multiple matches for the same mention. Example: Robert Baratheon|/c,The Ursurper,Demon of the Trident,Robert,Rob This Alias matches two times for Robert and three times for Robert Baratheon (I guess once for Robert Baratheon, once for Robert and once for Rob). EDIT2: Reverted to commit 63e5ed6 and there are no multiple matches. I think the changes in e7590db (Scan each paragraph for every alias and match all instances) might match too much. EDIT3: Just confirmed, the double/triple matches start at commit e7590db. So except for the known "whole word"-issue (Robb matches for Robb and also Rob) the X-Ray from 63e5ed6 look pretty good to me. Last edited by steinchen; 02-15-2016 at 07:06 PM. Reason: More testing |
|
|
|
|
|
#297 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 328
Karma: 800105
Join Date: Feb 2013
Device: PW1
|
Are you actually able to get it working in Mono? I tried but ran into multiple issues that I didn't bother trying to fix.
The multiple-matches thing is new and still needs work; we were trying to make it so that every instance of the character will be clickable (to open their X-Ray profile), because that always seems to be the #1 complaint. Need to work on ignoring duplicate matches like that. The regex that helps match things like "Rob's," (the punctuation at the end needs to match as well for the clicking bit) needs some tweaking too, it shouldn't be matching Robb if it's supposed to be Rob. |
|
|
|
|
|
#298 | |
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Feb 2016
Device: Kindle Paperwhite 3
|
Quote:
|
|
|
|
|
|
|
#299 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 328
Karma: 800105
Join Date: Feb 2013
Device: PW1
|
Awesome.
Any reason you're using Mono instead of Visual Studio, if you have access to Windows? Last edited by Ephemerality; 02-17-2016 at 10:00 AM. |
|
|
|
|
|
#300 |
|
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Feb 2016
Device: Kindle Paperwhite 3
|
Just that Mono was already installed. As the compiled files run on Windows I didn't bother installing Visual Studio.
My long term goal would be porting your code to python to use it as a calibre plugin. But as I have an hour a day at most I didn't even finish reading and commenting your code. I have to say that finding apostrophes doesn't work in the latest commit. Only noticed it last night while reading. In my current book they use ’ (U+2019, which according to ISO 10646 is the preferred apostrophe) for apostrophes and in your code it's a ' (U+0027). I guess some people might use ` (U+0060) or ´ (U+00B4), at least I did as a kid. Regex and I don't really get along but I tried changing Code:
string punctuationMarks = @"(?(')'s?|')?\b[!\.?,""'\);]*";
Code:
string punctuationMarks = @"(?(['´`’])['´`’]s?|['´`’])?\b[!\.?,""'\);]*"; Code:
string punctuationMarks = @"(?(’)’s?|’)?\b[!\.?,""'\);]*"; On the weekend I'll have a closer look at this (and I'll try to learn the regex syntax). |
|
|
|
![]() |
| Tags |
| x-ray |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Windows 8 with Kindle Application | nomadreader | Amazon Kindle | 4 | 03-16-2013 03:47 PM |
| Which Windows pc / Android application will keep epub annotations consistent? | internalaudit | Reading and Management | 0 | 03-01-2013 10:55 AM |
| how do you create your application installer for Windows. | KevinH | Calibre | 4 | 01-07-2011 10:04 PM |
| portable application for windows ebook reading | rheostaticsfan | Reading and Management | 8 | 06-27-2008 09:26 PM |