diff --git a/README.md b/README.md index 465e3b9..cf92b2d 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,9 @@ pipx install BeatPrints This will install the CLI, making it ready for you to use. For more more infomation, check out [pipx](https://github.com/pypa/pipx) -## ๐ŸŒฑ Environment Variables +## ๐Ÿš€ Quick Start + +### ๐ŸŒฑ Environment Variables To get started with BeatPrints, youโ€™ll need a `.env` file with these keys: @@ -54,9 +56,7 @@ SPOTIFY_CLIENT_SECRET = "" You can get these from the [Spotify Developer Dashboard](https://developer.spotify.com/dashboard/) by creating a new app with **Web API** as the scope. - -## ๐Ÿš€ Quick Start - +### ๐ŸŽ€ Creating your FIRST Poster Hereโ€™s how you can create your first poster: ```python @@ -74,13 +74,19 @@ ly = lyrics.Lyrics() ps = poster.Poster("./") sp = spotify.Spotify(CLIENT_ID, CLIENT_SECRET) -# Search for a track +# Search for the track and fetch metadata search = sp.get_track("Saturn - SZA", limit=1) -# Get the track's metadata and lyrics +# Pick the first result metadata = search[0] + +# Get lyrics and determine if the track is instrumental lyrics = ly.get_lyrics(metadata) -highlighted_lyrics = ly.select_lines(lyrics, "5-9") + +# Use the placeholder for instrumental tracks; otherwise, select specific lines +highlighted_lyrics = ( + lyrics if ly.check_instrumental(metadata) else ly.select_lines(lyrics, "5-9") +) # Generate the track poster ps.track(metadata, highlighted_lyrics) @@ -94,12 +100,19 @@ https://github.com/user-attachments/assets/3efb7028-c533-4bf4-880b-da3a71f8a3db ## ๐Ÿ–ผ๏ธ Examples -Here are a few posters created with BeatPrints: - | **Track: Saturn by SZA** | **Album: Charm by Clairo** | | -------------------------------------------------------------------- | ---------------------------------------------------------------------- | | ![Track Example](https://i.ibb.co.com/q5v8J9R/saturn-by-sza-1e3.png) | ![Album Example](https://i.ibb.co.com/TcrKKXV/charm-by-clairo-f8a.png) | + +## ๐ŸŽจ Themes +BeatPrints currently offers you **5 additional themes** to use! +- Catppuccin +- Gruvbox +- Nord +- Rosepine +- Everforest + For more examples, check out the [examples directory](https://github.com/TrueMyst/BeatPrints/tree/main/examples). @@ -108,9 +121,9 @@ For more examples, check out the [examples directory](https://github.com/TrueMys - **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. +- **Theme Customization**: Switch between different other themes. - **Track & Album Selection**: Highlight your favorite track or entire album. -- **Lyrics Highlighting**: Feature impactful lyrics directly on your poster. +- **Lyrics Highlighting**: Highlight your favourite lyrics directly on your poster. ## ๐Ÿค Contributors @@ -134,7 +147,7 @@ I wanted to make it free for everyone to print themselves, as I believe my poste ## โค๏ธ Special Thanks - A big thanks to [Spotify Poster Generator](https://github.com/AnveshakR/poster-generator/) by [@AnveshakR](https://github.com/AnveshakR) for inspiring BeatPrints with amazing ideas! -- Shoutout to [@Magniquick](https://github.com/Magniquick), [@Krishna-Gunjan](https://github.com/Krishna-Gunjan), [@itsnotrin](https://github.com/itsnotrin), [@T-Dynamos](https://github.com/T-Dynamos), and [@cherriae](https://github.com/cherriae) for their awesome contributions! +- Shoutout to [@Magniquick](https://github.com/Magniquick), [@itsnotrin](https://github.com/itsnotrin), [@wenbang24](https://github.com/wenbang24) and [@cherriae](https://github.com/cherriae) for their awesome contributions! ## ๐Ÿ“œ License @@ -151,5 +164,5 @@ Read the full license [here](https://github.com/TrueMyst/BeatPrints/blob/main/LI

Made with ๐Ÿ’œ
-elysianmyst, 2024 +elysianmyst, 2025

diff --git a/docs/conf.py b/docs/conf.py index 1fdd0db..c4df96f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -9,9 +9,9 @@ # https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#module-sphinx.ext.autodoc project = "BeatPrints" -copyright = "2024, elysianmyst" +copyright = "2025, elysianmyst" author = "elysianmyst" -release = "v1.1.2" +release = "v1.1.3" # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/docs/guidebook/generate.rst b/docs/guidebook/generate.rst index f0d5a29..00004d5 100644 --- a/docs/guidebook/generate.rst +++ b/docs/guidebook/generate.rst @@ -14,30 +14,36 @@ To generate a track poster, follow the steps below. .. code-block:: python - import os, dotenv - from BeatPrints import lyrics, poster, spotify + import os, dotenv + from BeatPrints import lyrics, poster, spotify - dotenv.load_dotenv() + dotenv.load_dotenv() - # Spotify credentials - CLIENT_ID = os.getenv("SPOTIFY_CLIENT_ID") - CLIENT_SECRET = os.getenv("SPOTIFY_CLIENT_SECRET") + # Spotify credentials + CLIENT_ID = os.getenv("SPOTIFY_CLIENT_ID") + CLIENT_SECRET = os.getenv("SPOTIFY_CLIENT_SECRET") - # Initialize components - ly = lyrics.Lyrics() - ps = poster.Poster("./") - sp = spotify.Spotify(CLIENT_ID, CLIENT_SECRET) + # Initialize components + ly = lyrics.Lyrics() + ps = poster.Poster("./") + sp = spotify.Spotify(CLIENT_ID, CLIENT_SECRET) - # Search for a track - search = sp.get_track("Saturn - SZA", limit=1) + # Search for the track and fetch metadata + search = sp.get_track("Saturn - SZA", limit=1) - # Get the track's metadata and lyrics - metadata = search[0] - lyrics = ly.get_lyrics(metadata) - highlighted_lyrics = ly.select_lines(lyrics, "5-9") + # Pick the first result + metadata = search[0] + + # Get lyrics for the track + lyrics = ly.get_lyrics(metadata) + + # Use the placeholder for instrumental tracks; otherwise, select specific lines + highlighted_lyrics = ( + lyrics if ly.check_instrumental(metadata) else ly.select_lines(lyrics, "5-9") + ) - # Generate the track poster - ps.track(metadata, highlighted_lyrics) + # Generate the track poster + ps.track(metadata, highlighted_lyrics) .. tip:: diff --git a/docs/index.rst b/docs/index.rst index afe35d1..d1df4e7 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,5 +1,5 @@ -Homepage -======== +โ˜•๏ธ BeatPrints +============= .. raw:: html @@ -48,8 +48,12 @@ Or if you prefer using just the CLI: This will install the CLI, making it ready for you to use. For more more infomation, check out `pipx `_ + +๐Ÿš€ Quick Start +-------------- + ๐ŸŒฑ Environment Variables ------------------------- +^^^^^^^^^^^^^^^^^^^^^^^^ To get started with BeatPrints, youโ€™ll need a ``.env`` file with these keys: @@ -61,37 +65,44 @@ keys: You can get these from the `Spotify Developer Dashboard `_ by creating a new app with **Web API** as the scope. -๐Ÿš€ Quick Start --------------- + +๐ŸŽ€ Creating your FIRST Poster +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Hereโ€™s how you can create your first poster: .. code:: python - import os, dotenv - from BeatPrints import lyrics, poster, spotify + import os, dotenv + from BeatPrints import lyrics, poster, spotify + + dotenv.load_dotenv() - dotenv.load_dotenv() + # Spotify credentials + CLIENT_ID = os.getenv("SPOTIFY_CLIENT_ID") + CLIENT_SECRET = os.getenv("SPOTIFY_CLIENT_SECRET") - # Spotify credentials - CLIENT_ID = os.getenv("SPOTIFY_CLIENT_ID") - CLIENT_SECRET = os.getenv("SPOTIFY_CLIENT_SECRET") + # Initialize components + ly = lyrics.Lyrics() + ps = poster.Poster("./") + sp = spotify.Spotify(CLIENT_ID, CLIENT_SECRET) - # Initialize components - ly = lyrics.Lyrics() - ps = poster.Poster("./") - sp = spotify.Spotify(CLIENT_ID, CLIENT_SECRET) + # Search for the track and fetch metadata + search = sp.get_track("Saturn - SZA", limit=1) - # Search for a track - search = sp.get_track("Saturn - SZA", limit=1) + # Pick the first result + metadata = search[0] - # Get the track's metadata and lyrics - metadata = search[0] - lyrics = ly.get_lyrics(metadata) - highlighted_lyrics = ly.select_lines(lyrics, "5-9") + # Get lyrics for the track + lyrics = ly.get_lyrics(metadata) - # Generate the track poster - ps.track(metadata, highlighted_lyrics) + # Use the placeholder for instrumental tracks; otherwise, select specific lines + highlighted_lyrics = ( + lyrics if ly.check_instrumental(metadata) else ly.select_lines(lyrics, "5-9") + ) + + # Generate the track poster + ps.track(metadata, highlighted_lyrics) ๐Ÿฅž CLI ------ @@ -104,8 +115,6 @@ Hereโ€™s a short video showing how to generate posters using the CLI. For more i ๐Ÿ–ผ๏ธ Examples ----------- -Here are a few posters created with BeatPrints: - ======================== ========================== **Track: Saturn by SZA** **Album: Charm by Clairo** ======================== ========================== @@ -115,6 +124,18 @@ Here are a few posters created with BeatPrints: .. |Track Example| image:: https://i.ibb.co.com/q5v8J9R/saturn-by-sza-1e3.png .. |Album Example| image:: https://i.ibb.co.com/TcrKKXV/charm-by-clairo-f8a.png + +๐ŸŽจ Themes +--------- + +BeatPrints currently offers you **5 additional themes** to use! + +- Catppuccin +- Gruvbox +- Nord +- Rosepine +- Everforest + For more examples, check out the `examples directory `_. โœจ Features @@ -125,7 +146,7 @@ For more examples, check out the `examples directory "] license = "CC-BY-NC-4.0"