Use this script to assemble one large snapshot of your minecraft dynmap.
- Automatic uploads of snapshot to discord server
- Set new background color with hex code
- Resize the output image
Capture a snapshot from the commandline
-
Download dynmap-snapshotter
-
Run the script
EITHER in interactive mode
python dynmap-snapshotter.py --interactive
OR set required arguments yourself
python dynmap-snapshotter.py --folder plugins/dynmap/web/tiles --world world --map flat
-
Enjoy your snapshot
Find your snapshot in thesnapshots
folder wheredynmap-snapshotter.py
was saved
Use crontab to setup daily snapshots
-
Open the crontab editor
crontab -e
-
Create a new entry
This will create a snapshot of world:flat every day at 00:000 0 * * * python /home/user/dynmap-snapshotter.py --folder /srv/minecraft/plugins/dynmap/web/tiles --world the_nether --map flat
remeber to set your own arguments and flags
Enable posting to discord via a webhook
-
Enable webhook integration in channel settings
-
Copy your webhook url
-
Add arguments when running the script
python dynmap-snapshotter.py ... --discord-webhook-url [webhook url]
you may also set the
--discord-message
argument to provide a custom message
This is the help message for the script
> python dynmap-snapshotter.py --help
usage: dynmap-snapshotter.py [-h] [--folder FOLDER] [--world WORLD] [--map MAP] [--interactive] [--scale SCALE] [--fixed-tile-size FIXED_TILE_SIZE]
[--color-hex COLOR_HEX] [--discord-message DISCORD_MESSAGE] [--discord-webhook-url DISCORD_WEBHOOK_URL]
optional arguments:
-h, --help show this help message and exit
--folder FOLDER specify the absolute path for folder where dynmap tiles are stored. this is usually [server folder]/plugins/dynmap/web/tiles.
--world WORLD world to take snapshot of
--map MAP map to take snapshot of
--interactive helps user decide arguments trough prompts
--scale SCALE resize the snapshot with a decimal point number
--fixed-tile-size FIXED_TILE_SIZE
resize the snapshot with setting a new tile size
--color-hex COLOR_HEX
hex value of color to apply to background.
--discord-message DISCORD_MESSAGE
message to go along with discord post snapshot
--discord-webhook-url DISCORD_WEBHOOK_URL
discord webhook url to post snapshot to.
Thanks to https://github.com/GuyInGrey for helping me understand the dynmap api :)
Project inspired by https://github.com/xtotdam/dynmap-assemble