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 !
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 :
- 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.
- 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%.
Low priority
One more is really just a though and maybe not a fruitful idea...
- 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
- 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
- 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
- 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,
-
I think the animated gif is a "has been" format :-)
-
gif: look in
sample/_js/magicAcjk.js
forgenerateAnimatedGifFromSvg()
, 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.
- 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.
-
"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 :-).
-
Red: See
sample/_js/magicAcjk.js
thengenerateRedPngFromSvg()
. For red strokes, it is not difficult to change the end result. -
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).
-
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 !
- 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.