Skip to content

Commit 6ebf216

Browse files
committed
Make README somewhat more readable
1 parent c114cd9 commit 6ebf216

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,19 @@ I'm still trying to figure out what is the most useful way of using this plugin.
1111
send feedback in [Discussions](https://github.com/realcundo/nu_plugin_dcm/discussions) or report problems in [Issues](https://github.com/realcundo/nu_plugin_dcm/issues).
1212

1313
## Usage
14-
`dcm` plugin reads its input from single values or from specific columns:
14+
`dcm` plugin reads its input from single values, from specific columns, or from list of values:
1515
- `dcm`: expects a string/filename or binary DICOM data
1616
- `dcm $column_name`: reads a string/filename or binary DICOM data from `$column`. This is
1717
equivalent to `get $column | dcm`.
18+
- `ls *.dcm | select name | dcm`: reads all files foun dby `ls` and returns a list of records.
19+
20+
See Examples for more details.
1821

1922
## Error handling
2023

2124
`dcm` plugin works in two modes:
22-
- default, when errors are reported as error rows,
23-
- in custom columns when `--error` option is used. This will report all errors in the specified column. Empty column value means no error.
25+
- default, when errors are reported as error rows, reported by nu,
26+
- when `--error` option is used, errors are reported in provided column. If there were no errors, the column value is empty.
2427

2528
## Known Limitations
2629

@@ -35,7 +38,6 @@ send feedback in [Discussions](https://github.com/realcundo/nu_plugin_dcm/discus
3538
Without `into binary`, `dcm` would see a list of strings, assuming it's a list of filenames.
3639

3740

38-
3941
## Examples
4042

4143
### Output DICOM file as a table
@@ -66,6 +68,7 @@ ls **/* |
6668
where type == file |
6769
dcm name -e error |
6870
where error == "" |
71+
select --ignore-errors SOPInstanceUID Modality |
6972
group-by Modality
7073
```
7174
@@ -93,7 +96,7 @@ ls **/* | where type == file |
9396
par-each { |it| {
9497
name: $it.name,
9598
size: $it.size,
96-
sha256: (open $it.name | hash sha256),
99+
sha256: (open --raw $it.name | hash sha256),
97100
dcm: ($it.name | dcm -e error)
98101
} } |
99102
select --ignore-errors name size sha256 dcm.Modality dcm.SOPInstanceUID dcm.error |
@@ -118,5 +121,5 @@ plugin add ~/.cargo/bin/nu_plugin_dcm
118121
To start using it without restarting nu, you can [import it](https://www.nushell.sh/book/plugins.html#importing-plugins):
119122
120123
```nu
121-
plugin use nu_plugin_dcm
124+
plugin use ~/.cargo/bin/nu_plugin_dcm
122125
```

0 commit comments

Comments
 (0)