Skip to content

Commit 3ee75b4

Browse files
committed
Update docs
1 parent cc0e4de commit 3ee75b4

File tree

6 files changed

+145
-1
lines changed

6 files changed

+145
-1
lines changed

dfetch/commands/filter.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
33
It can either accept no input to list all files. A list of files can be piped in (such as through ``find``)
44
or it can be used as a wrapper around a certain tool to block or allow files under control by dfetch.
5+
6+
.. scenario-include:: ../features/filter-projects.feature
7+
58
"""
69

710
import argparse

doc/asciicasts/filter.cast

Lines changed: 100 additions & 0 deletions
Large diffs are not rendered by default.

doc/generate-casts/filter-demo.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
source ./demo-magic/demo-magic.sh
4+
5+
PROMPT_TIMEOUT=1
6+
7+
# Copy example manifest
8+
mkdir filter
9+
pushd filter
10+
11+
cp -r ../update/* .
12+
clear
13+
14+
# Run the command
15+
pe "cat dfetch.yaml"
16+
pe "dfetch filter"
17+
pe "find . | dfetch filter"
18+
pe "find . | dfetch filter echo"
19+
20+
21+
PROMPT_TIMEOUT=3
22+
wait
23+
24+
pei ""
25+
26+
popd
27+
rm -rf filter

doc/generate-casts/generate-casts.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ asciinema rec --overwrite -c "./update-demo.sh" ../asciicasts/update.cast
1717
asciinema rec --overwrite -c "./report-demo.sh" ../asciicasts/report.cast
1818
asciinema rec --overwrite -c "./report-sbom-demo.sh" ../asciicasts/sbom.cast
1919
asciinema rec --overwrite -c "./freeze-demo.sh" ../asciicasts/freeze.cast
20+
asciinema rec --overwrite -c "./filter-demo.sh" ../asciicasts/filter.cast
2021
asciinema rec --overwrite -c "./diff-demo.sh" ../asciicasts/diff.cast
2122

2223
rm -rf update

doc/manual.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,19 @@ Freeze
124124

125125
.. automodule:: dfetch.commands.freeze
126126

127+
128+
Filter
129+
------
130+
.. argparse::
131+
:module: dfetch.__main__
132+
:func: create_parser
133+
:prog: dfetch
134+
:path: filter
135+
136+
.. asciinema:: asciicasts/filter.cast
137+
138+
.. automodule:: dfetch.commands.filter
139+
127140
Environment
128141
-----------
129142
.. argparse::

features/filter-projects.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Feature: Filtering file paths before executing a tool
1919
url: some-remote-server/SomeProject.git
2020
"""
2121

22-
Scenario: Tool receives only managed files
22+
Scenario: Tool shows all files under dfetch control
2323
When I run "dfetch filter"
2424
Then the output shows
2525
"""

0 commit comments

Comments
 (0)