Skip to content

Latest commit

 

History

History
102 lines (64 loc) · 2.46 KB

File metadata and controls

102 lines (64 loc) · 2.46 KB
title CLI Reference
description Complete reference for the html2rss command-line interface

This page documents the html2rss command-line interface (CLI).

For detailed documentation on the Ruby API, please refer to the official YARD documentation.

📚 View the Ruby API Docs on rubydoc.info

Commands

The html2rss executable is the primary way to interact with the gem from your terminal.

Auto

Automatically discovers items from a page and prints the generated RSS feed to stdout.

# Use the default faraday strategy
html2rss auto https://example.com/articles

# Force browserless for JavaScript-heavy pages
html2rss auto https://example.com/app --strategy browserless

# Set custom request budgets
html2rss auto https://example.com/app --strategy browserless --max-redirects 5 --max-requests 6

# Hint the item selector while keeping auto enhancement
html2rss auto https://example.com/articles --items_selector ".post-card"

Command: html2rss auto URL

Feed

Loads a YAML config, builds the feed, and prints the RSS XML to stdout.

# Single-feed config
html2rss feed single.yml

# Multi-feed config under the `feeds:` key
html2rss feed feeds.yml my-first-feed

# Override the request strategy at runtime
html2rss feed single.yml --strategy browserless

# Override request budgets at runtime
html2rss feed single.yml --max-redirects 5 --max-requests 6

# Pass dynamic parameters into %<param>s placeholders
html2rss feed single.yml --params id:42 foo:bar

Command: html2rss feed YAML_FILE [feed_name]

The CLI keeps strategy as a top-level override and writes runtime request limits into the generated config under request.

Schema

Prints the exported JSON Schema for the current gem version.

# Pretty-printed JSON (default)
html2rss schema

# Compact JSON
html2rss schema --no-pretty

# Write the schema to a file
html2rss schema --write tmp/html2rss-config.schema.json

Command: html2rss schema

Validate

Validates a config with the runtime validator without generating a feed.

# Validate a single-feed file
html2rss validate single.yml

# Validate one feed from a multi-feed file
html2rss validate feeds.yml my-first-feed

Command: html2rss validate YAML_FILE [feed_name]

Help

Displays the help message with available commands and options.

Command: html2rss help

Version

Displays the installed version of html2rss.

Command: html2rss --version