A proof of concept Node app that fetches top stories from The New York Times API and prints them to a Star TSP143IIIU receipt printer, emulating the iconic NYT typography and layout.
- Fetches the top 5 stories from the NYT API
- Formats stories with NYT-inspired typography
- Prints to a Star TSP143IIIU thermal receipt printer
- Automatically cuts the paper after printing
- Scheduled daily morning prints at 7:00 AM
- Manual print option for on-demand updates
- Node.js (v14 or higher)
- Star TSP143IIIU receipt printer connected via USB
- NYT API credentials
-
Clone this repository:
git clone https://github.com/yourusername/billboi-print.git cd billboi-print -
Install dependencies:
npm install -
Copy the environment variables template and add your NYT API credentials:
cp .env.sample .envThen edit the
.envfile with your NYT API credentials. -
Install printer drivers:
- Download and install the Star TSP100 drivers from the Star Micronics website
- For macOS, you may need to configure the printer in System Preferences
Start the application:
npm start
The application will:
- Print the top stories immediately
- Schedule daily prints at 7:00 AM
- Keep running in the background
You can modify the following settings:
- Number of stories to print (in
src/nytApi.js) - Print schedule (in
index.js) - Typography and layout (in
src/printer.js)
If you encounter issues with the printer connection:
- Check that the printer is powered on and connected
- Verify the printer interface path in
src/printer.js - Ensure printer drivers are installed correctly
Thanks to the following contributors who helped make this project possible:
- @jtraganos: For letting me hack with the receipt printer and nudging me to build this project
- @erikch: For sharing ideas and inspiration about what's possible with Q Developer
- Amazon Q Developer: For all the vibe coding and magic using multiple APIs and hardware drivers
- @chris-trag
MIT
