NotesΒΆ
quoterprovides simple transformations that could be alternatively implemented as a series of small functions. The problem is that such “little functions” tend to be constantly re-implemented, in different ways, and spread through many programs. That need to constantly re-implement such common tasks has led me to re-think how software should construct text on a grander scale.quoteris one facet of a project to systematize higher-level formatting operations. See say and show for other parts of the larger effort.quoteris a test case for, and leading user of, options, a module that supports flexible option handling. In some ways it isoptionsmost extensive test case, in terms of subclassing and dealing with named styles.- In the future, additional quoting styles might appear.
There is already (limited, experimental) support for Markdown,
and other languages such as RST are straightforward. It’s not
hard to subclass
Quoterfor new languages. Some of the things learned in thesayproject about text block management (indentation, wrapping, and such) are highly applicable to the quoting mission. - You might look at some of the modules for ANSI-coloring text such as
ansicolors as being
special cases of the
quoteridea. Whilequoterdoesn’t provide this specific kind of wrapping, it’s in-line with the mission. - Automated multi-version testing managed with the wonderful pytest, pytest-cov, coverage, and tox. Continuous integration testing with Travis-CI. Packaging linting with pyroma.
- Successfully packaged for, and tested against, all late-model versions of Python: 2.6, 2.7, 3.2, 3.3, 3.4, and 3.5 pre-release (3.5.0b3) as well as PyPy 2.6.0 (based on 2.7.9) and PyPy3 2.4.0 (based on 3.2.5).
- The author, Jonathan Eunice or @jeunice on Twitter welcomes your comments and suggestions.