sitemap2urllist

Crates.iositemap2urllist
lib.rssitemap2urllist
version0.1.4
created_at2025-01-01 22:55:10.171603+00
updated_at2025-01-02 18:26:52.421342+00
descriptionRead a sitemap and output a list of URLs.
homepagehttps://github.com/lukehsiao/sitemap2urllist
repositoryhttps://github.com/lukehsiao/sitemap2urllist
max_upload_size
id1501116
size90,600
Luke Hsiao (lukehsiao)

documentation

README

🌐
sitemap2urllist

Read a sitemap and output a list of URLs.

Build Status Version License

sitemap2urllist is a CLI tool for parsing a sitemap and outputting a simple list of URLs, which can easily be piped into other tools (e.g., lychee).

Install

cargo install --locked sitemap2urllist

Usage

Read a sitemap and output a list of URLs.

Usage: sitemap2urllist [OPTIONS] <URL>

Arguments:
  <URL>  The URL to a sitemap

Options:
  -c, --cache                          Use request cache stored on disk at `.sitemapcache` (recommended)
      --max-cache-age <MAX_CACHE_AGE>  Discard all cached requests older than this duration [default: 14d]
  -v, --verbose...                     Increase logging verbosity
  -q, --quiet...                       Decrease logging verbosity
  -h, --help                           Print help (see more with '--help')
  -V, --version                        Print version

Example Usage with Lychee

At some point, it is likely link checkers like lychee obviate the need for this tool by implementing recursive link checking.

In the meantime, it is easy to run a link check from your local machine on an entire website as defined by its sitemap by doing something like the following.

sitemap2urllist https://www.numbersstation.ai/sitemap.xml --cache | xargs lychee --cache

Note you can combine this with lychee's configuration to do things like cache or ignore certain errors, etc.

Related Tools

  • Sitemap-to-Urllist (rust/shell/typescript): Simple sitemap.xml to urllist.txt converter (abandoned)
Commit count: 28

cargo fmt