Skip to content

Ship a single-file output mode (stdout / -out -) for piping + scripts #8

@Congregalis

Description

@Congregalis

Why

TransBlog is a CLI, but right now it always writes into ./out/ (or -out path). For quick workflows (e.g. pipe into another tool, preview, diff, or commit), stdout output is a big UX win.

Proposal

  • Support -out - to write translated Markdown to stdout (single URL only).
  • If -view is enabled, either:
    • disallow with -out - (explicit error), or
    • print HTML to stdout and disable writing markdown file.
  • When -out - is used: do not create state/summary files unless explicitly requested.

Acceptance Criteria

  • transblog -out - <url> writes the markdown to stdout
  • Exit codes unchanged
  • Tests cover stdout mode

Notes

This enables easy usage like:

transblog -out - https://example.com/post | glow -

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions