Skip to content

Commit c2f12c3

Browse files
committed
Update docs
1 parent 49a80b6 commit c2f12c3

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
@@ -115,6 +115,19 @@ Freeze
115115

116116
.. automodule:: dfetch.commands.freeze
117117

118+
119+
Filter
120+
------
121+
.. argparse::
122+
:module: dfetch.__main__
123+
:func: create_parser
124+
:prog: dfetch
125+
:path: filter
126+
127+
.. asciinema:: asciicasts/filter.cast
128+
129+
.. automodule:: dfetch.commands.filter
130+
118131
Environment
119132
-----------
120133
.. 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)