dragonmapper
dragonmapper copied to clipboard
HTML Formatting
Using dragonmapper's APIs get HTML output like this (requires styling, included):
Sorry for pushing multiple commits to travis-cl.
@TTWNO This is a neat idea! Thanks for the pull request. I'm at a conference right now, but I'll test/review it as soon as I can. Thanks!
Sound good! Happy to help!
More features have been added. Please wait until I can fully implement them and push.
Tada!
("Tada!" means the code is [basically] done... No rush, just sayin')
(Polite poke)
@TTWNO Looking now :)
Tada!
The keep_punct varibles is set to false when you want to give different data to the to_html() function, in the form of an array.
zi = ["你", "好"] know_ni_not_hao = ["ㄋㄧˇ", ""]
to_html(zi, right=tone_marks, keep_punct=False)
Will put zhuyin only on the first character.
More useful in this case:
zi = ["我", "說", "「", "你", "好", "」"] know_some_chars = ["wǒ", "", "", "nǐ", "hǎo", ""]
to_html(zi, bottom=know_some_chars, keep_punct=False) No pinyin will be under 說
keep_punct is a bad name for the variable though
That's better!
I completely got rid of keep_punct, and now the function just automatically decides what to do with the input.
Would you like to check the code again?
Any other improvments I should make?
Done some nice overhauling, making it much easier to reference with CSS. What's the status on the merge?
(Polite poke 2)