https://github.com/rowno/sitemap-urls
Extract URLs from an XML sitemap
https://github.com/rowno/sitemap-urls
command-line command-line-tool javascript nodejs sitemap xml-parser xml-sitemap
Last synced: 7 days ago
JSON representation
Extract URLs from an XML sitemap
- Host: GitHub
- URL: https://github.com/rowno/sitemap-urls
- Owner: Rowno
- License: mit
- Created: 2015-01-24T10:21:15.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-02-13T21:04:22.000Z (about 3 years ago)
- Last Synced: 2024-11-01T15:06:12.376Z (6 months ago)
- Topics: command-line, command-line-tool, javascript, nodejs, sitemap, xml-parser, xml-sitemap
- Language: JavaScript
- Size: 1.79 MB
- Stars: 21
- Watchers: 3
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sitemap Urls
[](https://travis-ci.org/Rowno/sitemap-urls)
[](https://david-dm.org/Rowno/sitemap-urls)Extract URLs from an XML sitemap.

## Getting Started
Install the Sitemap Urls command line tool:
```bash
npm install -g sitemap-urls
# or
yarn add -g sitemap-urls
```Run `sitemap-urls` on a file containing a sitemap:
```bash
sitemap-urls sitemap.xml
```Also supports piping:
```bash
curl http://example.com/sitemap.xml | sitemap-urls
```## Usage
### CLI
```
Usage: sitemap-urls []Path:
Path to a file containing an XML sitemap.
This parameter is ignored when the sitemap is being piped.Options:
-h, --help Show this help text.
-v, --version Print sitemap-urls' version.
```### API
#### `.extractUrls(string xml)` -> `array`
Extracts URLs from a string containing an XML sitemap.
Example result:
```json
["http://example.com/", "http://example.com/test/"]
```## Related
- [medic][] - Perform bulk URL status checks and track changes.
## License
Sitemap Urls is released under the MIT license.
Copyright © 2015 Roland Warmerdam.
[medic]: https://github.com/Rowno/medic