Changes between Version 1 and Version 12 of Help/Preferences/ImportExport


Ignore:
Timestamp:
(multiple changes)
Author:
(multiple changes)
Comment:
(multiple changes)

Legend:

Unmodified
Added
Removed
Modified
  • Help/Preferences/ImportExport

    v1 v12  
    11[[TranslatedPages]]
    22= Custom configuration XML files for JOSM =
     3== Samples (See comments in XML) ==
     4* Categorized examples [attachment:scripts.zip:ticket:4421 scripts.zip]
     5* Installing presets and styles: [attachment:seamap.xml:ticket:4421 seamap.xml],
     6 [attachment:seamap_ForOfflineInstallation.zip:ticket:4421 seamap_ForOfflineInstallation.zip]
     7* Imagery layer, plugin and options tuning (only Russian localization for now): [attachment:forestMapping.xml:ticket:4421 forestMapping.xml]
     8
     9=== Preferences addition or replacement commands ===
     10
     11Following code adds one more imagery to the list:
     12{{{#!xml
     13<config>
     14<preferences operation="append">
     15    <!-- Any preferences.xml fragment can be used here -->
     16    <tag key="download.autorun" value="true"/> <!-- example of simple preference modification - download.autorun := true -->
     17    <maps key="imagery.entries">
     18      <map>
     19        <tag key="name" value="ScanEx IRS"/>
     20        <tag key="type" value="scanex"/>
     21        <tag key="url" value="IRS"/>
     22        <tag key="attribution-text" value="IRS"/>
     23        <tag key="attribution-url" value="http://irs.gis-lab.info/"/>
     24      </map>
     25    </maps>
     26</preferences>
     27</config>
     28}}}
     29
     30If '''<preferences operation="replace">''' will be used instead, all other <map> elements will be __deleted__ from '''imagery.entries''' !
     31
     32Another example:
     33{{{#!xml
     34<config>
     35  <preferences operation="replace"> <!-- old content of draw.anglesnap.angles will be deleted -->
     36     <list key="draw.anglesnap.angles">
     37       <entry value="30"/>
     38       <entry value="45"/>
     39       <entry value="60"/>
     40     </list>
     41   </preferences>
     42</config>
     43}}}
     44
     45=== File operations - downloading, deleting, unzipping ===
     46{{{#!xml
     47<config>
     48  <delete path="plugins/tmp"/>
     49  <!-- delete recursively plugins/tmp from preferences directory -->
     50  <!-- base = "prefs" - delete from preferences folder base = "plugins" - delete from plugins folder base = "cache" - delete from cache folder -->
     51 
     52  <delete path="splug" base="plugins"/>
     53  <!-- delete recursively splug folder from preferences directory -->
     54 
     55  <!--<delete path="." base="cache"/> delete cache folder -->
     56
     57  <download url="http://josm.openstreetmap.de/osmsvn/applications/editors/josm/dist/buildings_tools.jar" path="plugins/tmp/bt.jar" mkdir="true" unzip="true"/>
     58  <!-- download file from url and place as "path" if mkdir="true", then all necessary directories will be created if unzip="true", then zip/jar file will be exanded and then deleted -->
     59
     60  <download url="https://wiki.openstreetmap.org/w/images/7/79/Public-images-osm_logo.svg" path="1/logo.svg" mkdir="true" base="cache"/>
     61
     62  <download url="file://localhost/e:/a.zip" path="qqq/a.zip" unzip="true" mkdir="true"/>
     63  <!-- copy from local folder and unzip -->
     64</config>
     65}}}
     66
     67=== Plugin operations: install, disable, delete ===
     68{{{#!xml
     69<config>
     70<!-- install plugins and remove them without deleting plastic_laf.jar -->
     71   <plugin install="buildings_tools;wayselector" remove="plastic_laf"/>
     72   <plugin delete="proj4j"/> <!-- disable plugin and delete jar -->
     73</config>
     74}}}
     75
     76== See also ==
     77* Development discussion: #4421, #18830