Skip to content

Commit 3193a4a

Browse files
authoredJun 1, 2023
add instructions on exporting output to a file (#86)
1 parent 20701ca commit 3193a4a

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
 

‎README.md

+16
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,22 @@ assemblyai get [id]
246246
247247
</details>
248248

249+
### Exporting Output to a File
250+
251+
You can export the output of AssemblyAI CLI commands to a file by using [shell redirection](https://www.gnu.org/software/bash/manual/html_node/Redirections.html). To export the output to a text file, use the `>` operator followed by the name of the file you want to create.
252+
253+
```bash
254+
assemblyai get [id] > transcript.txt
255+
```
256+
257+
To save the raw JSON response from the API, you can do this instead:
258+
259+
```bash
260+
assemblyai get [id] -j > transcript.json
261+
```
262+
263+
Note that if the file you are exporting to already exists, its contents will be overwritten. If you want to append the output to an existing file, use the `>>` operator instead of `>`.
264+
249265
## Contributing
250266

251267
We're more than happy to welcome new contributors. If there's something you'd like to fix or improve, start by [creating an issue](https://github.com/AssemblyAI/assemblyai-cli/issues). Please make sure to follow our [code of conduct](https://github.com/AssemblyAI/assemblyai-cli/blob/main/CODE_OF_CONDUCT.md).

0 commit comments

Comments
 (0)
Please sign in to comment.