Jump to content

Improved Export From Gsak To Memory Map


roolku

Recommended Posts

I can't wait until GSAK supports the new waypoint types (at the moment it converts them all to others ;) ). Until then I have added some code to give at least a distinction between parking and other waypoints (plus the ones that I have manually added). This also works for grabbed waypoints. If anyone is interested, this is the new bit:

 

	<!-- Other -->
	<xsl:when test="Groundspeak:cache/Groundspeak:type='Other'">
	  <xsl:choose>
		<!-- House -->
		<xsl:when test="Groundspeak:cache/Groundspeak:placed_by='roolku'">
		  <xsl:text>1</xsl:text>
		</xsl:when>
		<!-- Car -->
		<xsl:when test="contains(Groundspeak:cache/Groundspeak:name,'Park') or contains(Groundspeak:cache/Groundspeak:name,'park')">
		  <xsl:text>3</xsl:text>
		</xsl:when>
		<!-- Flag -->
		<xsl:otherwise>
		  <xsl:text>10</xsl:text>
		</xsl:otherwise>
	  </xsl:choose>
	</xsl:when>
	<!-- Event -->

 

It should be obvious where it goes, just after the second <!-- Other --> comment.

Link to comment

I can't wait until GSAK supports the new waypoint types (at the moment it converts them all to others :D ). Until then I have added some code to give at least a distinction between parking and other waypoints (plus the ones that I have manually added). This also works for grabbed waypoints. If anyone is interested, this is the new bit:

 

	<!-- Other -->
	<xsl:when test="Groundspeak:cache/Groundspeak:type='Other'">
	  <xsl:choose>
		<!-- House -->
		<xsl:when test="Groundspeak:cache/Groundspeak:placed_by='roolku'">
		  <xsl:text>1</xsl:text>
		</xsl:when>
		<!-- Car -->
		<xsl:when test="contains(Groundspeak:cache/Groundspeak:name,'Park') or contains(Groundspeak:cache/Groundspeak:name,'park')">
		  <xsl:text>3</xsl:text>
		</xsl:when>
		<!-- Flag -->
		<xsl:otherwise>
		  <xsl:text>10</xsl:text>
		</xsl:otherwise>
	  </xsl:choose>
	</xsl:when>
	<!-- Event -->

 

It should be obvious where it goes, just after the second <!-- Other --> comment.

 

I've had trouble running this script with the above suggested change. It came up with a Groundspeak namespace undefined error (or similar, I forget now). I then noticed that the Groundspeak had a capital G, whereas the rest of the script was lower case g. I changed it, and it works fine. I now have parking co-ords and multi-locations too... ace!

 

Thanks!

Edited by Stuey
Link to comment

I've had trouble running this script with the above suggested change. It came up with a Groundspeak namespace undefined error (or similar, I forget now). I then noticed that the Groundspeak had a capital G, whereas the rest of the script was lower case g. I changed it, and it works fine. I now have parking co-ords and multi-locations too... ace!

 

Thanks!

 

Hm, that seems to be a "feature" of the forum.

 

testing Groundspeak testing

 

Sorry about that. :D

Link to comment

This script is really improving all the time, thanks! I have just realised that there is no CITO icons though (they come up as Mystery/Unknown). I don't suppose anyone fancies setting up the CITO icons do they? ;o)

Idea

 

Stuey, I have been looking at doing a Trig and/or YOSM Icons, I guess I could fit that in also. Not sure when I will have it done though as I have lots of other things to do at the moment

Link to comment

It is because you now have more than 100 icons and the PPC application can't handle the excess so those at the bottom of the list (the newest ones) are displayed with the blue dot instead.

 

Thanks for that, thought there must be a "simple" explanation... :unsure:

...unfortunately it's usually me! :unsure:

 

Just deleted all the red (unavailable) icons as I never need them because they are filtered out before export.

 

Hope that does the trick. :unsure:

 

Cheers

Dave

Link to comment

This script is really improving all the time, thanks! I have just realised that there is no CITO icons though (they come up as Mystery/Unknown). I don't suppose anyone fancies setting up the CITO icons do they? ;o)

 

