steve8x8 / geotoad

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

Logs incomplete after 2012-12-11 site maintenance #259

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

Starting with the 2012-12-11 maintenance, GS uses new icons for almost 
everything. This causes the detection of log comments to fail - and you'll get 
a "random" set of logs only.
Since this will happen only on analysis of cdpf files created after the site 
update, for the first time you would have a mixture of good and bad caches in 
your GPX (which was the reason I didn't spot it... the fame of discovery goes 
to Cyril Duveau).
I'll work this out within the next 24 hours hopefully, and come up with a patch 
for the devel version as well as a fixed(!) new stable release - which will be 
delayed a bit for this reason. Thanks for your patience.

Original issue reported on code.google.com by Steve8x8 on 20 Dec 2012 at 9:01

GoogleCodeExporter commented 9 years ago
First shot at the issue (this is largely incomplete as "icon" handling doesn't 
work anymore, but was this ever used?). Please test (if possible, also with old 
cdpf files, using the -Z option):

--- old/lib/details.rb  2012-12-03 10:43:51.000000000 +0100
+++ new/lib/details.rb  2012-12-20 11:20:15.000000000 +0100
@@ -723,6 +723,8 @@

     # <dt>
     #   [<img src='http://www.geocaching.com/images/icons/icon_smile.gif' alt="Found it" /> Found it]
+    # !! new 2012-12-11 !!:
+    #   [<img src='../images/logtypes/2.png' alt="Found it" /> Found it]
     #   Sunday, 10 October 2010
     #   by <strong>
     #       silvinator</strong> (52
@@ -730,7 +732,8 @@
     # </dt>
     # <dd>
     # Gut gefunden. Man sollte nur auf Muggels achten!  Danke!</dd>
-    data.scan(/<dt.*?icon_(\w+).*?alt=\"(.*?)\".*?, ([\w, ]+)\s+by 
\<strong\>\s*(.*?)\s*\<\/strong\>.*?\<dd\>\s*(.*?)\s*\<\/dd\>/m) { |icon, type, 
datestr, user, comment|
+    #data.scan(/<dt.*?icon_(\w+).*?alt=\"(.*?)\".*?, ([\w, ]+)\s+by 
\<strong\>\s*(.*?)\s*\<\/strong\>.*?\<dd\>\s*(.*?)\s*\<\/dd\>/m) { |icon, type, 
datestr, user, comment|
+    data.scan(/<dt.*?\/([\w]+\.\w+).*?alt=\"(.*?)\".*?, ([\w, ]+)\s+by 
\<strong\>\s*(.*?)\s*\<\/strong\>.*?\<dd\>\s*(.*?)\s*\<\/dd\>/m) { |icon, type, 
datestr, user, comment|
       debug "comment date: #{datestr}"
       should_grade = true
       grade = 0

Original comment by Steve8x8 on 20 Dec 2012 at 10:24

GoogleCodeExporter commented 9 years ago
I will go over this again, but I think we're close now. Please test (both 
against stable and devel releases) and give feedback if possible

Original comment by Steve8x8 on 20 Dec 2012 at 1:19

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in trunk (r1252, to be released as 3.16.3 RSN) and branch (r1253).

3.16.2 users: Please upgrade to 3.16.3 as soon as possible.
3.17.4 users: Since the next development release is scheduled for January, you 
may be happier with the latest SVN branch, or by applying the attached patch 
(which doesn't exactly bring you to r1253 but will at least fix the issue).

Original comment by Steve8x8 on 20 Dec 2012 at 3:39

Attachments:

GoogleCodeExporter commented 9 years ago
3.16.3 released; 3.17.5 (to be released within a few days) will also 
incorporate this patch.

Original comment by Steve8x8 on 30 Dec 2012 at 2:56

GoogleCodeExporter commented 9 years ago
3.17.5 has been released today, fixing this issue. Closing.

Original comment by Steve8x8 on 2 Jan 2013 at 7:35