Skip to content

Commit

Permalink
Merge branch 'main' into download-ignore-pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
JanHoefelmeyer authored Aug 16, 2023
2 parents f9fc7e7 + 8c95795 commit bb62579
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion cmd/csaf_downloader/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ type config struct {
Rate *float64 `long:"rate" short:"r" description:"The average upper limit of https operations per second (defaults to unlimited)" toml:"rate"`
Worker int `long:"worker" short:"w" description:"NUMber of concurrent downloads" value-name:"NUM" toml:"worker"`
Range *models.TimeRange `long:"timerange" short:"t" description:"RANGE of time from which advisories to download" value-name:"RANGE" toml:"timerange"`
Folder string `long:"folder" short:"f" description:"Download into a given FOLDER" value-name:"FOLDER" toml:"folder"`
Folder string `long:"folder" short:"f" description:"Download into a given subFOLDER" value-name:"FOLDER" toml:"folder"`
IgnorePattern []string `long:"ignorepattern" short:"i" description:"Dont download files if there URLs match any of the given PATTERNs" value-name:"PATTERN" toml:"ignorepattern"`



ExtraHeader http.Header `long:"header" short:"H" description:"One or more extra HTTP header fields" toml:"header"`

RemoteValidator string `long:"validator" description:"URL to validate documents remotely" value-name:"URL" toml:"validator"`
Expand Down
5 changes: 3 additions & 2 deletions docs/csaf_downloader.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Application Options:
-r, --rate= The average upper limit of https operations per second (defaults to unlimited)
-w, --worker=NUM NUMber of concurrent downloads (default: 2)
-t, --timerange=RANGE RANGE of time from which advisories to download
-f, --folder=FOLDER Download into a given FOLDER
-f, --folder=FOLDER Download all into a given subFOLDER
-i, --ignorepattern=PATTERN Dont download files if there URLs match any of the given PATTERNs
-H, --header= One or more extra HTTP header fields
--validator=URL URL to validate documents remotely
Expand Down Expand Up @@ -91,7 +91,8 @@ into a given intervall. There are three possible notations:

All interval boundaries are inclusive.

If the `folder` option is given the advisories are stored in this folder.
If the `folder` option is given the advisories are all stored in a subfolder
of this name.
If it is omitted (by default) the advisories are stored in folder name by the
year they are from.

Expand Down

0 comments on commit bb62579

Please sign in to comment.