Well, I did it myself :PCITO icons for Memory-Map

 

I accept no responsibilty if it cocks anyone else's scripts. I suggest you backup your own script before making these suggested changes.

Link to comment

I've just added a bit of code to give motorway mayhem caches their own icons:

 

Instructions and new icons can be found here

 

T

 

It's no big deal, but I just spotted a log that made a traditional (non MM) cache appear as a Motorway Mayhem cache. The log is here and has the words "Motorway Mayhem" mentioned in it, that's all. Not sure if it is fixable, but I thought I'd mention it :P

Link to comment

I've just added a bit of code to give motorway mayhem caches their own icons:

 

Instructions and new icons can be found here

 

T

 

It's no big deal, but I just spotted a log that made a traditional (non MM) cache appear as a Motorway Mayhem cache. The log is here and has the words "Motorway Mayhem" mentioned in it, that's all. Not sure if it is fixable, but I thought I'd mention it :lol:

Fixed

 

I have fixed the Motorway Mayhem problem which caused the inclusion of None Motorway Mayhem caches

 

Replace

 

	<!--  MM   --> 
<xsl:when test="Groundspeak:cache/Groundspeak:name=contains(.,'Motorway Mayhem')">
	  <xsl:text>20</xsl:text> 
	</xsl:when>

 

With

 

	<!--  MM   --> 
<xsl:when test="contains(Groundspeak:cache/Groundspeak:name,'Motorway Mayhem')">
	  <xsl:text>20</xsl:text> 
	</xsl:when>

 

Edited to add - As Roolku pointed out this Forum board capitalises the word Groundspeak , this needs to have a little g in all cases

Edited by Moote.
Link to comment

Another Fixed

 

Where someone appears to have a faulty Caps Lock Key :lol:

 

Replace

 

	<!--  MM   --> 
<xsl:when test="contains(Groundspeak:cache/Groundspeak:name,'Motorway Mayhem')">
	  <xsl:text>20</xsl:text> 
	</xsl:when>

 

With

 

	<!--  MM   --> 
<xsl:when test="contains(Groundspeak:cache/Groundspeak:name,'Motorway Mayhem') or contains(Groundspeak:cache/Groundspeak:name,'MOTORWAY MAYHEM')">
	  <xsl:text>20</xsl:text> 
	</xsl:when>

 

Remember the Forum board capitalises the word Groundspeak , this needs to have a little g in all cases

 

Now that catches all of them (I think), and leaves the others alone :P

Edited by Moote.
Link to comment

I've been trying to use this mechanism but memory-map keeps putting it's oar in. If I import an overlay file into memory-map in which the link entry "cmate:GCABCD" is present everything appeares ok, but by the time the overlay has been exported to the PDA, memory-map has converted the entry it to an absolute path "C:\blah\blah\cmate:GCABCD". Still trying to find a workround for this. :mad:<_<:mad:

Link to comment

