Skip to content

Refactor to add some useful CLI options - #9

Open
cemulate wants to merge 10 commits into
HDembinski:mainfrom
cemulate:more-options
Open

cemulate wants to merge 10 commits into
HDembinski:mainfrom
cemulate:more-options

Conversation

@cemulate

@cemulate cemulate commented Jul 2, 2023

Copy link
Copy Markdown

Hello! I wanted to modify this program for some of my use cases, and decided it would be easy enough to implement these cases as CLI options. As such, this is a sizeable PR with quite a bit of refactoring; I'm completely open to different naming, etc., if you have opinions.

I've added CLI options:

options:
  -h, --help            show this help message and exit
  -r, --preserve-roman  Do not italicize roman letters (A-Z a-z) in math
  -w, --preserve-math-whitespace
                        Preserve whitespace between math characters
  -p PREAMBLE, --preamble PREAMBLE
                        Override data file from a JSON file with custom commands

The first two are self-explanatory, and the preamble option is an extensible solution for users that wish to change or alter symbols from unicodemathsymbols.txt (or use their own "macros") without relying on the program author to make such a change.

All the existing tests pass, and I've added a few tests for the CLI options as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant