py_asciimath icon indicating copy to clipboard operation
py_asciimath copied to clipboard

Set proper logs

Open sathinduga opened this issue 5 months ago • 0 comments

When you call the translate from MathML2Tex()

from py_asciimath.translator import translator

mathml2tex = MathML2Tex()
parsed = mathml2tex.translate(parsed, network=False, from_file=False)

It's printing the following logs always. If you parse lot of MathML, this is annoying.

INFO:Translating...
WARNING:No XML declaration with 'encoding' attribute set: default encoding to None
WARNING:The XML encoding is None: default to UTF-8
WARNING:No DTD declaration found: set to remote mathml2 DTD
INFO:Loading dtd and validating...

As a python lib, it's better to add suitable logging mechanism and proper log levels.

sathinduga avatar Sep 20 '24 02:09 sathinduga