steve8x8 / geotoad

Geocaching query tool written in Ruby
https://buymeacoffee.com/steve8x8
Other
28 stars 8 forks source link

Wrong parsing of caches like "Walk by the river by Max (adopted by George)" #245

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Looking deeper into issue 244, I found that the parsing rules for the 
"pageTitle" line (in lib/details.rb, parseCache()) aren't able to properly 
identify cache name and owner strings if there are multiple "by"s.

"Print" files, as used by GeoToad, don't separate the cache name from the owner 
- both are just concatenated with a "by" in between.

The pattern that had been in use for a long time would split after the first 
occurrence of the word "by" - obviously wrong for "Walk by the river by Max 
(adopted by George)" (check GC25F9 for a real-life example); even splitting at 
the _last_ occurrence instead would fail in such a situation.

What we can extract from the pageTitle is a good guess - and correct in more 
than 99% of all cases (and nobody has even noticed the odd single percent). 
Nevertheless, if it's possible to fix this glitch, it should be done.

Original issue reported on code.google.com by Steve8x8 on 31 May 2012 at 5:11

GoogleCodeExporter commented 9 years ago
I'm not sure what would happen if a user's language selection wasn't English, 
but the following commit (to branch) is my first attempt to address the 
multiple-by problem:

http://code.google.com/p/geotoad/source/diff?spec=svn1159&r=1159&format=side&pat
h=/branches/steve8x8/lib/details.rb

Original comment by Steve8x8 on 31 May 2012 at 7:14

GoogleCodeExporter commented 9 years ago
I found that the patch would also "de-entitize" special characters, and instead 
output UTF-8 on my Linux system. May I ask someone running Windows to tell me 
how for example the owner name of GC2VDE3 is output? ("list" output, hexdumped 
or uploaded, preferred)

Original comment by Steve8x8 on 5 Jun 2012 at 10:11

GoogleCodeExporter commented 9 years ago
Merged into trunk (r1418)

Original comment by Steve8x8 on 24 Aug 2013 at 12:55

GoogleCodeExporter commented 9 years ago
This issue is believed to be fixed in 3.17.11 (pre-release of 3.18.0).

Original comment by Steve8x8 on 12 Sep 2013 at 11:34