Home

Awesome

mapfile_parser

PyPI - Downloads GitHub License GitHub release (latest SemVer) PyPI crate.io GitHub contributors

Map file parser library focusing decompilation projects.

This library is available for Python3 and Rust

Features

Installing

Python version

See this package at https://pypi.org/project/mapfile_parser/.

The recommended way to install is using from the PyPi release, via pip:

python3 -m pip install -U mapfile_parser

If you use a requirements.txt file in your repository, then you can add this library with the following line:

mapfile_parser>=2.7.1,<3.0.0

Development version

The unstable development version is located at the develop branch. PRs should be made into that branch instead of the main one.

The recommended way to install a locally cloned repo is by passing the -e (editable) flag to pip.

python3 -m pip install -e .

In case you want to mess with the latest development version without wanting to clone the repository, then you could use the following command:

python3 -m pip uninstall mapfile_parser
python3 -m pip install git+https://github.com/Decompollaborate/mapfile_parser.git@develop

NOTE: Installing the development version is not recommended unless you know what you are doing. Proceed at your own risk.

Rust version

See this crate at https://crates.io/crates/mapfile_parser.

To add this library to your project using Cargo:

cargo add mapfile_parser

Or add the following line manually to your Cargo.toml file:

mapfile_parser = "2.7.1"

Versioning and changelog

This library follows Semantic Versioning. We try to always keep backwards compatibility, so no breaking changes should happen until a major release (i.e. jumping from 2.X.X to 3.0.0).

To see what changed on each release check either the CHANGELOG.md file or check the releases page on Github. You can also use this link to check the latest release.

Examples

Various cli examples are provided in the frontends folder. Most of them are re-implementations of already existing tools using this library to show how to use this library and inspire new ideas.

The list can be checked in runtime with python3 -m mapfile_parser --help.

Each one of them can be executed with python3 -m mapfile_parser utilityname, for example python3 -m mapfile_parser pj64_syms.

None of the provided cli utilities are meant to be used directly on a command line, because they need a large number of long parameters to them and every repo has their own quirks which would need them to be adapted. Those have been written mostly to facilitate people to write those utilities in a way which accomodates their own repo.