Search:
Login
Preferences
Help/Guide
About Trac
Register
Forgot your password?
Wiki
Timeline
Changelog
Browse Source
View Tickets
New Ticket
Roadmap
Builds
Sonar
Search
Context Navigation
+0
Start Page
Index
History
Editing Help/Plugin/Scripting
Adjust edit area height:
8
12
16
20
24
28
32
36
40
Edit side-by-side
[[TranslatedPages]] = Plugin -> Scripting = [[TOC(noheading,inline)]] == In a nutshell == The {{{scripting}}} plugins allows you to run scripts within JOSM. Use it to automate small tasks for which no dedicated plugin is available, i.e. * additional quality tests for which no validator test cases are available * automatically entering data in very specific situations (i.e. sequences of house numbers) * importing from a custom file format not supported by JOSM * exporting to a custom file format not supported by JOSM The plugin includes a embedded scripting engine for Javascript based on Mozilla Rhino and a [http://gubaer.github.com/josm-scripting-plugin/content/js-doc/index.html Javascript API] for the JOSM application objects. Alternatively, you can use any scripting language which provides a JSR-223 compatible scripting engine, in particular [http://groovy.codehaus.org/ Groovy], [http://www.jython.org/ Python], or [http://jruby.org/ Ruby]. Please refer to the [http://gubaer.github.com/josm-scripting-plugin/content/index.html plugin documentation] on [https://github.com/gubaer/josm-scripting-plugin GitHub] for more information. == Example scripts in Python == Here are some more examples: [wiki:Help/Plugin/Scripting/Python][[BR]] Various small scripts that are meant to illustrate how to do one thing. [wiki:Help/Plugin/Scripting/Python/SurfaceTypesOfRoutes] (Interesting for cycle routes, both loops and linear ones) Short piece of code, but illustrates some interesting concepts and reports on OSM data. Doesn't make changes to the data [wiki:Help/Plugin/Scripting/Python/RCN_Route_Validator][[BR]] This is not a trivial script anymore. It does a lot in a complicated field (networks of cycle node routes with numbered nodes), makes changes to relations, writes to a file that can be pasted to the wiki. Analyzes routes, but also networks of routes or collections of networks of routes, depending on the selection in JOSM when the script was run. ---- Back to [wiki:/Plugins#JOSMdocu Plugin Help][[BR]] Back to [wiki:/Help Main Help]
Note:
See
WikiFormatting
and
TracWiki
for help on editing wiki content.
Change information
Your email or username:
E-mail address and name can be saved in the
Preferences
Comment about this change (optional):
Note:
See
TracWiki
for help on using the wiki.