GSAK (Geocaching Swiss Army Knife)
The use of templates enables you to have standard boiler plate text for each log type. These templates can just be literal text, but are more useful if you include dynamic information - which we refer to as %tags.
You can include literal text as well as %tags. %tags represent variable information that will be converted when the log is published (you can also see this conversion by selecting the "preview" tab).
%count - Total cache find number for the user. GSAK uses the api to initially fetch your found count (if you want to override this number use %count=nnn) Each time this tag is used on a found log, this number is incremented by 1
%count=nnn - Similar to %count but allows you to set the total find number (nnn) rather than fetch the count using the api. The %count=nnn should be used on your first find log. From then onwards you can just use %count to have this count incremented by 1 for each find log
%count=last - If you have previously used %count=nnn GSAK saves the final value of %count. Using %count=last enables you to fetch this value rather than having to continually use %count=nnn (and have to remember the value of nnn) each time you publish logs. Fore more information on the intricacies of using this tag option see this link
%runcount - The cache count for this run of publish logs. This differs to %count as it only refers to the number for current session and not the cumulative number of finds for the user.
%runtotal - The total number of finds in this session. You can use this tag in combination with %runcount to indicate something like "This is find number %runcount of %runtotal for the day"
%dnfcount - The total number of dnfs for this session
%suffix - This tag will add the grammatically correct (english only) suffix after any of the other tags that generate a number. For example, if your session contains 3 finds and you use the tags %runtotal%suffix the resulting text will be "3rd" (without the quotes)
%note - The user notes as per the user note only section. See Waypoint=>Add/change/delete notes.
%log - The user log only section of the user notes. See Waypoint=>Add/change/delete notes.
%FieldNotes - The field notes from your "fetch". Note only a fetch from GPSr or file will have field notes. There will be no field notes when you fetch from a filter or current cache.
%OwnerName - The owner name of the cache.
%Caches_xxxx - This tags gives you access to any of the database fields (where xxxx = the required field name) in the main GSAK CachesAll table (which includes the custom table). However, this tag will only be resolved if there is a corresponding entry for the logged cache in the database (it is not mandatory for the cache to exist in the database when logging)
%macro - Use this tag in the text to return text generated by a macro (the value you allocate to $_Special system variable). For more information on the %macro tag see this link. Although the function of this macro is not limited to just returning text as you my also want to perform some other function when actually publishing the log. You could consider this a macro to run *before* the log is published but it is more versatile than just that and it will also be run when you preview the cache. You can have more than one %macro= tag and you can also call different macros if required. Unlike the "Macro to run for each log" You don't have run this macro for all logs - just the ones you include this tag in. To differentiate between publishing the log and doing a preview the boolean system variable $_PublishLogsPreview has been added. This will enable you to take a different action in the macro depending on being run before the log is publish in preview mode or as the log is being published. In case it is not obvious, when publishing logs this tag is resolved *before* the log is published
Where "format" represents a series of characters.
'xx' Characters enclosed in single quotes are displayed as-is, and do not affect formatting.
Format specifiers may be written in upper case as well as in lower case letters--both produce the same result.
d Displays the day as a number without a leading zero (1-31).
dd Displays the day as a number with a leading zero (01-31).
ddd Displays the day as an abbreviation (Sun-Sat) using the strings given by the ShortDayNames system settings.
dddd Displays the day as a full name (Sunday-Saturday) using the strings given by the LongDayNames system settings.
ddddd Displays the date using the format given by the ShortDateFormat system settings.
dddddd Displays the date using the format given by the LongDateFormat system settings.
m Displays the month as a number without a leading zero (1-12). If the m specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.
mm Displays the month as a number with a leading zero (01-12). If the mm specifier immediately follows an h or hh specifier, the minute rather than the month is displayed.
mmm Displays the month as an abbreviation (Jan-Dec) using the strings given by the ShortMonthNames system settings.
mmmm Displays the month as a full name (January-December) using the strings given by the LongMonthNames system settings.
yy Displays the year as a two-digit number (00-99).
yyyy Displays the year as a four-digit number (0000-9999).
/ Displays the date separator character given by the DateSeparator system settings.
Day and Month names (both short and long) will display in the language as per your computer settings.
If your system settings are set to English (American) then if today's date is 16th May, 2011 :
%date[dddd, dd mmmm yyyy] = Monday, 16 May 2011
If your system settings are set to German (Germany) then:
%date[dddd, dd mmmm yyyy] = Montag, 16 Mai 2011
h Displays the hour without a leading zero (0-23).
hh Displays the hour with a leading zero (00-23).
n Displays the minute without a leading zero (0-59).
nn Displays the minute with a leading zero (00-59).
s Displays the second without a leading zero (0-59).
ss Displays the second with a leading zero (00-59).
t Displays the time using the format given by the ShortTimeFormat system settings.
tt Displays the time using the format given by the LongTimeFormat system settings.
am/pm Uses the 12-hour clock for the preceding h or hh specifier, and displays 'am' for any hour before noon, and 'pm' for any hour after noon. The am/pm specifier can use lower, upper, or mixed case, and the result is displayed accordingly.
a/p Uses the 12-hour clock for the preceding h or hh specifier, and displays 'a' for any hour before noon, and 'p' for any hour after noon. The a/p specifier can use lower, upper, or mixed case, and the result is displayed accordingly.
ampm Uses the 12-hour clock for the preceding h or hh specifier, and displays the contents of the TimeAMString global variable for any hour before noon, and the contents of the TimePMString global variable for any hour after noon.
: Displays the time separator character given by the TimeSeparator system settings.
Copyright 2004-2013 CWE Computer Services |