reformat readme

This commit is contained in:
Christoph J. Scherr 2023-07-20 22:13:25 +02:00
parent 5e1c583913
commit 1f89c8b7bb
1 changed files with 10 additions and 0 deletions

View File

@ -8,15 +8,18 @@ crate, python module or executable.
Let's see if I make it a bloated mess or stop committing after 30 hello worlds. Let's see if I make it a bloated mess or stop committing after 30 hello worlds.
#### But the name `pt` / `libpt` already exists! #### But the name `pt` / `libpt` already exists!
So what? I don't care. Besides, there is not enough names to name everything unique. So what? I don't care. Besides, there is not enough names to name everything unique.
## Dependencies ## Dependencies
- See `cargo.toml` - See `cargo.toml`
- [openssl bindings for rust](https://docs.rs/openssl/latest/openssl/) - [openssl bindings for rust](https://docs.rs/openssl/latest/openssl/)
- [Python](https://www.python.org/) - [Python](https://www.python.org/)
- [`maturin`](https://maturin.rs) - `pip install maturin` - [`maturin`](https://maturin.rs) - `pip install maturin`
## Compiling & Installing from source ## Compiling & Installing from source
If you only want the rust library, you can simply build it with `cargo build`. Add it to your If you only want the rust library, you can simply build it with `cargo build`. Add it to your
project like any other local dependency. project like any other local dependency.
@ -26,16 +29,19 @@ If you want to use the python variant too, you need to compile with maturing.
- Install in system: `maturin build --release && pip install target/wheels/libpt-x.x.x-*` - Install in system: `maturin build --release && pip install target/wheels/libpt-x.x.x-*`
## Installing from [pypi](https://pypi.org) ## Installing from [pypi](https://pypi.org)
`libpt` has been packaged for [pypi.org](https://pypi.org/project/libpt/). `libpt` has been packaged for [pypi.org](https://pypi.org/project/libpt/).
You can install it with `pip install libpt` You can install it with `pip install libpt`
## Installing from [crates.io](https://crates.io) ## Installing from [crates.io](https://crates.io)
`libpt` has been packaged for [crates.io](https://crates.io/crates/libpt). `libpt` has been packaged for [crates.io](https://crates.io/crates/libpt).
You can add the library to your project with `cargo add libpt`. You can add the library to your project with `cargo add libpt`.
## Installing from my personal package registry ## Installing from my personal package registry
`libpt` has been packaged for [git.cscherr.de](https://git.cscherr.de). `libpt` has been packaged for [git.cscherr.de](https://git.cscherr.de).
You can add the registry to your `config.toml` and then `cargo add libpt` You can add the registry to your `config.toml` and then `cargo add libpt`
@ -43,17 +49,20 @@ You can add the registry to your `config.toml` and then `cargo add libpt`
[Package](https://git.cscherr.de/PlexSheep/-/packages/cargo/libpt/) [Package](https://git.cscherr.de/PlexSheep/-/packages/cargo/libpt/)
## Testing ## Testing
Testing needs to be done separately for the rust and python parts: Testing needs to be done separately for the rust and python parts:
- Rust testing with `cargo test` - Rust testing with `cargo test`
- Python testing with `./scripts/pytests.sh` or `python -m unittest discover -fs tests/python` - Python testing with `./scripts/pytests.sh` or `python -m unittest discover -fs tests/python`
## Documentation ## Documentation
The documentation can be automatically generated with `cargo doc --open`. The documentation can be automatically generated with `cargo doc --open`.
An up to date version of the Documentation can be found [here](https://docs.rs/libpt/) An up to date version of the Documentation can be found [here](https://docs.rs/libpt/)
## Mirrored ## Mirrored
The origin of this repository is [git.cscherr.de](https://git.cscherr.de/PlexSheep/pt) The origin of this repository is [git.cscherr.de](https://git.cscherr.de/PlexSheep/pt)
It is mirrored to: It is mirrored to:
@ -61,4 +70,5 @@ It is mirrored to:
## License ## License
##### GPL-3 or newer. ##### GPL-3 or newer.