Skip to content

A command-line utility and Python library to convert Minecraft in-game maps to image files.

License

Notifications You must be signed in to change notification settings

joodicator/mcmapimg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcmapimg

A command-line utility, web application, and Python library to convert Minecraft in-game maps to image files.

Contents

  1. Dependencies
  2. Installation
  3. Usage

Dependencies

Required

Optional

  • A CGI-capable web server (to run the web interface)
  • Git (to install from GitHub)

Installation

  1. Clone this repository into an empty directory:

    git clone https://github.com/joodicator/mcmapimg.git
    cd mcmapimg
    

Usage

There are four ways to use this tool:

  1. Run mcmapimg.py as a command-line program. See the output of:

    ./mcmapimg.py --help
    
  2. Using the web interface: make accessible by a web server index.htm and cgi-bin/map.cgi - the latter of which is an executable Python script and should be run as a CGI program by the web server - for example, run python's built-in http server:

    python -m http.server --cgi 8000
    

    Then visit http://localhost:8000 in your browser and follow the instructions there.

  3. As a library directly from Python:

    python
    >>> import mcmapimg
    >>> help(mcmapimg)
    
  4. In a docker container. First build the image:

    docker build -t mcmapimg .
    

    Then run the container:

    docker run -it --rm -p 8000:8000 mcmapimg
    

    Finally access the webpage:

    http://localhost:8000
    

    The docker image also supports running from the command line:

    cd directory/with/map_dat_files/
    
    docker run -it --rm -v "$PWD":/usr/src/app/maps \
        mcmapimg ./mcmapimg.py maps/[in_map_file.dat] maps/[out_img_file.png]
    

About

A command-line utility and Python library to convert Minecraft in-game maps to image files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published