fnichol/tapasd
A concurrent Ruby Tapas episode downloader, curiously written in Go. tapasd is focused on fetching the movie files for local mirroring and loading onto tablets for viewing later offline.
Features:
To perform a download of all episodes in the feed to the current directory with 4 workers which re-checks every 6 hours, you only need to provide 2 things: a username and password for the DPD site:
tapasd -user=sally@example.com -pass=secret
If you'd prefer to perform the check-and-download once, then use the -oneshot
flag:
tapasd -user=sally@example.com -pass=secret -oneshot
For more details on the other options and modes, run tapasd -h
:
Usage of tapasd:
-concurrency=4: data directory for downloads
-data="/Users/fnichol/Projects/go/src/github.com/fnichol/tapasd": data directory for downloads
-interval=21600: number of seconds to sleep between retrying
-oneshot=false: check and download once, then quit
-pass="[required]": pass for RubyTapas account (required)
-user="[required]": user for RubyTapas account (required)
In our example, we'll use a data container pattern to persist the downloaded episodes between re-launching of tapasd
services. First, we'll create a named container (tapasd_data
) with a volume of /data
:
docker run -v /data --name tapasd_data busybox true
Next, we'll launch a tapasd
service, mounting in the shared volume from our tapasd_data
container. For good measure, we'll also give this container a name of tapasd
:
docker run -d --volumes-from tapasd_data --name tapasd fnichol/tapasd -user="user@example.com" -pass="secret"
Finally, if you want to check on its progress, simply follow the log output from the tapasd
container:
docker logs -f tapasd
For a bonus, you can launch an interactive container with the data mounted in /data
with:
docker run --rm -t -i --volumes-from tapasd_data busybox sh
Killing off the tapasd
service is easy:
docker kill tapasd
If you wanted to re-start it at a later date:
docker start tapasd
And to remove the tapasd
container:
docker rm tapasd
Again, your data is persisted in the volume associated with the tapasd_data
container. To free up disk space by removing the data, simply:
docker rm tapasd_data
Clone
mkdir -p $GOPATH/src/github.com/fnichol
cd $GOPATH/src/github.com/fnichol
git clone https://github.com/fnichol/tapasd.git
Build
cd $GOPATH/src/github.com/fnichol/tapasd
./build
This will generate a binary called ./bin/tapasd
.
A Docker trusted build exists at fnichol/tapasd, and can be pulled down with:
docker pull fnichol/tapasd
Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:
git checkout -b my-new-feature
)git commit -am 'Add support for feature'
)git push origin my-new-feature
)Created and maintained by Fletcher Nichol (fnichol@nichol.ca).
MIT (see License.txt)
docker pull fnichol/tapasd