Code Monkey home page Code Monkey logo

pyfomod's Introduction

pyfomod

PyPi Python Versions Build Status

A high-level fomod library written in Python.

โš ๏ธ Note: This is a mature library with all planned features added and no known bugs - do not be alarmed by the lack of commits.

pyfomod makes it easy to work on fomod installers:

  • Pythonic data struture
  • Easy data extraction and modification
  • No need to deal with complex xml schemas or trial and error changes

pyfomod automatically ignores any schema errors in an installer and corrects them when writing - you can fix most schema errors simply by parsing then writing the installer with pyfomod.

Installation

To install pyfomod, use pip:

pip install pyfomod

Quick Examples

Use an existing installer:

>>> root = pyfomod.parse("path/to/package")

Get the installer metadata::

>>> root.name
'Example Name'
>>> root.author
'Example Author'
>>> root.description
'This is an example of metadata!'
>>> root.version
'1.0.0'
>>> root.website
'https://www.nexusmods.com/example/mods/1337'

Create a new installer:

>>> root = pyfomod.Root()

Save the installer:

>>> pyfomod.write(root, "path/to/package")

Documentation

For more information check out pyfomod's documentation at pyfomod.rtfd.io

Issues

Please use the GitHub issue tracker to submit bugs or request features.

What Is Fomod Anyway?

Fomod is a package format for mod installers. It's game-agnostic, meaning it works on any game. It follows a specific package struture with a mandatory xml file in a subfolder that follows a specific xml schema and an optional xml file that does not. For more information visit the fomod documentation.

Development

pyfomod uses poetry to manage package versions:

path/to/python.exe -m pip install poetry
path/to/python.exe -m poetry install

Ensure that everything is correct before committing:

path/to/python.exe -m poetry run check
path/to/python.exe -m poetry run test

When you're done with a feature/fix, bump the version:

path/to/python.exe -m poetry run bump2version {major|minor|patch}

To finally publish to PYPI:

path/to/python.exe -m poetry publish --build -u $PYPI_USER -p $PYPI_PASS

pyfomod's People

Contributors

gandag avatar lahvuun avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.