Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Created script which can be used to assist in automating dynmap image renders periodically #11

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,28 @@ optional arguments:
'the_end', 'black', 'white'] or use hex form (#6495ed)
-r RESIZE, --resize RESIZE
Size in px to which each tile will be resized
-o OUTPUT, --output OUTPUT
Output file. Default is WORLD-NAME_MAP-TYPE.png
```

#### run-dynmap-assemble ####

When run on windows, will run dynmap-assemble with the parameters specified on the second last line (can be changed).
Creates a directory with the Year, Month, and Date of render, with the filename being the full time of render.

Use this with [https://towardsdatascience.com/automate-your-python-scripts-with-task-scheduler-661d0a40b279](url)
to automate renders of your favorite minecraft world at set times! This can be used to create a montage of your
world over longer periods of time where manually rendering everyday would be a pain.

#### BG Colors cheatsheet ####

- `overworld`
- `nether`
- `the_end` (this one isn't black, just very dark violet)
- `transparent`
- `overworld` (left)
- `nether` (center)
- `the_end` (right: this one isn't black, just very dark violet)
- `black`
- `white`
or any other hex (#6495ed)

![palette](https://user-images.githubusercontent.com/5108025/118475069-78de5e00-b714-11eb-9870-21e939c971e3.png)

Expand Down
15 changes: 15 additions & 0 deletions run-dynmap-assemble.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@echo off
setlocal enabledelayedexpansion
for /F "tokens=2 delims==" %%a in ('wmic os get localdatetime /value') do set "datetime=%%a"
set "dateandtime=!datetime:~0,4!-!datetime:~4,2!-!datetime:~6,2!_!datetime:~8,2!-!datetime:~10,2!"
echo !dateandtime!
set "theyear=!datetime:~0,4!"
set "themonth=!datetime:~4,2!"
set "thedate=!datetime:~6,2!"
@echo on
mkdir DynmapRenders
mkdir DynmapRenders\Year-%theyear%
mkdir DynmapRenders\Year-%theyear%\Month-%themonth%
mkdir DynmapRenders\Year-%theyear%\Month-%themonth%\Date-%thedate%
python3 dynmap-assemble.py --world world --map t --bgcolor transparent --resize 16 --output DynmapRenders\Year-%theyear%\Month-%themonth%\Date-%thedate%\%dateandtime%.png
endlocal