-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b4baf8a
commit 5410746
Showing
1 changed file
with
11 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |