This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """Render the Medium preview hero image for the tables-as-images article. | |
| Uses the same headless-Chrome approach the article documents — because | |
| it would be silly to do otherwise. | |
| """ | |
| import os | |
| import subprocess | |
| import tempfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """Render markdown tables as PNG images via headless Chrome. | |
| Produces article-ready table images so Medium can import them as figures | |
| instead of rendering markdown tables (which Medium strips on import). | |
| """ | |
| import os | |
| import re | |
| import subprocess |