

  {extends file="main.tpl"}
    <!DOCTYPE head PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><head xmlns="http://www.w3.org/1999/xhtml">
  {block name=title}GPSBabel development:Working with predefined options{/block}
  {block name=body}{literal}
                       
  <div xmlns="http://www.w3.org/1999/xhtml" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Working with predefined options</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="Route_And_Track_Modes.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Usage</th><td width="20%" align="right"> <a accesskey="n" href="tracking.html">Next</a></td></tr></table><hr /></div><div xmlns="http://www.w3.org/1999/xhtml" class="sect1"><div class="titlepage"><div><div><h2 class="title" ><a id="inifile"></a>Working with predefined options</h2></div></div></div><p>
      GPSBabel can read a file on startup to set defaults for options. All
      module and filter options may be set this way. 
    </p><p>
      The format of the file is identical to the inifile-format often seen 
	on Windows.  Here is an example:
    </p><table border="0" summary="Simple list" class="simplelist"><tr><td>[Common format settings]</td></tr><tr><td>snupper=Y</td></tr><tr><td>snlen=10</td></tr><tr><td>[gpx]</td></tr><tr><td>gpxver=1.1</td></tr><tr><td>[magellan]</td></tr><tr><td>baud=115200</td></tr><tr><td>[tiger]</td></tr><tr><td>[Garmin categories]</td></tr><tr><td>; any # from 1 to 16</td></tr><tr><td>1=fixed waypoints</td></tr><tr><td>2=temporary waypoints</td></tr></table><p>
      Each section of the file starts with a '[section]' header followed by any
      number of lines formatted option=value. Leading and trailing whitespace
	will be
      automatically removed from header, option and value items. 

      Lines starting 
      with '#' or ';' will be treated as comments and ignored.
    </p><p>
	There are three optional sections.
	</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>Common format settings.</p><p>  Any option from any of the formats listed here will be used by
		GPSBabel unless explicitly provided on the command line.
	</p></li><li class="listitem"><p>Common filter settings.</p><p>As above, but for filters.</p></li><li class="listitem"><p>Garmin categories</p><p>This allows you to give readable names to the numeric categories
	used internally in some Garmin devices and the Mapsource formats
	such as GDB and MPS.  This is information is also used by our GPX 
	and garmin_txt formats as well.</p></li></ul></div><p>
    </p><p>
      By default, GPSBabel tries at startup to load the file named 
	<code class="filename">gpsbabel.ini</code> from the following locations:
    </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>current working directory</p></li><li class="listitem"><p>Windows: all paths "APPDATA", "WINDIR", "SYSTEMROOT" declared in environment.</p></li><li class="listitem"><p>Unix like OS'ses: <code class="filename">${HOME}/.gpsbabel/</code>, <code class="filename">/usr/local/etc/</code> and <code class="filename">/etc/</code></p></li></ul></div><p>
      If the <code class="option">-p</code> option is specified, the above locations are not searched.
      Only the filename specified by that option will be used.
	</p><p>
      There may be situations where predefined values are not useable 
      (i.e. wrapper applications using GPSBabel in the background). 
       The inifile mechanism can be disabled with an empty filename.
    </p><p><strong class="userinput"><code>gpsbabel -p "" -i gpx -f something.gpx -o tiger -F -</code></strong></p></div><div xmlns="http://www.w3.org/1999/xhtml" class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="Route_And_Track_Modes.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="Usage.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="tracking.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Route and Track Modes </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Realtime tracking</td></tr></table></div>
  
      {/literal}{/block}
  