[![ci-badge][]][ci] [![license-badge][]][license] [![docs-badge][]][docs] [![rust badge]][rust link] # iso15924.rs Rust crate for ISO 15924 data, retrieved from unicode.org. Data in the crate is updated every week from [the table] on [unicode.org]. Also provided is a constant with the source URL of the data and parsing functionality to parse it, so that you can request the data yourself for the most up-to-date information. ### What is ISO 15924? > ISO 15924, Codes for the representation of names of scripts, defines two sets > of codes for a number of writing systems (scripts). Each script is given both > a four-letter code and a numeric one. Script is defined as "set of graphic > characters used for the written form of one or more languages". > > -- [Wikipedia](https://en.wikipedia.org/wiki/ISO_15924) ### Installation `iso15924` requires at least Rust 1.34. Add the following dependency to your Cargo.toml: ```toml [dependencies] iso15924 = "0.1" ``` ### Examples Retrieve a slice of all `ScriptCode` definitions: ```rust use iso15924::ScriptCode; fn main() { let scripts = ScriptCode::all(); println!("Amount: {}", scripts.len()); } ``` Retrieve a `ScriptCode` by its number: ```rust use iso15924::ScriptCode; fn main() { let script = ScriptCode::by_num("412"); if let Some(script) = script { println!("Script name: {}", script.name); } } ``` For more examples and information please look in the [docs]. ### License ISC. License info in [LICENSE.md]. [ci-badge]: https://github.com/zeyla/iso15924.rs/workflows/Test/badge.svg [ci]: https://github.com/zeyla/iso15924.rs/actions [docs]: https://docs.rs/iso15924 [docs-badge]: https://img.shields.io/badge/docs-online-5023dd.svg?style=flat-square [license-badge]: https://img.shields.io/badge/license-ISC-blue.svg?style=flat-square [license]: https://opensource.org/licenses/ISC [LICENSE.md]: https://github.com/zeyla/iso15924.rs/blob/master/LICENSE.md [rust badge]: https://img.shields.io/badge/rust-1.34+-93450a.svg?style=flat-square [rust link]: https://blog.rust-lang.org/2019/04/11/Rust-1.34.0.html [the table]: https://unicode.org/iso15924/iso15924-codes.html [unicode.org]: https://unicode.org