How brick-24/paper-feed works
Paper-feed is a command-line personal thermal newspaper: a user selects briefing sections or custom content, main.py dispatches each action, and the selected feature formats results through a printer. The default feed combines date, current weather, market summary, quote, and weekly forecast; optional branches cover stocks, XKCD, news, text, images, and stock charts. Source excerpts show weather and forecast providers, Yahoo Finance use, RSS fetching, and printer output. Quote/date and some input-module internals are represented only from the tree and README, so their internal data flow is not expanded.
Main entry points: main.py Action dispatcher · printer.py Printer adapter · markets.py Market summary · stock_performance.py Market performance table
Components 25
CLI dispatch
- Action dispatcher
main.py - Defaults and tickers
config.py
Briefing content
- Current weather
function/weather.py - Weekly forecast
function/forecast.py - Inspirational quote
function/quote.py - Date section
function/daydate.py - XKCD comic
function/comic.py - RSS headlines
function/news.py - Custom text
function/text_inp.py - Local image
function/image_inp.py
Market data
- Market summary
function/markets.py - Stock lookup
function/stock.py - Stock chart
function/draw_graph.py - Market performance table
function/stock_performance.py
Printer output
- Printer adapter
printer.py
Other components
- CLI user
- USB ESC/POS printer
- Terminal output
- wttr.in
- Open-Meteo
- Yahoo Finance
- RSS feed
- XKCD service
- Local image file
- Generated chart file
Connections 40
- CLI user → Action dispatcher: selects action
- Action dispatcher → Defaults and tickers: reads defaults
- Action dispatcher → Printer adapter: creates printer
- Action dispatcher → Current weather: dispatches
- Action dispatcher → Weekly forecast: dispatches
- Action dispatcher → Inspirational quote: dispatches
- Action dispatcher → Date section: dispatches
- Action dispatcher → XKCD comic: dispatches
- Action dispatcher → RSS headlines: dispatches
- Action dispatcher → Custom text: dispatches
- Action dispatcher → Local image: dispatches
- Action dispatcher → Market summary: dispatches
- Action dispatcher → Stock lookup: dispatches
- Action dispatcher → Stock chart: dispatches
- Action dispatcher → Market performance table: dispatches
- Current weather → wttr.in: requests weather
- Weekly forecast → Open-Meteo: geocodes and forecasts
- Market summary → Defaults and tickers: reads tickers
- Market summary → Yahoo Finance: requests prices
- Stock lookup → Yahoo Finance: requests prices
- Market performance table → Defaults and tickers: reads tickers
- Market performance table → Yahoo Finance: requests prices
- Stock chart → Yahoo Finance: requests history
- Stock chart → Generated chart file: writes chart
- RSS headlines → RSS feed: parses feed
- XKCD comic → XKCD service: fetches comic
- Local image → Local image file: reads image
- Current weather → Printer adapter: formats output
- Weekly forecast → Printer adapter: formats output
- Inspirational quote → Printer adapter: formats output
- Date section → Printer adapter: formats output
- XKCD comic → Printer adapter: prints text and image
- RSS headlines → Printer adapter: prints headlines
- Custom text → Printer adapter: prints text
- Local image → Printer adapter: prints image
- Market summary → Printer adapter: prints summary
- Stock lookup → Printer adapter: prints details
- Market performance table → Printer adapter: prints table
- Printer adapter → USB ESC/POS printer: sends print data
- Printer adapter → Terminal output: writes test output