Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Connum/hanzi-colorize
Browse files Browse the repository at this point in the history
# Conflicts:
#	README.rst
  • Loading branch information
Connum committed May 27, 2020
2 parents 63c0bfd + 17ec805 commit da40c88
Showing 1 changed file with 88 additions and 0 deletions.
88 changes: 88 additions & 0 deletions README.rst.orig
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
==============
HanziColorizer
==============

.. image:: kanji-colorize-examples.png

About
-----

``hanzi_colorize.py`` is a script for coloring, resizing, and renaming
the stroke order diagrams from the
`HanziVG <https://github.com/Connum/hanzivg/>`_ project.
It's basically a clone of `cayennes/kanji-colorize <https://github.com/cayennes/kanji-colorize>`_ written to create
sets that make it possibe to easily add stroke order diagrams to an
`anki <http://ankisrs.net/>`_ kanji deck, but they can be used for
anything you want some nicely colored stroke order diagrams for.

**CAUTION: I have not tested the pure script functionality yet, only the Anki addon integration!
Also, the python tests are currently failing because I haven't adapted them from KanjiVG to HanziVG yet!**

Using with Anki
---------------

There is an addon for Anki2 coming soon.
Meanwhile, read the "Development" section below.

Downloading and Running the Software
------------------------------------

The `hanzi_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 the Anki addon, you can use the
`issue tracker <https://github.com/Connum/hanzi-colorize/issues>`_ .

If you find an error in the stroke order data, please use the
<<<<<<< HEAD
`HanziVG issue tracker <https://github.com/Connum/hanzivg/issues/>`_ .
=======
`HanziVG issue tracker <https://github.com/Connum/hanzivg/issues/`_ .
>>>>>>> 17ec805b5f6708d204ef3f99e01eb7b49eec7b7a

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.

Activate the virtual environment and install requirements:

.. code:: bash

$ python3 -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt

To run the existing tests:

.. code:: bash

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

To create a new release:

.. code :: bash

$ paver dist_anki_addon

Test by unzipping the zip file in `dist` into a new directory in `~/.local/share/Anki2/addons21` (or the equivalent for the OS being tested).

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.

0 comments on commit da40c88

Please sign in to comment.