Giter Site home page Giter Site logo

dynmapexport's Introduction

DynmapExport

This is a Spigot plugin that can automatically export dynmap tiles at a set interval. It will only export when at least one tile in an export configuration has changed since the last export.

Known issues

  • The in-game to tile coordinate conversion is not 100% correct. Should be fine for top-down maps, but may be noticeable for perspective maps.

Config file

dynmap-host

The hostname/ip and port on which dynmap is set to run. localhost:8123 by default.

auto-combine

Whether to automatically combine the Dynmap tiles into one single image. If you have set a large area and you encounter lag when exporting, you can try disabling this. Note that you will have to combine the tiles yourself.

schedule

A simplified ISO-8601 formatted interval at which to automatically export all configurations.

For example: 10m, 1h30m, 1d

exports

A list of export configurations. Each configuration has the following structure:

  • world: the name of the world
  • map: the name of the map
  • zoom: the zoom-out level, 0 is fully zoomed in.
  • change-threshold: The minimum fraction of pixels to change before the automatic export saves the result.
  • from and to: the in-game coordinates that specify the (inclusive) range of tiles to export.
    • x, y and z: the in-game block coordinates

Command

  • /dynmapexport now: export all configurations immediately, separate from the scheduler.
  • /dynmapexport export <world> <map> <x> <z> <zoom>: export a single tile at the given world coordinates (not tile coordinates), at y-level 64.
  • /dynmapexport reload: reload the plugin and config-file.
  • /dynmapexport worldtomap <world> <map> <x> <y> <z> [zoom]: get the tile coordinates of the given world coordinates.
  • /dynmapexport purge [all]: delete all old exports, or delete everything (also the latest export) if all is given.

dynmapexport's People

Contributors

dantevg avatar

Stargazers

 avatar  avatar

Watchers

 avatar

dynmapexport's Issues

`purge` command to remove all-but-last export

When manually downloading the exports, you can delete them from the server. To keep the change threshold working, you need to leave the last export directory and combined file. A /dynmapexport purge command can do this automatically.

Note: it should probably have some confirmation command to prevent accidentally deleting exports.

Webhook on export

Add the ability to enter a webhook URL, which will be called every time an export is done. This can be used to combine the tiles on another (web)server, and more.

Add command to export files to zip

Command like /dynmapexport zip, which will put all (combined) image files into a zip file and automatically deletes the original files (like /dynmapexport purge).

Use Dynmap's `postupdatecommand` to detect tile changes

According to Dynmap's config file, custom-commands.image-updates.postupdatecommand is a

Command run just after any image file is written or updated: run with single parameter with fully qualified file name

Maybe this can be used to detect when no changes have been made at all.

Possible implementation

  1. Craft a command that appends the filename of the changed tile to some text file, and let the user add it to Dynmap's config.
  2. Whenever DynmapExport starts exporting, read that text file. If none of the tiles correspond with an export, cancel that export.
  3. After exporting, clear the text file.

Per-export change treshold

Feature

The ability to set the change-treshold per export instead of for all exports. This is useful for having different zoom levels for instance.

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.