Skip to content

Commit 781fdf0

Browse files
committed
Update docs and --help
1 parent 79038c4 commit 781fdf0

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,18 @@ See more options and usage details with:
150150
gitingest --help
151151
```
152152

153+
### Extracting files from a digest
154+
155+
You can also reconstruct the source files from a digest using the `extract` command:
156+
157+
```bash
158+
# Extract files from digest.txt to the current directory
159+
gitingest extract digest.txt
160+
161+
# Extract files to a specific output directory
162+
gitingest extract digest.txt --output ./restored-project
163+
```
164+
153165
## 🐍 Python package usage
154166

155167
```python

src/gitingest/__main__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,14 @@ def extract_command(digest_file: str, output: str) -> None:
161161
output : str
162162
Directory where extracted files will be saved.
163163
164+
Examples
165+
--------
166+
Extract files from digest.txt to the current directory:
167+
$ gitingest extract digest.txt
168+
169+
Extract files to a specific output directory:
170+
$ gitingest extract digest.txt --output ./restored-project
171+
164172
"""
165173
try:
166174
extract(digest_file, output)

0 commit comments

Comments
 (0)