Skip to content

Commit

Permalink
Issue 33 (#35)
Browse files Browse the repository at this point in the history
* Develop (#32)

* Don't consume all arguments after --extensions

This behavior is now more like other utilities where specifying the flag
multiple times extends the value of the argument.  For example,
    -e '.nc .h5 .zip'
becomes
    -e '.nc' -e '.h5' -e '.zip'

This is less fragile for the user and possibly less confusing how the
argument should be formatted on the command line.

* Add ability to execute arbitrary commands on each downloaded file

I did it this way so each file could be compressed without hard-coding
the compression algorithm. But I could see this being used to run a
pre-processing script on each downloaded file.

* updated README and tests for additive -e examples

* force 'action'

* merged code for extensions, process call, and updated documentation

* fix for #28

* updated CHANGELOG

Co-authored-by: Joe Sapp <joe.sapp@noaa.gov>
Co-authored-by: mgangl <mike.gangl@gmail.com>

* closes #33
added 'files to download' to non-verbose output

* updated changelog

Co-authored-by: Joe Sapp <joe.sapp@noaa.gov>
Co-authored-by: mgangl <mike.gangl@gmail.com>
  • Loading branch information
3 people authored Nov 18, 2021
1 parent 07c7787 commit 4b4ab77
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)


## Unreleased
### Added
### Changed
- Made number of files to download a non-verbose default printout. [33](https://github.com/podaac/data-subscriber/issues/33)
### Deprecated
### Removed
### Fixed
### Security

## [1.7.0]
### Added
- Added ability to call a process on downlaoded files. [Thank to Joe Sapp](https://github.com/sappjw).
Expand Down
5 changes: 4 additions & 1 deletion subscriber/podaac_data_subscriber.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,11 @@ def run():

downloads = filtered_downloads

# https://github.com/podaac/data-subscriber/issues/33
# Make this a non-verbose message
#if args.verbose:
print("Found " + str(len(downloads)) + " total files to download")
if args.verbose:
print("Found " + str(len(downloads)) + " total files to download")
print("Downloading files with extensions: " + str(extensions))


Expand Down

0 comments on commit 4b4ab77

Please sign in to comment.