https://github.com/pgdr/textrain
Generate LaTex document and get pngs for each word
https://github.com/pgdr/textrain
Last synced: 10 months ago
JSON representation
Generate LaTex document and get pngs for each word
- Host: GitHub
- URL: https://github.com/pgdr/textrain
- Owner: pgdr
- License: unlicense
- Created: 2019-03-30T12:46:57.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-31T09:56:53.000Z (about 7 years ago)
- Last Synced: 2025-03-27T21:18:25.888Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# textrain
Get png images for words
The `textrain` module can be run as follows
```bash
textrain word1 word2 ... wordn
```
which generates one png file for each word.
## Install
First, ensure that you have the required tools
* `pdftotext`
* `pdflatex`
* `pdftoppm`
* `pdfcrop`
which on Ubuntu can be obtained by running
`sudo apt install texlive-latex-base texlive-extra-utils poppler-utils`
Then install **textrain** with Pip:
`pip install git+https://github.com/pgdr/textrain`
## Example
Running
```bash
textrain kristian flikka lol
```
generates three images:
* `kristian-1.png`
* `flikka-1.png`
* `lol-1.png`



Generating a pangram:
```
textrain the quick brown fox jumps over the lazy dog
```
To generate all the letters in the alphabet, you might have to do a silly hack.
The command `textrain a b c d e` will unfortunately interpret "abcde" as the
only word, instead of three 1-letter words. This can be circumvented by running
`textrain omg a b c d e ...`