Skip to content

Commit c401ffc

Browse files
authored
Update README.md
1 parent 6b55807 commit c401ffc

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ useful for batch operations.
1111
General usage:
1212

1313
```
14-
$ ./docxtools
14+
$ ./docxtools --help
1515
Usage: docxtools [OPTIONS] <IN_FILE> <COMMAND>
1616
1717
Commands:
1818
cat List the text from the document to the console
19-
_grep Search the text in the document like 'grep'
20-
_replace Search and replace in document text and tables
19+
links List the links in the document to the console
20+
grep Search the text in the document
21+
replace Search and replace in document text and tables
2122
replace-links Search and replace hyperlinks in the document
2223
help Print this message or the help of the given subcommand(s)
2324
@@ -30,8 +31,6 @@ Options:
3031
-V, --version Print version
3132
```
3233

33-
Note that `_grep` and `_replace` are marked with an underscore until https://github.com/coderthoughts/docxtools/issues/2 is fixed.
34-
3534
## Example usage:
3635

3736
### List text contents of a docx file
@@ -48,10 +47,10 @@ docs/test.docx: A test document written in Microsoft Word.
4847

4948
### Search a directory of docx files for a specific text
5049

51-
The `_grep` subcommand supports regex syntax to find text.
50+
The `grep` subcommand supports regex syntax to find text.
5251

5352
```
54-
$ find docs/folder -name "*.docx" -exec docxtools {} _grep '[tT]ext' \;
53+
$ find docs/folder -name "*.docx" -exec docxtools {} grep '[tT]ext' \;
5554
docs/folder/sample1.docx: text
5655
docs/folder/sample1.docx: Text
5756
docs/folder/sample2.docx: This is a different file that also contains some textual content.
@@ -62,11 +61,9 @@ docs/folder/sample2.docx: This is a different file that also contains some textu
6261
Change the word 'Test' or 'test' into zzzz and write the modifications to a new file `test_mod1.docx`:
6362

6463
```
65-
$ docxtools docs/test.docx _replace '[Tt]est' zzzz docs/test_mod1.docx
64+
$ docxtools docs/test.docx replace '[Tt]est' zzzz docs/test_mod1.docx
6665
```
6766

68-
Note: until https://github.com/coderthoughts/docxtools/issues/2 is fixed, please double check that the result for the `_replace` operation is as expected (only applies to `_replace`, not to `replace-links`).
69-
7067
### Replace all occurrences of a hyperlink with another
7168

7269
Replace all occurrences of `https://main--test--hlxsites.hlx.page` with `https://foo.bar.com`. Any subpaths after the

0 commit comments

Comments
 (0)