Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mslinn/dl
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mslinn/dl
- Owner: mslinn
- Created: 2023-07-15T14:46:50.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-02-11T13:51:58.000Z (11 months ago)
- Last Synced: 2024-10-12T09:45:24.469Z (3 months ago)
- Language: Python
- Size: 81.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# dl
Download videos and mp3s from many websites.
Uses `scp` to copy downloaded media to other computers that run `sshd`.## Installation
1. Install dependencies:
```shell
$ python -m pip install -r requirements.txt
```2. Copy `dl` to somewhere on the path.
An easy way to do that is to `git clone` this repository and include the directory on the `PATH`.3. Define an environment variable called `dl` in `~/.bashrc` that points to the directory where you installed `dl.py`.
```text
export dl=/mnt/c/work/dl
```4. Reload `~/.bashrc`:
```shell
$ source ~/.bashrc
```5. Copy `dl.config` to your home directory and modify to suit.
The file is in [YAML](https://yaml.org/) format.
Here is a typical `dl.config`:```yaml
local:
mp3s: ${win_home}/Music
vdest: ${media}/staging
xdest: ${storage}/secret/videosmp3s:
automount: /media/mslinn/Clip Jam/Music/playlistremotes:
mslinn@server1:
mp3s: /data/media/mp3s
other: /home/mslinn/Videos
vdest: /data/media/staging
xdest: /data/secret/videos
mslinn@server2:
disabled: true
mp3s: /mnt/e/media/mp3s
other: /home/mslinn/Videos
vdest: /mnt/e/media/staging
xdest: /mnt/c/secret/videos
```6. Verify the setup is correct by inspecting the paths in the help message:
```shell
$ dl -h
usage: dl [-h] [-d] [-v] [-x] [-V VIDEO_DEST] urlDownloads media.
Defaults to just downloading an MP3, even when the original is a video.
MP3s are downloaded to /mnt/c/Users/mslinn/Music.positional arguments:
urloptions:
-h, --help show this help message and exit
-d, --debug Enable debug mode
-v, --keep-video Download video to /mnt/e/media/staging
-x, --xrated Download video to /mnt/c/secret/videos
-V VIDEO_DEST, --video_dest VIDEO_DEST
download video to the specified directoryLast modified 2023-09-06
```If you see an environment variable that was not expanded in the help message,
that means it was not defined.
Define the variable somehow before running this program.