Skip to main content

Build a personalized daily newspaper as a print-ready PDF.

Project description

A printed Morning Paper edition

Morning Paper

Own your algorithm. Your personal newsroom.

An agent composes your newspaper. Code prints it.
Your preferences live in files you own.


Try it

Typeset the bundled sample edition — no config, no network, no keys:

uvx --from "morning-paper[pretty]" morning-paper demo

macOS first: brew install pango gdk-pixbuf (WeasyPrint needs Pango).

Or with pip:

pip install "morning-paper[pretty]"
morning-paper demo

The demo renders a fully synthetic edition through the editorial style pack and tells you exactly where the PDF landed. Print it. That is the product.

The Claude Code plugin

The plugin turns Claude Code into your newsroom staff:

/plugin marketplace add dmthepm/morning-paper
/plugin install morning-paper@morning-paper

Then say "set up my morning paper". The setup skill installs the engine, interviews you about sources and shape, and creates your private newsroom repo — your preferences as files you own, not a feed you rent. The edition skill composes and prints each day's paper.

For Agents (read this first if you are one)

Your human wants a daily printed paper. You can give them one:

  1. Install: pip install "morning-paper[pretty]" then morning-paper doctor. morning-paper demo proves the print path end to end.
  2. If this repo is installed as a Claude Code plugin, run the setup skill — it interviews the reader, creates their private newsroom repo (preferences as files: the owned algorithm), and wires a morning routine. The edition skill composes and renders each day's paper.
  3. The CLI speaks JSON. The verbs you need:
    • morning-paper stage <url> -> stages it for tomorrow and answers with a page estimate ("that adds ~5 pages")
    • morning-paper queue -> what's staged vs the page budget
    • morning-paper estimate <file.md> -> page count, nothing written
    • morning-paper render <file.md> --style <s> --palette <p> -> the PDF
    • morning-paper doctor --json -> machine-readable install status (add --strict to get a nonzero exit when the typewriter renderer is unavailable)
  4. Page estimates need the pretty print stack ([pretty] + WeasyPrint): estimate fails without it, and stage falls back to a rough words-per-page heuristic instead of a real layout pass. Run morning-paper doctor first if the numbers matter.
  5. URL fetching goes through the anonymous Jina Reader tier: no key needed, but rate limits and a 40-second timeout apply. Failures raise clean errors instead of staging garbage.
  6. Composition contract, class vocabulary, and chart directives: docs/composing.md.
  7. Honesty rule: a section with no data says "not configured" — never fabricate.

What it does

  • Builds a daily paper from Hacker News and RSS feeds — JSON, Markdown, HTML, and print-ready PDF artifacts on disk
  • Prints any article on demand with morning-paper print <url>
  • Stages material for tomorrow's edition against a page budget (stage, queue, estimate)
  • Typesets any markdown file through six print style packs with morning-paper render
  • Renders charts from plain-text directives (mp-bars, mp-spark, mp-stats) as inline SVG — stdlib only, no plotting library
  • Works without an LLM key

No database. No Docker. No SaaS requirement. It is not a second-brain platform, a wiki, or a closed recommendation engine — it is a CLI that prints a newspaper.

Your daily paper

pip install "morning-paper[pretty]"
morning-paper init      # starter config
morning-paper doctor    # must say: typewriter ready
morning-paper build     # today's edition

Artifacts land under:

~/.local/share/morning-paper/<date>/

The plain pip install morning-paper fallback works, but it is not the renderer you should judge the product by.

Sources

Source Auth needed? Status
Hacker News No Included
RSS feeds No Included
Article URLs No Included via print / stage

Six styles, two palettes

morning-paper styles lists them all. Every style pairs with either palette: mono (laser printers; weight carries emphasis) or color (inkjet: warm ink, working red, data blue).

Style What it is
editorial The unified paper: serif editorial system, restrained color — the default recommendation
typewriter The newspaper look: Courier Prime, masthead, card sections
flow Continuous operator brief: dense, no forced page breaks
magazine Long-read essay page: serif body, pull quotes, wide margins
ops-card Boxed reference one-pager: scripts, checklists, cheat sheets
zine Pocket how-to guide: half-letter, marker display type, checkbox steps
morning-paper render brief.md --style editorial --palette color

Rendering

Two renderers, one honest contract:

  • typewriter — the product look. Requires the pretty stack ([pretty] + WeasyPrint). Courier Prime ships vendored (SIL OFL), so typesetting is offline-deterministic.
  • portable — explicit pure-Python fallback. Lower fidelity; use it only when you intentionally want the simpler output.

If typewriter cannot render, Morning Paper fails clearly instead of silently generating a lower-quality PDF. morning-paper doctor says plainly which path you are on, and on macOS prints the exact Pango fix when that is the problem.

Article extraction defaults to the anonymous Jina Reader tier (r.jina.ai): no API key, shared rate limits, 40-second timeout. Some domains (YouTube, GitHub, Instagram, LinkedIn, HN comment pages) do not extract meaningfully and are rejected with a clear error. A validation gate rejects shell pages and too-short extractions instead of printing garbage. Extraction is a replaceable backend; the renderer, validation, and image pipeline are designed to survive extractor upgrades.

The honesty doctrine

A section with no data prints "not configured" — never invented headlines, never filler. Page estimates come from a real layout pass when the print stack is installed. Malformed chart data degrades to an honest placeholder. If the good renderer can't run, the build fails loudly rather than quietly shipping something worse. The paper never lies to you about what it knows.

Docs

Platform notes

  • macOS / Linux — recommended. Install morning-paper[pretty]; you may need system libraries for WeasyPrint (brew install pango gdk-pixbuf on macOS, pango/cairo packages on Linux).
  • Windows — the CLI works; the portable fallback is the more reliable path today, and typewriter via WeasyPrint is best-effort.

Run morning-paper doctor after install: renderer: typewriter ready means you are on the real print path.

Development

git clone https://github.com/dmthepm/morning-paper.git
cd morning-paper
pip install -e ".[dev]"
python -m pytest tests/
morning-paper doctor

Community

License

MIT

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

morning_paper-0.4.0.tar.gz (173.4 kB view details)

Uploaded Source

Built Distribution

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

morning_paper-0.4.0-py3-none-any.whl (171.9 kB view details)

Uploaded Python 3

File details

Details for the file morning_paper-0.4.0.tar.gz.

File metadata

  • Download URL: morning_paper-0.4.0.tar.gz
  • Upload date:
  • Size: 173.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for morning_paper-0.4.0.tar.gz
Algorithm Hash digest
SHA256 80ceb44a73b1ced555211633b78a76ae78905f9151a9e31ccf2e4ad8fa7fa898
MD5 456260ca683f8b184b93a25ba0058772
BLAKE2b-256 a4ea543bea917b5be3911acf9f77c0ab95fc0f51b9533a2cd238c00b577735da

See more details on using hashes here.

Provenance

The following attestation bundles were made for morning_paper-0.4.0.tar.gz:

Publisher: publish.yml on dmthepm/morning-paper

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

File details

Details for the file morning_paper-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: morning_paper-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 171.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for morning_paper-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 447d0d3529b3f1761431784d4a470eb2fe3e61bbd045518b7af9ed673ad355be
MD5 e443eaef908013717ad57b711c2e1ca0
BLAKE2b-256 4d60258f5c444e39ad6b57c3033aaefdec516ef7cfab99ebedf774c572a727c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for morning_paper-0.4.0-py3-none-any.whl:

Publisher: publish.yml on dmthepm/morning-paper

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