Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
n-bernat committed Nov 29, 2023
1 parent e72a139 commit f450407
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 13 deletions.
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
# TODO
# KanjiVG for Flutter & Dart

[![Publisher](https://img.shields.io/pub/publisher/kanjivg.svg)](https://pub.dev/packages/kanjivg/publisher)
[![MIT License](https://img.shields.io/badge/license-MIT-purple.svg)](https://opensource.org/licenses/MIT)

| `kanjivg` | `flutter_kanjivg` |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [![Package](https://img.shields.io/pub/v/kanjivg.svg)](https://pub.dev/packages/kanjivg) | [![Package](https://img.shields.io/pub/v/kanjivg.svg)](https://pub.dev/packages/flutter_kanjivg) |
| [![kanjivg - Checks](https://github.com/n-bernat/kanjivg/actions/workflows/dart_checks.yaml/badge.svg)](https://github.com/n-bernat/kanjivg/actions/workflows/dart_checks.yaml) | [![flutter_kanjivg - Checks](https://github.com/n-bernat/kanjivg/actions/workflows/flutter_checks.yaml/badge.svg)](https://github.com/n-bernat/kanjivg/actions/workflows/flutter_checks.yaml) |
| | |

`kanjivg` and `flutter_kanjivg` provide a simple way of interacting with data from the [KanjiVG (Kanji Vector Graphics) project](https://kanjivg.tagaini.net).

> Those packages are neither supported nor related to the creators of the KanjiVG project.
## Documentation

- [kanjivg](https://github.com/n-bernat/kanjivg/tree/master/kanjivg)

Base parser for SVG files from the KanjiVG project. Provides metadata like stroke count, original radical forms (e.g. 人 for 亻), position of radicals and more.

- [flutter_kanjivg](https://github.com/n-bernat/kanjivg/tree/master/flutter_kanjivg)

Flutter widgets that simplify displaying animated kanji. When using `flutter_kanjivg` there is no need to add `kanjivg` to your dependencies as `flutter_kanjivg` imports it itself.

## Version constraints

- Dart >= 3.1.0
- Flutter >= 3.10.0

## Maintainers

- [Nikodem Bernat](https://nikodembernat.com)
49 changes: 37 additions & 12 deletions kanjivg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,54 @@ and the Flutter guide for
[developing packages and plugins](https://flutter.dev/developing-packages).
-->

TODO: Put a short description of the package here that helps potential users
know whether this package might be useful for them.
# kanjivg

## Features
[![Package](https://img.shields.io/pub/v/kanjivg.svg)](https://pub.dev/packages/kanjivg) [![Publisher](https://img.shields.io/pub/publisher/kanjivg.svg)](https://pub.dev/packages/kanjivg/publisher) [![kanjivg - Checks](https://github.com/n-bernat/kanjivg/actions/workflows/dart_checks.yaml/badge.svg)](https://github.com/n-bernat/kanjivg/actions/workflows/dart_checks.yaml) [![MIT License](https://img.shields.io/badge/license-MIT-purple.svg)](https://opensource.org/licenses/MIT)

TODO: List what your package can do. Maybe include images, gifs, or videos.
`kanjivg` provides a simple way of interacting with data from the [KanjiVG (Kanji Vector Graphics) project](https://kanjivg.tagaini.net). This package is a pure Dart implementation of a parser for SVG files with extensions added by the maintainers of KanjiVG. It provides metadata like stroke count, original radical forms (e.g. 人 for 亻), position of radicals and more.

> This package is neither supported nor related to the creators of the KanjiVG project.
## Getting started

TODO: List prerequisites and provide or point to information on how to
start using the package.
1. Add this package to your dependencies.

```yaml
dependencies:
kanjivg: ^0.0.1
```

2. Get the dependencies.

```sh
dart pub get
```

## Usage

TODO: Include short and useful examples for package users. Add longer examples
to `/example` folder.
The library doesn't include kanji data as there are over 10,000 files and it would be quite wasteful if you want to fetch them at runtime.
You can either:

1. download SVG files from [project's GitHub page](https://github.com/KanjiVG/kanjivg/releases),
2. self-host them and get SVG data from your server.

```dart
const like = 'sample';
import 'package:kanjivg/kanjivg.dart';
void main() {
const source = '<?xml version="1.0" encoding="UTF-8"?> ... </svg>';
const parser = KanjiParser();
// Returns an instance of `KvgData` with `id`, `character`, `radicals` and `strokes`.
final data = parser.parse(source);
}
```

## Additional information

TODO: Tell users more about the package: where to find more information, how to
contribute to the package, how to file issues, what response they can expect
from the package authors, and more.
- This package requires at least Dart 3.1 to work.
- If there are any issues feel free to go to [GitHub Issues](https://github.com/n-bernat/kanjivg/issues) and report a bug.

## Maintainers

- [Nikodem Bernat](https://nikodembernat.com)

0 comments on commit f450407

Please sign in to comment.