Skip to main content

Take a poem and make it an Instagram post

Project description

logo


Create Instagram posts from your plaintext poetry in seconds:


logo


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 cat them 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

baudelaire-0.3.0.tar.gz (3.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

baudelaire-0.3.0-py3-none-any.whl (3.2 MB view details)

Uploaded Python 3

File details

Details for the file baudelaire-0.3.0.tar.gz.

File metadata

  • Download URL: baudelaire-0.3.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

Hashes for baudelaire-0.3.0.tar.gz
Algorithm Hash digest
SHA256 e5d1d7c81f673d56104dda7077236091cb0db063b0123700d19026d242ca9cce
MD5 715b2ec6a7412b61518f54830604a120
BLAKE2b-256 03416d0c5b94638dd029b9ef4eaf00a1d8a5f4f22a28a51ec66faf140f3af642

See more details on using hashes here.

File details

Details for the file baudelaire-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: baudelaire-0.3.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

Hashes for baudelaire-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88ba3ccc20e34d8cfc67efe1c53b4035b042824db823c32afd9332d02fbedfd6
MD5 09bd33df875d8861c81525bc0d205a1f
BLAKE2b-256 65544191386363826310737c4f303c1f035b5545fd32aeb165d8be3571c617d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page