Skip to content

Commit

Permalink
Add documentation about the project
Browse files Browse the repository at this point in the history
Add Sphinx documentation hosted on Read The Docs
  • Loading branch information
SmylerMC authored Jul 25, 2022
2 parents 283f3f5 + d2b7741 commit 220ca13
Show file tree
Hide file tree
Showing 19 changed files with 1,277 additions and 130 deletions.
11 changes: 11 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2

build:
os: "ubuntu-20.04"
tools:
python: "3.10"

python:
install:
- method: pip
path: .
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Contributing

Please refer to [the documentation](https://litemapy.readthedocs.io/en/latest/contributing.html)
to find instructions on how to setup your development environment, run tests, and build the documentation.

You can also find the actual contribution guidelines there, please read them.
45 changes: 23 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,34 @@
# Litemapy
<div align="center">
<h1>Litemapy</h1>
Litemapy's goal is to provide an easy to use way to read and edit Litematica's schematic file format in python.
[Litematica](https://github.com/maruohon/litematica) is Minecraft mod by maruohon.
<a href="https://github.com/maruohon/litematica">Litematica</a> is Minecraft mod by maruohon.


![PyPI - Python Version](https://img.shields.io/pypi/pyversions/litemapy?style=flat-square)
![PyPI](https://img.shields.io/pypi/v/litemapy?style=flat-square)
![PyPI - Downloads](https://img.shields.io/pypi/dm/litemapy?style=flat-square)
![Commits since latest release](https://img.shields.io/github/commits-since/SmylerMC/litemapy/latest?include_prereleases&style=flat-square)
[![Documentation Status](https://readthedocs.org/projects/litemapy/badge/?version=latest)](https://litemapy.readthedocs.io/en/latest/?badge=latest&style=flat-square)
</div>

## Installation
Litemapy is available on pypi:
```bash
pip install litemapy
```

## Features:
* Read and write .litematic files
* Full support for litematics' regions concept
* Full block storage support
* Full support for basic metadata handling (author, name, description, block count and total volume)
* Partial support for entities
* Partial support for tile entities
* Partial support for pending block updates
* Partial support for preview images

## Documentation
Documentation is available on ReadTheDocs: [litemapy.rtfd.io](https://litemapy.rtfd.io).
## Example
Here is a basic example of creating a schematic, and of reading one:
```python
Expand Down Expand Up @@ -66,23 +86,4 @@ When ran, we get the expected output:
#############
###########
#######
```

## Installation
Litemapy is available on pypi:
```bash
pip install litemapy
```

## Features:
* Read and write .litematic files
* Full support for litematics' regions concept
* Full block storage support
* Full support for basic metadata handling (author, name, description, block count and total volume)
* Partial support for entities
* Partial support for tile entities
* Partial support for pending block updates
* Partial support for preview images

## Documentation
Proper documentation is yet to be written, but the code's docstrings should do a decent job already.
```
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
35 changes: 35 additions & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
Binary file added docs/source/_static/coordinates.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 220ca13

Please sign in to comment.