Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
sugyan committed Jan 18, 2024
1 parent 8a22d49 commit 1316136
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 33 deletions.
1 change: 0 additions & 1 deletion README.md

This file was deleted.

30 changes: 30 additions & 0 deletions README.md
@@ -0,0 +1,30 @@
# shogi-img

[![Rust](https://github.com/sugyan/shogi-img/actions/workflows/rust.yml/badge.svg?branch=main)](https://github.com/sugyan/shogi-img/actions/workflows/rust.yml)

`shogi-img` is a library for generating images that visualize the position in Shogi (Japanese chess).

## Example

![](./images/example.png)

```rust
use shogi_img::pos2img;
use shogi_usi_parser::FromUsi;

fn main() -> Result<(), Box<dyn std::error::Error>> {
let pos = shogi_core::PartialPosition::from_usi(
"sfen 3sks3/9/4S4/9/1+B7/9/9/9/9 b S2rb4g4n4l18p 1",
)?;
pos2img(&pos).save("out.png")?;
Ok(())
}
```

## Image resources

This repository includes images sourced from [Shogi Images](https://sunfish-shogi.github.io/shogi-images), which are distributed under the [CC0 1.0 Universal](https://github.com/sunfish-shogi/shogi-images?tab=CC0-1.0-1-ov-file#readme) license.

## Font resources

This repository includes the [MonaSpace](https://github.com/githubnext/monaspace) font by GitHub, licensed under the [SIL Open Font License 1.1](https://github.com/githubnext/monaspace?tab=OFL-1.1-1-ov-file#readme).
File renamed without changes
9 changes: 7 additions & 2 deletions shogi-img/Cargo.toml
@@ -1,9 +1,14 @@
[package]
name = "shogi-img"
version = "0.1.0"
authors = ["sugyan <sugi1982+github@gmail.com>"]
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
description = "library for generating images that visualize the position in Shogi (Japanese chess)"
documentation = "https://docs.rs/shogi-img"
readme = "../README.md"
repository = "https://github.com/sugyan/shogi-img"
license = "MIT"
keywords = ["shogi"]

[dependencies]
image = { version = "0.24.8", default-features = false, features = ["png"] }
Expand Down
30 changes: 0 additions & 30 deletions shogi-img/README.md

This file was deleted.

0 comments on commit 1316136

Please sign in to comment.