Skip to content

Commit ac3fae4

Browse files
authored
Merge pull request #1 from zerodevx/feature/allow-stdin
Allows `stdin`
2 parents 1b33795 + 1dbb2b9 commit ac3fae4

File tree

4 files changed

+264
-848
lines changed

4 files changed

+264
-848
lines changed

README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,14 @@ At its simplest, just go to your `dist` folder and run:
2525
static-sitemap-cli https://example.com > sitemap.xml
2626
```
2727

28-
OR, because it's quite a mouthful:
28+
Or, because it's quite a mouthful:
2929

3030
```
3131
sscli https://example.com > sitemap.xml
3232
```
3333

3434
Where `sscli` is just an alias of `static-sitemap-cli`. CLI by default outputs to `stdout` -
35-
so that you can pipe it to do other cool stuff.
36-
35+
so that you can pipe it to do other cool stuff. CLI also allows you to pipe in BASEURL via `stdin`.
3736

3837

3938
### Arguments
@@ -49,9 +48,9 @@ so that you can pipe it to do other cool stuff.
4948
|--------|--------------|-----------------------------------------------------------------|
5049
| -h | --help | show CLI help |
5150
| -v | --version | show CLI version |
52-
| -r | --root | [default: ./] root dir to start from |
53-
| -m | --match | [default: .html] comma-separated list of extensions to match |
54-
| -i | --ignore | [default: 404.html] comma-separated list of globs to ignore |
51+
| -r | --root | [default: current dir] root directory to start from |
52+
| -m | --match | [default: **/*.html] list of globs to match |
53+
| -i | --ignore | [default: 404.html] list of globs to ignore |
5554
| -p | --priority | comma-separated glob/priority pair; eg: foo/*.html,0.1 |
5655
| -f | --changefreq | comma-separated glob/changefreq pair; eg: foo/*.html,daily |
5756
| -n | --no-clean | disable clean URLs |
@@ -93,7 +92,7 @@ Note: Just put `dist/` for that location, not `dist/.` or `./dist/**`.
9392
#### Ignore a bunch of files
9493

9594
```
96-
sscli https://example.com -i 404.html,foo/*.html > sm.xml
95+
sscli https://example.com -i=404.html foo/**/* > sm.xml
9796
```
9897

9998
#### Set priority of certain pages
@@ -102,7 +101,13 @@ By default, the optional `<priority>` label ([protocol reference](https://www.si
102101
so every pages' default is 0.5. To change the *relative* priority (to 0.1) of certain pages:
103102

104103
```
105-
sscli https://example.com -p **/privacy-policy/**,0.1 **/terms-of-service/**,0.1 > sm.xml
104+
sscli https://example.com -p=**/{foo,bar}/**,0.1 **/important/**,0.9 > sm.xml
105+
```
106+
107+
#### Pipe in the base URL
108+
109+
```
110+
echo https://example.com | sscli > sm.xml
106111
```
107112

108113

@@ -113,12 +118,15 @@ Add tests! :sweat_smile:
113118

114119
## Changelog
115120

121+
**v0.2.0 - 2019-07-31:**
122+
* Allow BASEURL to be piped in also.
123+
* Refactor some dependencies.
124+
116125
**v0.1.1 - 2019-07-27:**
117126
* Bugfix: properly check rootDir before replacing.
118127
* Add new alias `sscli` because the original is quite a mouthful.
119128

120129
**v0.1.0 - 2019-07-26:**
121130
* Initial release.
122-
123-
131+
* Built in 10 minutes. :stuck_out_tongue_winking_eye:
124132

0 commit comments

Comments
 (0)