Giter Site home page Giter Site logo

kanji-colorize's Introduction

https://circleci.com/gh/cayennes/kanji-colorize.svg?style=svg

KanjiColorizer

kanji-colorize-examples.png

About

kanji_colorize.py is a script for coloring, resizing, and renaming the stroke order diagrams from the KanjiVG project. I wrote it to create sets that make it possibe to easily add stroke order diagrams to an anki kanji deck, but they can be used for anything you want some nicely colored stroke order diagrams for.

If you'd prefer not to bother running a python script, there are some sets of stroke order diagrams generated with it available for download.

Getting diagrams

If you just want some colorted diagrams, you can get them on the github releases page.

I've packaged up a spectrum set and a contrast set. The spectrum set colors the strokes in rainbow order and is nice because the you can see at a glance how the kanji is put together, but has the disadvantage that stokes next to each other are similar colors, and color is sometimes necessary to tell which number goes with which stroke. The contrast set maximizes the contrast between any set of consecutive strokes. (This uses the golden ratio. Math is nifty.)

Using with Anki

There is an addon for Anki2 that generates colored diagrams for all of your kanji cards. You can install it with code 1964372878.

Downloading and Running the Software

The kanji_colorize.py script makes it possible to generate diagrams to your own specifications. It may have issues with a python not built with wide-character support

Feedback

If there's anything you think would improve these, you can use the issue tracker or email me at [email protected].

If you find any errors in image files generated by the most recent version of kanji colorizer, check to see whether they have been fixed in the KanjiVG data by looking at their online kanji viewer. If it is correct there, it means that I didn't notice that there was an update; let me know and I'll fix it. If the error exists there, let the KanjiVG project know using their issue tracker.

Development

Have you created an improvement to KanjiColorizer that you think other people would also like to have? If so, please submit a patch or a pull request! I'm not always very prompt but I do get to them eventually.

Please make sure existing tests pass. Even better, add new tests for anything you add. Either doctest or unittest is fine, though ideally the doctests would contain executable examples that fully illustrate the function and the unittest tests would contain further worthwhile checks.

To run the existing tests:

$ python -m kanjicolorizer.colorizer
$ python -m unittest discover

License

The code is available under the Affero GPL version 3 or later and the SVG images are available under Creative Commons Attribution-Share Alike 3.0. See file headers and files in licenses/ for more information.

kanji-colorize's People

Contributors

cayennes avatar ospalh avatar 0xazure avatar shufps avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.