summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacobo de Vera <devel@jacobodevera.com>2020-04-07 23:32:03 +0100
committerVal Neekman <un33kvu@gmail.com>2020-04-09 11:41:41 -0400
commitd1599a799d551d6bf57b1a727af10c125fc6a257 (patch)
tree321ef5a10b2962cc1ed7c2f34a93db045d975d87
parent9c55ecc51447ce4d742d0d3fdf7a165ef99339a7 (diff)
downloadpython-slugify-d1599a799d551d6bf57b1a727af10c125fc6a257.tar.gz
Add details about the command line tool to README
-rw-r--r--README.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/README.md b/README.md
index d3f2a7c..510a4b6 100644
--- a/README.md
+++ b/README.md
@@ -137,6 +137,32 @@ self.assertEqual(r, "ueber-ueber-german-umlaut")
For more examples, have a look at the [test.py](test.py) file.
+Command Line Options
+====================
+
+With the package, a command line tool called `slugify` is also installed.
+
+It allows convenient command line access to all the features the `slugify` function supports. Call it with `-h` for help.
+
+The command can take its input directly on the command line or from STDIN (when the `--stdin` flag is passed):
+
+```
+$ echo "Taking input from STDIN" | slugify --stdin
+taking-input-from-stdin
+```
+```
+$ slugify taking input from the command line
+taking-input-from-the-command-line
+```
+
+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:
+
+```
+$ slugify --stopwords the in a hurry -- the quick brown fox jumps over the lazy dog in a hurry
+quick-brown-fox-jumps-over-lazy-dog
+```
+
+
Running the tests
====================