From d1599a799d551d6bf57b1a727af10c125fc6a257 Mon Sep 17 00:00:00 2001 From: Jacobo de Vera Date: Tue, 7 Apr 2020 23:32:03 +0100 Subject: Add details about the command line tool to README --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) 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 ==================== -- cgit v1.2.1