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.2.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.2.0-py3-none-any.whl (3.2 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: baudelaire-0.2.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.2.0.tar.gz
Algorithm Hash digest
SHA256 cf592c01fe2e3fe490657a85bc568a291a8e542e6b8460bd400863c7eb4812bc
MD5 7bd9f026acbc8a7aaafd8ea224a5ad64
BLAKE2b-256 2e1456e3ae8841be7f014d0864c09622553d54df0284a771a64607efa16f5e01

See more details on using hashes here.

File details

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

File metadata

  • Download URL: baudelaire-0.2.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68c809f2f7d8a69334e6440177d4b43dd4de57130c7f7141128e5dfb4c5d03bf
MD5 d8e387d9f75141565875c723df2df87d
BLAKE2b-256 fa5c06aa8943ef27453293f1a7145a4cb6beecc6c3ffcc3de112f34d7504b870

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