I've been trying to use this mechanism but memory-map keeps putting it's oar in. If I import an overlay file into memory-map in which the link entry "cmate:GCABCD" is present everything appeares ok, but by the time the overlay has been exported to the PDA, memory-map has converted the entry it to an absolute path "C:\blah\blah\cmate:GCABCD". Still trying to find a workround for this. :D:D:(

Remove this part from the export "C:\blah\blah\" and just leave the cmate:GC1234 being written to the file

Link to comment

I've been trying to use this mechanism but memory-map keeps putting it's oar in. If I import an overlay file into memory-map in which the link entry "cmate:GCABCD" is present everything appeares ok, but by the time the overlay has been exported to the PDA, memory-map has converted the entry it to an absolute path "C:\blah\blah\cmate:GCABCD". Still trying to find a workround for this. :D:D:(

Remove this part from the export "C:\blah\blah\" and just leave the cmate:GC1234 being written to the file

 

Sorry Moote, it's the other way round. The initial CSV file contents are correct but memory map is pre-pending the "C:\blah\blah" to the data string that it exports to the PDA. Reading of the Memory-Map help file indicates that this field is intended to hold the FULL path and it looks like MM automatically creates a full path name.

Link to comment

Sorry Moote, it's the other way round. The initial CSV file contents are correct but memory map is pre-pending the "C:\blah\blah" to the data string that it exports to the PDA. Reading of the Memory-Map help file indicates that this field is intended to hold the FULL path and it looks like MM automatically creates a full path name.

Dose not with the amendment I am doing, I'm just in the process of fine tuning it to work with the script a little better, I think you might not have the heavily edited version and just the PC version of the xsl script

Link to comment

Now GSAK deals with the extra waypoints properly this script could do with some icons for parking/multi-stage and such, I'd have a go myself but don't have a clue about xsl, over to the experts...

By the way the custom export doesn't yet have the 'include child waypoints' option but if you export to a gpx and use that for the custom export instead of the automatically generated one it works well but all the extras just show as traditional cache icons.

If only I could get the new cachemate command line feature to work :P

Link to comment

I've been trying to use this mechanism but memory-map keeps putting it's oar in. If I import an overlay file into memory-map in which the link entry "cmate:GCABCD" is present everything appeares ok, but by the time the overlay has been exported to the PDA, memory-map has converted the entry it to an absolute path "C:\blah\blah\cmate:GCABCD". Still trying to find a workround for this. :unsure::):)

 

Version 1.1.1 of cachemate now works around this. If you give Memory Map a link of "\cmate:GCABCD" it will not have the path appended to it, and cachemate now strips the backslash off it. :huh:

Link to comment

...........errr............ Got a new comp recently and put MemoryMap and GSAK onto it. Have tried to get the custom icons to work but they don't, although I did get them to run on our old computer. Can anyone send me an idiot guide please?

 

Ta

 

PS not having been on here for yonks and being extremely lazy - can anyone tell me what the *&^% child waypoints and motorway madness mean? :)

Link to comment

Child Waypoints are additional waypoints added to a cache page by the owner which can be found just above the logs. Parking and other information, these are now included in PQ's. Motorway Madness is a series of linked caches by one placer. Motorway Mayhem are caches close to the Motorways which are designed to allow a cacher to break up a journey and grab a few quick caches along the way. Here's a list of Motorway Mayhem caches on the series home page

 

Dave

Link to comment

I don't think I've missed this in this thread, but apologise if I have.

 

Where can I download the geocaching icons that everyone is using for the different cache types in memory map?

 

Thanks,

 

Adrian

You did miss them in this thread, they are in this zip file. No need to apologise, the thread is getting too large to take in now.

Link to comment

Child Waypoints are additional waypoints added to a cache page by the owner which can be found just above the logs. Parking and other information, these are now included in PQ's. Motorway Madness is a series of linked caches by one placer. Motorway Mayhem are caches close to the Motorways which are designed to allow a cacher to break up a journey and grab a few quick caches along the way. Here's a list of Motorway Mayhem caches on the series home page

 

Dave

 

Thanks

Link to comment

How would this script need modifying to show a different icon for additional waypoints, ie anything with | in the type tags or anything not starting with GC?

I now export a filter to a gpx file and then use that gpx file for the MM export script which then includes all the extras but it just shows them as traditional geocaches, this is a bit of a pain when you get 10 extra waypoints and don't know which one is the actual cache.

Any help gratefully recieved.

Link to comment

Just realised that no one has put the Cachemate code here, this links the POI on Memory Map with the entry in Cachemate.

 

Replace:

 

  <xsl:value-of select="gpx:url"/>
  <!-- extra flags: edit y to n if not required -->
  <xsl:text>&decrypt=y&pf=n&log=y</xsl:text>

 

With:

 

	  
  <xsl:text>\cmate:</xsl:text>
  <xsl:value-of select="gpx:name"/>
  <!-- extra flags: edit y to n if not required -->

 

Edited to add

 

You also need to put this line in the Waypoint name in the GSAK GPX Export you do for Cachmate

 

	  %typ1%con1%drop2%notGC%code

Edited by Moote
Link to comment

How would this script need modifying to show a different icon for additional waypoints, ie anything with | in the type tags or anything not starting with GC?

