Skip to content

Commit d1599a7

Browse files
jdeveraun33k
authored andcommitted
Add details about the command line tool to README
1 parent 9c55ecc commit d1599a7

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,32 @@ self.assertEqual(r, "ueber-ueber-german-umlaut")
137137
For more examples, have a look at the [test.py](test.py) file.
138138

139139

140+
Command Line Options
141+
====================
142+
143+
With the package, a command line tool called `slugify` is also installed.
144+
145+
It allows convenient command line access to all the features the `slugify` function supports. Call it with `-h` for help.
146+
147+
The command can take its input directly on the command line or from STDIN (when the `--stdin` flag is passed):
148+
149+
```
150+
$ echo "Taking input from STDIN" | slugify --stdin
151+
taking-input-from-stdin
152+
```
153+
```
154+
$ slugify taking input from the command line
155+
taking-input-from-the-command-line
156+
```
157+
158+
Please note that when a multi-valued option such as `--stopwords` or `--replacements` is passed, you need to use `--` as separator before you start with the input:
159+
160+
```
161+
$ slugify --stopwords the in a hurry -- the quick brown fox jumps over the lazy dog in a hurry
162+
quick-brown-fox-jumps-over-lazy-dog
163+
```
164+
165+
140166
Running the tests
141167
====================
142168

0 commit comments

Comments
 (0)