Added new plugins, began writing tutorials

This commit is contained in:
2024-06-26 01:15:43 -04:00
parent df1ed559ef
commit 04fa9034a0
7 changed files with 139 additions and 12 deletions

View File

@@ -0,0 +1,42 @@
# Getting Started
Once you have libWiiPy installed, it's time to write your first code!
As an example, let's say you have a TMD file with a generic name, `title.tmd`, and because of this you need to find out some information about it, so you know what title it belongs to.
First off, let's import `libWiiPy`, and load up our file:
```pycon
>>> import libWiiPy
>>> tmd_file = open("title.tmd", "rb").read()
>>>
```
Then we'll create a new TMD object, and load our file into it:
```pycon
>>> tmd = libWiiPy.title.TMD()
>>> tmd.load(tmd_file)
>>>
```
And ta-da! We now have a new TMD object that can be used to find out whatever we need to know about this TMD.
So, to find out what title this TMD is for, let's try looking at the TMD's `title_id` property, like this:
```pycon
>>> print(tmd.title_id)
0000000100000002
>>>
```
Aha! `0000000100000002`! That means this TMD belongs to the Wii Menu. But what version? Well, we can use the TMD's `title_version` property to check, like so:
```pycon
>>> print(tmd.title_version)
513
>>>
```
513! So now we know that this TMD is from the Wii Menu, and is version 513, which is the version number used for v4.3U.
So now you know how to identify what title and version a TMD file is from! But, realistically, trying to identify a lone unlabeled TMD file is not something you'll ever really need to do, either in your day-to-day life or in whatever program you're developing. In the next chapter, we'll dive in to working with more components of a title, which is a lot more useful for programs that need to manipulate them.
The full documentation on the TMD class can be found here: <project:#libWiiPy.title.tmd>

View File

@@ -0,0 +1,20 @@
# Installation
The first thing you'll want to do to get set up is to install the `libWiiPy` package. This can be done one of two ways.
**For a more stable experience,** you can install the latest release from PyPI just like any other Python package:
```shell
pip install libWiiPy
```
**If you prefer to live on the edge** (or just want to use features currently in development), you can also build the latest version from git:
```shell
pip install git+https://github.com/NinjaCheetah/libWiiPy
```
If you'd like to check the latest release, our PyPI page can be found [here](https://pypi.org/project/libWiiPy/). Release notes and build files for each release can be found over on our [GitHub releases page](https://github.com/NinjaCheetah/libWiiPy/releases/latest).
:::{caution}
libWiiPy is under heavy active development! While we try our hardest to not make breaking changes, things move quickly and that sometimes can cause problems.
:::
For those who are truly brave and want to experiment with the latest features, you can try building from an alternative branch. However, if you're going to do this, please be aware that features on branches other than `main` are likely very incomplete, and potentially completely broken. New features are only merged into `main` once they've been proven to at least work for their intended purpose. This does not guarantee a bug-free experience, but you are significantly less likely to run into show-stopping bugs.