Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'maintenance/prepare-release'
- Loading branch information
Showing
3 changed files
with
37 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
[package] | ||
name = "lf2_codec" | ||
version = "0.1.0" | ||
version = "0.2.0" | ||
authors = ["Azriel Hoh <azriel91@gmail.com>"] | ||
description = "Encodes and decodes Little Fighter 2 (LF2) data files" | ||
documentation = "https://docs.rs/lf2_codec" | ||
edition = "2018" | ||
homepage = "https://github.com/azriel91/lf2_codec" | ||
keywords = ["lf2"] | ||
license = "MIT OR Apache-2.0" | ||
license = "Zlib" | ||
maintenance = { status = "passively-maintained" } | ||
readme = "README.md" | ||
repository = "https://github.com/azriel91/lf2_codec" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Copyright (c) 2020 Azriel Hoh. | ||
|
||
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. | ||
|
||
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: | ||
|
||
1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. | ||
|
||
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. | ||
|
||
3. This notice may not be removed or altered from any source distribution. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,44 @@ | ||
[![docs](https://docs.rs/lf2_codec/badge.svg)](https://docs.rs/lf2_codec) | ||
[![crates.io](https://img.shields.io/crates/v/lf2_codec.svg)](https://crates.io/crates/lf2_codec) | ||
|
||
# LF2 Codec | ||
|
||
Encodes and decodes Little Fighter 2 (LF2) data files. | ||
|
||
## Usage | ||
|
||
LF2 codec can be used as an application or a library. | ||
|
||
### Application | ||
|
||
```sh | ||
# Installation | ||
cargo install lf2_codec | ||
|
||
# Running | ||
lf2_codec decode character.dat > character.txt | ||
lf2_codec encode character.txt > character.dat | ||
``` | ||
|
||
### Library | ||
|
||
```rust | ||
use lf2_codec::DataDecoder; | ||
|
||
let character_dat_reader = BufReader::new(File::open("character.dat")?); | ||
let decoded_bytes = DataDecoder::decode_path("character.dat")?; | ||
// or | ||
// let character_dat_reader = BufReader::new(File::open("character.dat")?); | ||
// let decoded_bytes = DataDecoder::decode(character_dat_reader)?; | ||
|
||
let decoded_bytes = DataDecoder::decode(character_dat_reader)?; | ||
let decoded = String::from_utf8(decoded_bytes)?; | ||
|
||
println!("{}", decoded); | ||
``` | ||
|
||
### Binary | ||
## License | ||
|
||
``` | ||
cargo run --release -- character.dat > character.txt | ||
``` | ||
Licensed the [Zlib license](LICENSE-Zlib.md). | ||
|
||
## Development | ||
### Contribution | ||
|
||
```bash | ||
git clone git@github.com:azriel91/lf2_codec.git | ||
git switch -c feature/nnn/short-description # e.g. feature/123/implement-something | ||
|
||
# open a PR | ||
``` | ||
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be licensed as above, without any additional terms or conditions. |