I now export a filter to a gpx file and then use that gpx file for the MM export script which then includes all the extras but it just shows them as traditional geocaches, this is a bit of a pain when you get 10 extra waypoints and don't know which one is the actual cache.

Any help gratefully recieved.

 

http://roolku.pwp.blueyonder.co.uk/GSAK2MM_2b.ZIP is the version of the script I am currently using for that purpose. Maybe it helps you.

Link to comment

How would this script need modifying to show a different icon for additional waypoints, ie anything with | in the type tags or anything not starting with GC?

I now export a filter to a gpx file and then use that gpx file for the MM export script which then includes all the extras but it just shows them as traditional geocaches, this is a bit of a pain when you get 10 extra waypoints and don't know which one is the actual cache.

Any help gratefully recieved.

 

http://roolku.pwp.blueyonder.co.uk/GSAK2MM_2b.ZIP is the version of the script I am currently using for that purpose. Maybe it helps you.

Hi Roolku. Once again thanks for your efforts on this script. Using the one you've posted above I have finally got the CITO caches to display with the correct icon :P .

 

However none of the 'extra' waypoints are being generated in the csv file :rolleyes: , any idea why this should be the case?

 

Edited to add: I think I've found the answer to my own question. It seems as if Babel doesn't output the format as per the script - e.g. "gpx:type='Waypoint|Parking Area'" does not appear in the gpx file generated by Babel. Or am I missing a step somewhere?

Edited by Hi-Tek
Link to comment

Edited to add: I think I've found the answer to my own question. It seems as if Babel doesn't output the format as per the script - e.g. "gpx:type='Waypoint|Parking Area'" does not appear in the gpx file generated by Babel. Or am I missing a step somewhere?

 

I was in a bit of a rush when I posted this... Unfortunately childpoints are not passed on to the script from gsak:

 

http://www.gsak.net/board/index.php?showtopic=1895

 

So the workaround is a two step process of generating a gpx file first and then converting it into the csv file. For reference here are my settings (need to be adapted):

 

http://roolku.pwp.blueyonder.co.uk/step1.jpg

http://roolku.pwp.blueyonder.co.uk/step2.jpg

 

Let's hope Clyde fixes little shortcoming soon.

 

Cheers

Roolku

Link to comment

Edited to add: I think I've found the answer to my own question. It seems as if Babel doesn't output the format as per the script - e.g. "gpx:type='Waypoint|Parking Area'" does not appear in the gpx file generated by Babel. Or am I missing a step somewhere?

 

I was in a bit of a rush when I posted this... Unfortunately childpoints are not passed on to the script from gsak:

 

http://www.gsak.net/board/index.php?showtopic=1895

 

So the workaround is a two step process of generating a gpx file first and then converting it into the csv file. For reference here are my settings (need to be adapted):

 

http://roolku.pwp.blueyonder.co.uk/step1.jpg

http://roolku.pwp.blueyonder.co.uk/step2.jpg

 

Let's hope Clyde fixes little shortcoming soon.

 

Cheers

Roolku

Hi Roolku

 

While playing I came to the same 2 step process conclusion as you have posted. A gpx file generated by GSAK then has to be processed by your xsl script and all is hunky dory - cheers mate. I've gotten a bit 'behind' on the latest implementations of your superb script, glad to see it's an easy fix in the end. :rolleyes:

 

One thing I did notice is that the GC code appeared twice in the mouseover of an icon. For my usage I removed

<xsl:value-of select="gpx:name"/>
<xsl:text> - </xsl:text>

to avoid this.

 

Thanks once again for your (and others) effort with this, it does add another dimension to MM. :P

Link to comment

While playing I came to the same 2 step process conclusion as you have posted. A gpx file generated by GSAK then has to be processed by your xsl script and all is hunky dory - cheers mate. I've gotten a bit 'behind' on the latest implementations of your superb script, glad to see it's an easy fix in the end. :)

 

One thing I did notice is that the GC code appeared twice in the mouseover of an icon. For my usage I removed Code <xsl:value-of select="gpx:name"/>

<xsl:text> - </xsl:text> to avoid this.Code

