Ephemerality / xray-builder.gui

A .Net application that processes e-books to create X-Ray files for the Amazon Kindle (Paperwhite, Voyage, Fire). X-Rays are built complete with chapter locations and excerpts.
MIT License
65 stars 9 forks source link

An error occurred while building the X-Ray #61

Closed oloorlik closed 6 months ago

oloorlik commented 6 months ago

Hello, Today I tried to use your tool and after One Click option this error showed up: An error occurred while building the X-Ray:

Invalid pattern '("|‘|’|‚|‛|“|”|„|‟)?\bRand (aka Rand al'Thor(('|’||´)s|('|’||´))?("|‘|’|‚|‛|“|”|„|‟)?[!.?,");:]('|’|`|´)("|‘|’|‚|‛|“|”|„|‟)(-|‐|‑|‒|–|—|―|…|–|—|’|‚|…)' at offset 259. Not enough )'s. at System.Text.RegularExpressions.RegexParser.ScanRegex() at System.Text.RegularExpressions.RegexParser.Parse(String pattern, RegexOptions options, CultureInfo culture) at System.Text.RegularExpressions.Regex.Init(String pattern, RegexOptions options, TimeSpan matchTimeout, CultureInfo culture) at System.Text.RegularExpressions.Regex..ctor(String pattern, RegexOptions options, TimeSpan matchTimeout, CultureInfo culture) at System.Text.RegularExpressions.RegexCache.GetOrAdd(String pattern, RegexOptions options, TimeSpan matchTimeout) at System.Text.RegularExpressions.Regex.Matches(String input, String pattern, RegexOptions options) at XRayBuilder.Core.XRay.Logic.Terms.TermsService.FindOccurrencesLegacy(Term term, Paragraph paragraph) in C:\projects\xray-builder-gui\XRayBuilder.Core\src\XRay\Logic\Terms\TermsService.cs:line 220 at XRayBuilder.Core.XRay.Logic.Terms.TermsService.FindOccurrences(IMetadata metadata, Term term, Paragraph paragraph) in C:\projects\xray-builder-gui\XRayBuilder.Core\src\XRay\Logic\Terms\TermsService.cs:line 157 at XRayBuilder.Core.XRay.Logic.XRayService.ExpandFromRawMl(XRay xray, IMetadata metadata, Stream rawMlStream, YesNoPrompt yesNoPrompt, EditCallback editCallback, IProgressBar progress, CancellationToken token) in C:\projects\xray-builder-gui\XRayBuilder.Core\src\XRay\Logic\XRayService.cs:line 231 at XRayBuilder.Core.XRay.Logic.Build.XRayBuildService.<>c__DisplayClass9_0.b__1() in C:\projects\xray-builder-gui\XRayBuilder.Core\src\XRay\Logic\Build\XRayBuildService.cs:line 118 at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at XRayBuilder.Core.XRay.Logic.Build.XRayBuildService.BuildAsync(Request request, YesNoPrompt yesNoPrompt, YesNoCancelPrompt yesNoCancelPrompt, EditCallback editCallback, IProgressBar progress, CancellationToken cancellationToken) in C:\projects\xray-builder-gui\XRayBuilder.Core\src\XRay\Logic\Build\XRayBuildService.cs:line 130 at XRayBuilderGUI.UI.frmMain.btnBuild_Run() in C:\projects\xray-builder-gui\XRayBuilder\src\UI\frmMain.cs:line 212

I tried WordDumb plugin for Calibre and it works for me but I wanted to try your method too.

Book that was used in X-Ray Builder Lord of Chaos - Robert Jordan, azw3 file.zip

Ephemerality commented 6 months ago

Looks like the Goodreads characters had different formatting than I had encountered before, they had "aka" parts in their names that weren't part of the proper alias list section. I've fixed it in the latest version, but you may also be better off using the Roentgen data source instead of Goodreads as it has more characters available (370 vs 36). You should also delete the B003BQZ80M.aliases file from the ext folder before trying again, if one had been created, as it's probably corrupted.

I didn't know someone made another new x-ray Calibre plugin, those are usually more convenient to use than my application. This project was started 10-ish years ago and while it was (I believe) the only option for a good while, eventually people came along and tried making plugins instead. It looks like that one tries to pull from some other sources as well which could be useful, so far nothing really compares to when Shelfari was available for character data.