License: BSD PyPI version test Downloads Coverage Documentation Status


degrotesque — A web type setter.


degrotesque beautifies the web.

degrotesque is a Python script. It loads a text/markdown/HTML/XML file from the disc — or several in batch — and for each, it replaces some commonly used non-typographic characters, such as ", ', -, etc. into their typographic representation for improving the pages' appearance.


"Well - that's not what I had expected."

will become:

“Well — that's not what I had expected.”

I think it looks much better.

The starting and ending quotes have been replaced by “ and ”, respectively, the ' by ' and the - by an —. Of course, this script omits HTML-elements. It keeps the complete format as-is, and replaces characters by their proper HTML entity name or the respective unicode character.

It is meant to be a relatively reliable post-processing step for web pages before releasing them. In version 3.0.0 the support of markdown files was added.


degrotesque -i my_page.html -a quotes.german

Replaces single and double quotes within the file “my_page.html” by their typographic German counterparts.

degrotesque -i my_folder -r --no-backup

Applies the default actions to all files in the folder “my_folder” and all subfolders. No backup files are generated. The files format of each file is determined using the file's extension.


I often write my texts and web pages using a plain editor. As such, the character " is always used for quotes, a dash is always a minus, etc.

I wanted to have a tool that automatically recognizes which characters should be replaced by their more typographic counterpart and applies the according rules.

I think it’s a pity that major Desktop Publishing applications do this on the fly but many and even major web sites still show us plain ASCII characters.

degrotesque does the job pretty fine. After writing / building my pages, the tool converts them to a prettier and typographically more correct form. The structure and format of the pages is completely remained. And as said, it works reliable.

If you need any consultations, please let me know. If you know better, too.


degrotesque is licensed under the BSD license.