
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
= easy_downloader
This is a dead simple, one-method downloader, with friendly error messages.
EasyDownloader reduces the amount of work required to setup and check for errors when downloading from another location. This is useful when, for example, a client wants to you to pick a file up from their FTP, SFTP, or regular website on a nightly basis. EasyDownloader gives you a one-method means of downloading those files, returns with a friendly error message if it fails (geared at cron job notifications), or returns an array of file names it downloaded.
== Example
First, add the following to your Gemfile:
gem 'easy_downloader'
Then, in your application:
my_results = EasyDownloader.download( :type => :ftp, :host => '127.0.0.1', :user => 'app', :password => 'example' :remote_path => '/some/directory/IWantToChangeTo' :remote_pattern => '.*.txt' :local_path => Rails.root+'/my_downloaded_stuff/' )
my_results.results => "We found 1 file(s) to download with the following names: #1. test_file.txt Started downloading at Tue Dec 21 16:04:46 -0500 2010 Progress: Starting to download test_file.txt Finished downloading test_file.txt Finished downloading at Tue Dec 21 16:04:46 -0500 2010 Downloaded 1 file(s)"
my_results.files => ['test_file.txt']
The returned object only has two attributes (did I mention this was dead simple):
The available keys are:
:type => (required) The protocal used to download the file. One of :sftp, :ftp or :http. :host => (required) the domain of the remote server (source) :remote_path => a relative path to "cd" into when we first access the remote server :remote_pattern => a glob pattern that will select only the files we want to download.% see Ruby's core API if you are not familiar with this concept.
NOTE: for *ftp* downloads, this matches a regular expression to the name of files in the current directory.
for *Sftp* downloads, this uses the 'glob' pattern as mentioned above.
:user => a username or login used for authenticating on the server :password => a password that, in combination with the user, will grant access to the remote server/host
== Contributing to easy_downloader
== Copyright
Copyright (c) 2010 Bernardo Telles. See LICENSE.txt for further details.
FAQs
Unknown package
We found that easy_downloader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.