hugolpz/animCJK

Move toward 214 radicals upload to Commons

hugolpz opened this issue ยท 4 comments

  • Dragons Bot capable of uploading files : done !
  • ImageFactory revamp > Add proper name for download
  • ImageFactory revamp > Add auto-download when img:data ready
  • ImageFactory revamp > Add for loop (which works)
  • Improve wiki templates to clarify license (of raster images!)
  • Improve js, images styles : gif animation starting with all stroke black
  • [optional] Improve js, images styles : reverse -red.png stroke order, so successive changes are visible (as for others images)
  • [optional] And numbered stroke order (demo)
  • Get official bot approval and status on Commons.
  • Upload !

Live : https://hugolpz.github.io/animCJK/

Note: Given 2018 I can propose to you that I first successfully upload a batch on Commons before to request more developments from you.

Wishlist

@parsimonhi, i can confirm 2 wishlist/idea for now :

  1. Gif animation initial state should be with all stroke black. So the static preview on many system shows the character distinctly, as black on white background.
  2. Add numbered style demo. I am interested by this design as well. It could be reused in printed books or others. Change bullet's bakcground opacity to 60%.

Screenshot_2021-04-05_14-16-59

Low priority

One more is really just a though and maybe not a fruitful idea...

  1. On Gif animations, add a temporary 1px solid #999 outline around the stroke being painted. Maybe 0.6sec or 1sec and fading. But this would be really experimental and has low chances to be kept at the end.

Staled

  1. I'm still considering a 4rd tinkering, on red images, because the Commons stroke order projet has for usage to show recent changes rather that new strokes, to reverse stroke order. (We already discussed this issue a while back). But i need to do more tests, and get more used to your way before making a call.

Script

  1. On my side i have to improve a generative loop, which will generate and download png versions on the fly, with the right name for Commons project.

Hant sources

  1. I may need some guidance or doc on how to create Hant svg for AnimeCJK. I may edit files via inkscape but it's notorious for messing up xml codes. Do you use another process, doc to follow ?

Timeline

I do not have timeline on this project. It's a open source plan so i will return to it periodically. ๐Ÿ‘๐Ÿป Main point is to enjoy it ๐Ÿ˜„ My typical periodicity is one solid push every 6 months, i am just finishing one right now, so it may be in coming week or at next sprint. ๐Ÿง๐Ÿปโ€โ™‚๏ธ๐Ÿง

Hello,

  1. I think the animated gif is a "has been" format :-)

  2. gif: look in sample/_js/magicAcjk.js for generateAnimatedGifFromSvg(), the main function.

It is not very difficult to modify this function to change the initial color of the strokes, as well as other colors.

  1. bullet : I'm not sure I understand what you mean by "Change the background opacity of the ball to 60%.". This can probably be done in the sample / number.php script on line # 91 (replace #fff with something like # fff7). But the result is weird.

Screenshot_2021-04-05_14-16-59

  1. "add a temporary solid 1px # 999": why not! For my part, I prefer to keep it simple because people have so many different goals that it's hard to do whatever they want :-).

  2. Red: See sample/_js/magicAcjk.js then generateRedPngFromSvg(). For red strokes, it is not difficult to change the end result.

  3. I can't help you on this point because it depends on what you want to do. But it's not that hard (I made something for my own use, but it's not clean enough to publish).

  4. Creating Hant svgs is very (very) hard work. It will take years. And there is also the problem of which Hant you want to choose: Hong Kong, Taiwan and Mainland China (traditional characters are also used in Mainland China for different purposes) are not the same. For my part, I chose the Taiwanese writing.

Basically, the process is as follows:

  • a) find a reference (I am using https://stroke-order.learningweb.moe.edu.tw/characters.do?lang=en) and evenly some other references,
  • b) find a similar character in animCJK or makeMeAhanzi, or find several characters that have certain components of the character you want to create (note that using the japanese characters Anim
    CJK as a starting point is useful in many cases),
  • c) make modifications using Inkscape and/or a text editor when there is only the order of the strokes to change or different components to assemble,
  • d) clean up the svg produced by inkscape using a text editor and some reg-ex to get an AnimACJK type svg.

Note that I plan to do this job too (i already did it for hsk1 characters), but I don't have time to work on it right now.

1 (gif), 4. (reds) : Thank your for those pointing, it's what I needed !

@parsimonhi :

  • reds : adaptation done, was easy.
  • gif : adaptation done. A bit more tricky.
  • loop: done (nasty but working).
  • Last, for the static and numbered, do you have a JS function creating those to point me to or it's only php ?

I exported raster files for red, order.gif, bw.png and tested one bot upload on Commons.

Notes:

  • My fork has a shorter structure so i edit files in ./js/ folder.
  • PRC's Hanban recently pre-bublished HSK 3.0 (2021). See link there.

For numbering, take a look at sample/number.php. In this script, there is a javascript function called setNumber() that adds numbers. It is probably not very difficult to call this function (or part of it) when generating the gif images.