Skip to content

Commit

Permalink
doc: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
amazingrando committed Aug 10, 2019
1 parent eb28a4b commit a6a81f2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ To use the CLI, type `split-md` followed by it's args:
* cleanName (string): do you want to remove anything from the pattern?
* writePath (path to where smaller files should be created)
* limit (optionally limit the number of files created)
* hasCounter (optionally have the outputted files names be numbered)

#### Example

```
$ split-md 'tests/testdata.md' '### v' '###' '' 10
$ split-md 'tests/testdata.md' '### v' '###' '' 10 true
```

In the above example we are reading in `tests/testdata.md`. Our delimiter is whenever we see a line start with the pattern `### v`. We want to use this line for our new markdown file's name, however we want to remove the `###` by setting it as the cleanName variable. Lastly, we are setting the `writePath` to our current working directory by giving an empty string as the last variable. Also note that we are setting our limit to only create 10 files before exiting.
In the above example we are reading in `tests/testdata.md`. Our delimiter is whenever we see a line start with the pattern `### v`. We want to use this line for our new markdown file's name, however we want to remove the `###` by setting it as the cleanName variable. Next, we are setting the `writePath` to our current working directory by giving an empty string as this variable. Also note that we are setting our limit to only create 10 files before exiting. Lastly, we have `true` to show that we want the file names to be ordered.

## License:

Expand Down

0 comments on commit a6a81f2

Please sign in to comment.