Take a poem and make it an Instagram post
Project description
Create Instagram posts from your plaintext poetry in seconds:
Installation
pip install baudelaire
Usage
baudelaire "<plaintext-input>" -o "<output-directory>" -c "<config>"
For example:
baudelaire -o "outputs" "$(cat "poem.txt")"
# OR:
baudelaire -o "outputs" -f poem.txt
[!note] The input is expected to be a plaintext poem, so you can write the contents directly in the command line or
catthem from a plaintext file.
The text will be written to the specified output directory as poem_part-*.png files. There is a default configuration file which is distributed as a part of the package.
You can give it a try by using Dylan Thomas' Do not go gentle into that good night:
baudelaire -o "outputs" "$(cat "tests/rage.txt")"
File inputs
Plaintext
All plaintext files are read as-is using the basic f.read() facility in Python. This means that the entire contents of a .txt file will be parsed as a poem.
Markdown
[!warning] Because I personally put my poems in Obsidian and my template involves placing the actual contents of the poem into a markdown codeblock (``` code fences), this tool will parse all code fences and join them using
\n\n.
Configuration
The default config is available in the repository under config/default.yaml. Check out the comments to understand what each configuration option does.
[!note] If you change the font you might need to tweak other parameters like the number of lines per board. It's recommended to create a separate config per template.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file baudelaire-0.4.0.tar.gz.
File metadata
- Download URL: baudelaire-0.4.0.tar.gz
- Upload date:
- Size: 3.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97c68a87b2f754e3cd7c10432e22cc09c2822e114056ad463971a4ce048a712d
|
|
| MD5 |
b7137d7f39a678af050af41487061608
|
|
| BLAKE2b-256 |
ded9a2bef348a00281d910fe5de61724b76d2d232269dab8a99d08f96d4da10b
|
File details
Details for the file baudelaire-0.4.0-py3-none-any.whl.
File metadata
- Download URL: baudelaire-0.4.0-py3-none-any.whl
- Upload date:
- Size: 3.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96ea1a53d8f5b0dd906413cd275485d6672e26a694c8e60b6c9bdaf19dc2e9e7
|
|
| MD5 |
45af1f94e1b5c70daa2410b015adf0d9
|
|
| BLAKE2b-256 |
704ca40ff01ec88f8d31963235ac6c37fc144929e743c8c21a53e6c0a9cd94a9
|