Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriyyakym authored Apr 14, 2022
1 parent b4baf8a commit 5410746
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
# sitemap-urls
Bash script for parsing urls from sitemap.xml with either flat or deep structure.

It outputs url per line, therefore it can be combined with other unix commands.
Bash script for parsing sitemap.xml urls. It supports deep and gzipped sitemaps.

It prints url per line, and can be piped with other unix commands.

### Examples:
Get all sitemap urls:
```
```sh
# Get all sitemap urls
./sitemap-urls.sh https://developer.mozilla.org/sitemaps/en-US/sitemap.xml
```

Get only urls that end with ___.html___:

```
./sitemap-urls.sh https://developer.mozilla.org/sitemaps/en-US/sitemap.xml | grep -e .html$
```
# Get only urls that end with `.html`
./sitemap-urls.sh https://developer.mozilla.org/sitemap.xml | grep -e .html$

Get only urls that do not end with ___.html___:
```
./sitemap-urls.sh https://developer.mozilla.org/sitemaps/en-US/sitemap.xml | grep -v -e .html$
```
# Get only urls that do not end with `.html`
./sitemap-urls.sh https://developer.mozilla.org/sitemap.xml | grep -v -e .html$

Get urls and write them to file:
# Get urls and write them to file
./sitemap-urls.sh https://developer.mozilla.org/sitemap.xml > mdn.urls.txt
```
./sitemap-urls.sh https://developer.mozilla.org/sitemaps/en-US/sitemap.xml > mdn.urls.txt
```

And so on.

0 comments on commit 5410746

Please sign in to comment.