After further trials please ignore my comment in previous post (shown above with strike thru) - it is incorrect! :)

Link to comment

i've read all the way through this topic but havent seen it mentioned.

In the properties, of the waypoints that I have imported to my PDA from MM, the URL link is to www.geocaching.com/etc. Not much use with no internet connection to pda.

I also have an html export of the cache info pages on the pda.

Is it possible to change the path of the links when exporting to csv so that it contains pointers to the 'caches' folder on the pda ?

Link to comment

i've read all the way through this topic but havent seen it mentioned.

In the properties, of the waypoints that I have imported to my PDA from MM, the URL link is to www.geocaching.com/etc. Not much use with no internet connection to pda.

I also have an html export of the cache info pages on the pda.

Is it possible to change the path of the links when exporting to csv so that it contains pointers to the 'caches' folder on the pda ?

My Idea would be as part of the consolidation of the tread, to provide the extra scripts for various exports, at present I use 3 csv.xsl scripts, each providing a different method of viewing data; Live links, HTML export Cachemate linking.

 

As for linking to HTML try the following

 

Replace this section

<xsl:value-of select="gpx:name"/>
<xsl:text>", "</xsl:text>
<xsl:value-of select="gpx:url"/>
<!-- extra flags: edit y to n if not required -->
<xsl:text>&decrypt=y&pf=n&log=y</xsl:text>

 

with

 


<xsl:value-of select="gpx:name"/>
<xsl:text>", "</xsl:text>
<xsl:text>\Storage Card\Cache\</xsl:text>
<xsl:number/>
<xsl:text>.htm</xsl:text>

 

edited to add, Storage Card might be known as SD Card on some PDAs

Edited by Moote
Link to comment

My Idea would be as part of the consolidation of the tread, to provide the extra scripts for various exports, at present I use 3 csv.xsl scripts, each providing a different method of viewing data; Live links, HTML export Cachemate linking.

 

opinion

so Mr Moote do you have a script that works with cachemate?

Link to comment

opinion

so Mr Moote do you have a script that works with cachemate?

For cachemate :

Replace this section

<xsl:value-of select="gpx:name"/>
<xsl:text>", "</xsl:text>
<xsl:value-of select="gpx:url"/>
<!-- extra flags: edit y to n if not required -->
<xsl:text>&decrypt=y&pf=n&log=y</xsl:text>

with

 

<xsl:value-of select="gpx:name"/>
<xsl:text>", "</xsl:text>
<xsl:text>\cmate:</xsl:text>
<xsl:value-of select="gpx:name"/>

 

then cachemate is launched and the cache page displayed when you tap on the icon in Memory Map.

Link to comment

This is one of those gidgies that you know you want to use but also know with unering confidence that you will fail due to a lack of technical knowledge (edit the script? oh yeah).

Before embarking on the trial and more error approach is there an idiots guide to condense the considerable advice in the thread inot a single step by step to this?

(whilst I think I know the answer coming I live in hope)

Thanks

Link to comment

opinion

so Mr Moote do you have a script that works with cachemate?

For cachemate :

Replace this section

<xsl:value-of select="gpx:name"/>
<xsl:text>", "</xsl:text>
<xsl:value-of select="gpx:url"/>
<!-- extra flags: edit y to n if not required -->
<xsl:text>&decrypt=y&pf=n&log=y</xsl:text>

with

 

<xsl:value-of select="gpx:name"/>
<xsl:text>", "</xsl:text>
<xsl:text>\cmate:</xsl:text>
<xsl:value-of select="gpx:name"/>

 

then cachemate is launched and the cache page displayed when you tap on the icon in Memory Map.

 

my problem is now that the capoint waypoint codes are different to the ones exported by the script - cachemate id GC xml script is ym,tm,mm,tu and such like so the paths don't work

 

any suggestions

Link to comment

The leading slash causes problems with cachemate but is the only way to stop MM from changing the path, there is a modified version of the cachemate exe file that sorts it but it's not the one in the normal release of cachemate, I can email it to anyone that needs it, hopefully the next version will get round it somehow.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...