kexplo / fake_keepall

Apply the fake `word-break: keep-all;` CSS property to static HTML file.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fake KeepAll

Apply the fake word-break: keep-all; CSS property to static HTML file.

This is useful when using the HTML->PDF converter that does not support the word-break: keep-all; CSS property.

How it works

Add the white-space: nowrap; CSS property to every word to prevent line breaks.

Installation

$ pip install fake-keepall

Usage

$ fake-keepall example.html example_out.html

Set whitelist tags:

$ fake-keepall example.html example_out.html --tags 'p,li'

Use custom CSS class:

$ fake-keepall example.html example_out.html --class 'myclass'

Screenshot

screenshot

About

Apply the fake `word-break: keep-all;` CSS property to static HTML file.


Languages

Language:Python 100.0%