roniemartinez / latex2mathml

Pure Python library for LaTeX to MathML conversion
MIT License
183 stars 25 forks source link

Add option to read TeX input from STDIN #327

Closed miakramer closed 2 years ago

miakramer commented 2 years ago

I added a command line option to read the input from STDIN rather than from a file or string, which makes this easier to use as part of some pipelines and to call as a subprocess.

roniemartinez commented 2 years ago

Thanks @miakramer 🚀

Can you also please update the README?

miakramer commented 2 years ago

Oh of course, sure! It looks like the phrasing of the optional arguments in latex2mathml -h has gone from optional arguments: to options:, would you like me to keep it the way it was and add the new options, or update the readme to be consistent with the help output?

roniemartinez commented 2 years ago

Sure! Please do so.

roniemartinez commented 2 years ago

@miakramer one more thing that we forgot. You just need to reformat for the linter to pass. make format should be available in the Makefile

poetry run isort --check-only .
Skipping virtualenv creation, as specified in config file.
ERROR: /home/runner/work/latex2mathml/latex2mathml/latex2mathml/converter.py Imports are incorrectly sorted and/or formatted.
Skipped 1 files
make: *** [Makefile:[22](https://github.com/roniemartinez/latex2mathml/runs/7384455639?check_suite_focus=true#step:8:23): lint] Error 1
miakramer commented 2 years ago

Ah, so that's why there was so much failing CI?

codecov[bot] commented 2 years ago

Codecov Report

Merging #327 (90df95b) into master (5c017c7) will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##            master      #327   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          925       925           
=========================================
  Hits           925       925           
Impacted Files Coverage Δ
latex2mathml/converter.py 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 5c017c7...90df95b. Read the comment docs.