Skip to main content

Create eye-catching, pinterest-style music posters effortlessly.

Project description

BeatPrints: Quick, stylish posters for your favorite tracks! 🎷☕️

Create eye-catching, Pinterest-style music posters effortlessly. BeatPrints integrates with Spotify and LRClib API to help you design custom posters for your favorite tracks or albums. 🍀

Maintenance GitHub Repo stars Code Formatter Static Badge

examples

📦 Installation

You can install BeatPrints via pip:

pip install BeatPrints

Or, if you use Poetry:

poetry add BeatPrints

🌱 Environment Variables

To get started with BeatPrints, you’ll need a .env file with these keys:

SPOTIFY_CLIENT_ID = "<your-client-id>"
SPOTIFY_CLIENT_SECRET = "<your-client-secret>"

You can get these from the Spotify Developer Dashboard by creating a new app with Web API as the scope.

🚀 Quick Start

Here’s how you can create your first poster:

import os, dotenv
from BeatPrints import lyrics, poster, spotify

dotenv.load_dotenv()

# Spotify credentials
CLIENT_ID = os.getenv("SPOTIFY_CLIENT_ID")
CLIENT_SECRET = os.getenv("SPOTIFY_CLIENT_SECRET")

# Initialize components
ly = lyrics.Lyrics()
ps = poster.Poster("./posters/")
sp = spotify.Spotify(CLIENT_ID, CLIENT_SECRET)

# Search for a song
search = sp.get_track("Juno Clairo", limit=1)

# Get metadata and lyrics
metadata = search[0]
lyrics = ly.get_lyrics(metadata)
highlighted_lyrics = ly.select_lines(lyrics, "5-9")

# Generate a poster
ps.track(metadata, highlighted_lyrics)

[!IMPORTANT]

For Windows Users
If you encounter the following error:

KeyError: 'setting text direction, language or font features is not supported without libraqm'  

You can resolve this by downloading fribidi.dll from here and placing it in your Python directory, such as:

C:\Program Files\Python312\

For macOS Users
If you run into the same issue, fix it by reinstalling Pillow with the correct configuration:

pip uninstall Pillow  
pip install Pillow --global-option="build_ext" --config-settings="-I=/opt/homebrew/Cellar"

🥞 CLI Setup

To get started with the BeatPrints CLI, you'll need to set up a configuration file.

Windows

  1. Create a folder named BeatPrints in the following directory:
C:\Users\<YourUsername>\AppData\Roaming\BeatPrints\
  1. Inside this folder, create a file called config.toml with the following contents:
[general]
search_limit = 7
output_directory = "<path-to-save-your-posters>" 

[credentials]
client_id = "your-client-id"
client_secret = "your-client-secret"

Replace <path-to-save-your-posters> with the path where you'd like to save the generated posters, and fill in the client_id and client_secret with your Spotify credentials.

Linux or macOS

  1. Create a folder named BeatPrints in your ~/.config/ directory:
~/.config/BeatPrints/
  1. Inside this folder, create a file called config.toml with the same contents as mentioned above.

Running the CLI

Once the config file is set up, you can run the BeatPrints CLI:

  1. Open your terminal.
  2. Type beatprints and press Enter.

Your poster will be saved in the output directory you specified in the config.toml file.

🖼️ Examples

Here are a few posters created with BeatPrints:

Track: Saturn by SZA Album: Charm by Clairo
Track Example Album Example

For more examples, check out the examples directory.

✨ Features

  • Polaroid Filter for Covers: Give your track or album covers a vintage Polaroid look.
  • Multi-language Support: Supports English, Hindi, Russian, Japanese, Chinese, and Korean.
  • Custom Cover Images: Personalize posters with your own images.
  • Theme Customization: Switch between Dark and Light themes.
  • Track & Album Selection: Highlight your favorite track or entire album.
  • Lyrics Highlighting: Feature impactful lyrics directly on your poster.

🤝 Contributors

Thank you to all contributors for making BeatPrints better!

💡 Why BeatPrints?

I created this project after finding out that people sell these posters on Etsy at high prices, offering only digital downloads instead of shipping actual posters.

I wanted to make it free for everyone to print themselves, as I believe my posters are simpler, cleaner, and prettier.

❤️ Special Thanks

📜 License

BeatPrints is distributed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License:

  • Use: Free to share and adapt.
  • Attribution: Provide credit and a link to the license.
  • NonCommercial: Not for commercial use.
  • ShareAlike: Adaptations must follow the same license.

Read the full license here.

Made with 💜
elysianmyst, 2024

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

beatprints-1.0.0.tar.gz (51.5 MB view details)

Uploaded Source

Built Distribution

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

beatprints-1.0.0-py3-none-any.whl (51.6 MB view details)

Uploaded Python 3

File details

Details for the file beatprints-1.0.0.tar.gz.

File metadata

  • Download URL: beatprints-1.0.0.tar.gz
  • Upload date:
  • Size: 51.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for beatprints-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f1d4aa8a168b98dfbed410b5ae980a83fcff280f04d065ec220b3287dc3f39f1
MD5 e05a0f5048211dfb24916595eae54e63
BLAKE2b-256 521792d00000ceea5b79d3c697185e386e37cbbf0702d0eb933aaf255a7b312e

See more details on using hashes here.

Provenance

The following attestation bundles were made for beatprints-1.0.0.tar.gz:

Publisher: publish-to-pypi.yml on TrueMyst/BeatPrints

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file beatprints-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: beatprints-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 51.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for beatprints-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c0c91bc8ded1c4687d9e5672076388d46c08d00818248586cdc4386f034cd43f
MD5 cd13bc4e4620eae9c70344d0acfafb9d
BLAKE2b-256 a0d1633f2b81eca4c76363599d5caf3e93be0a5eaadb1435d3a8db0181be67d4

See more details on using hashes here.

Provenance

The following attestation bundles were made for beatprints-1.0.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on TrueMyst/BeatPrints

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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