GithubHelp home page GithubHelp logo

floscher / josm-scripting-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gubaer/josm-scripting-plugin

0.0 2.0 0.0 11.46 MB

Scripting Plugin for JOSM

License: GNU General Public License v3.0

JavaScript 48.97% Shell 0.11% Groovy 4.71% Python 1.84% Java 44.37%

josm-scripting-plugin's Introduction

JOSM Scripting Plugin

The JOSM scripting plugin executes scripts in the Open Street Map editor JOSM.

Scripts can be defined in any scripting language for which a JSR-223 compatible script engine is available, in particular in

For JOSM users

The scripting plugin can be installed and kept up to date using JOSMs plugin manager:

  1. Select Preferences -> Plugins
  2. Search for the plugin "Scripting" and install it

For developers

The scripting plugin includes an embedded scripting engine for JavaScript based on Mozilla Rhino. It provides a custom JavaScript API to write scripts for the JOSM editor,refer to the API documentation.

Furthermore, it can

If you want to contribute to the scripting plugin itself, please fork this repository and submit your pull requests.

How to build

Add a new entry to releases.conf then run:

% git checkout deploy          # switch to deploy branch
% git merge master             # make sure the latest changes are merged to 'deploy'
% git push origin deploy       # push the 'deploy' branch

% ./gradlew clean build        # build the plugin
% ./gradlew deploy             # deploys the plugin jar to github,
                               # where it is picked up by the JOSM
                               # plugin installer

How to test

There are two suites of unit tests

  1. a suite of unit tests implemented in java and groovy which can be executed with a JUnit 4 test runner

    How to run:

    $ ./gradlew test
  2. a suite of unit tests implemented in JavaScript which provide test cases for the JavaScript API.

    How to run:

    • Add the path $JOSM_SCRIPTING_PLUGIN_ROOT/test/script-api to the list of module repositories
      • launch JOSM
      • Scripting -> Configure ...
      • Select Tab 'Embedded Rhino Engine'
      • Add the module repository for unit tests
    • Launch JOSM, open the scripting console and enter
      require("suite").run();
    • Click on Run. Results are logged to the console.

Build status

Build Status

Credits

The JOSM scripting plugin uses:

  • jsyntaxpane by Ayman Al-Sairafi
  • Rhino scripting engine by Mozilla Foundation

License

Published under GPL Version 3 and higher. See included LICENSE file.

josm-scripting-plugin's People

Contributors

alex85k avatar bagage avatar don-vip avatar floscher avatar gubaer avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.