UNPKG

beatprints.js

Version:

A Node.js version of the original Python BeatPrints project (https://github.com/TrueMyst/BeatPrints/) by TrueMyst. Create eye-catching, Pinterest-style music posters effortlessly. BeatPrints integrates with Spotify and LRClib API to help you design custom

40 lines (39 loc) 1.09 kB
import type { TrackMetadata, AlbumMetadata } from './spotify.js'; import { ThemesSelector } from './constants.js'; /** * A class for generating and saving posters containing track or album information. */ export declare class Poster { private options; constructor(options: { filename?: string; output: OutputMode; }); private _handleOutput; /** * Adds text like title, artist, and label info. */ private _drawTemplate; track(metadata: TrackMetadata, lyrics: string, options?: PosterTrackOptions): Promise<Buffer>; album(metadata: AlbumMetadata, options?: PosterAlbumOptions): Promise<Buffer>; private BFT; } export type OutputMode = { type: 'buffer'; } | { type: 'path'; value: string; }; export type PosterTrackOptions = { accent?: boolean; palette?: boolean; theme?: ThemesSelector.Options; pcover?: Buffer | string; }; export type PosterAlbumOptions = { indexing?: boolean; accent?: boolean; palette?: boolean; theme?: ThemesSelector.Options; pcover?: Buffer | string; };