Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spookey/texted
Convert raw text to beautiful pixel data.
https://github.com/spookey/texted
Last synced: about 1 month ago
JSON representation
Convert raw text to beautiful pixel data.
- Host: GitHub
- URL: https://github.com/spookey/texted
- Owner: spookey
- License: mit
- Created: 2019-11-10T14:50:23.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2024-01-16T18:01:29.000Z (10 months ago)
- Last Synced: 2024-10-09T09:49:10.695Z (about 1 month ago)
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# texted
> Convert raw text to beautiful pixel data.
This script uses PIL to translate text into images.
## Usage
* See ``texted --help`` for all options with default values
* Text can be read from a pipe
```sh
printf "some text" | texted - image.png
```* Image data can be written into a pipe
* When using a pipe, the output format is `PNG`
```sh
texted text.txt - > image.png
```* Fonts can be specified by name or by full path
```sh
texted text.txt image.png --font 'Helvetica'texted text.txt image.png --font /System/Library/Fonts/Helvetica.ttc
```* Colors (``-bg``, ``-fg``) may be passed in various forms
(all lines define a yellow background, some with alpha)```sh
texted text.txt image.png -bg '#ff0'
texted text.txt image.png -bg '#ff0f'
texted text.txt image.png -bg '#ffff00'
texted text.txt image.png -bg '#ffff00ff'
texted text.txt image.png -bg 'rgb(255,255,0)'
texted text.txt image.png -bg 'rgb(100%,100%,0%)'
texted text.txt image.png -bg 'rgba(255,255,0,255)'
texted text.txt image.png -bg 'hsl(60,100%,50%)'
texted text.txt image.png -bg 'hsv(60,100%,100%)'
texted text.txt image.png -bg 'yellow'
```