Giter Site home page Giter Site logo

socialsky-io / dl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thedevsaddam/dl

0.0 1.0 0.0 717 KB

Command-line file downloader tool

Home Page: https://github.com/thedevsaddam/dl

License: MIT License

Makefile 1.08% Shell 11.30% Go 87.62%

dl's Introduction

DL

Command-line file downloader tool

Usage

$ dl -u https://www.url.com/foo.ext

Example screenshots

Installation on Mac/Linux

curl https://raw.githubusercontent.com/thedevsaddam/dl/main/install.sh -o install.sh \
&& chmod +x install.sh \
&& ./install.sh \
&& rm install.sh

Uninstallation

curl https://raw.githubusercontent.com/thedevsaddam/dl/main/uninstall.sh -o uninstall.sh \
&& chmod +x uninstall.sh \
&& ./uninstall.sh \
&& rm uninstall.sh

Windows

For windows download the binary and set environment variable so that you can access the binary from terminal

Download Binary

Download options

$ dl -u https://www.url.com/foo.ext
# or with concurrency
$ dl -u https://www.url.com/foo.ext -c 10
# with debug mode enabled (if you are curious!)
$ dl -u https://www.url.com/foo.ext -c 10 -d
# with custom output file name
$ dl -u https://www.url.com/foo.ext -c 10 -d -n bar.ext

Configurations

Setup destination directory

# set current directory path as destination directory
$ dl config -p .
# or set other directory
$ dl config -p $HOME/Downloads

Note: If you have destination directory set then all files automatically will be saved there. If you want to override on the fly then use -p . flag to download in the current directory. By default the destination directory value is empty that means the file will be downloaded in the current directory.

Setup sub-directory/extensions

Note: If destination directory is not set then the sub-directory/extensions will NOT WORK

# set sub-directory based on extensions
# this will create a "binary" diectory inside root directory. 
# all downloads with .exe, .dmg extensions will be stored there
$ dl config -s "binary:.exe,.dmg"

Setup concurrency

# default concurrency is 5, you can set default value by passing -c flag in config
$ dl config -c 10

Default configurations

config.json
{
	"directory":"",
	"concurrency":5,
	"sub_dir_map":{
		"audio":[
			".aif",
			".cda",
			".mid",
			".midi",
			".mp3",
			".mpa",
			".ogg",
			".wav",
			".wma",
			".wpl"
		],
		"document":[
			".xls",
			".xlsm",
			".xlsx",
			".ods",
			".doc",
			".odt",
			".pdf",
			".rtf",
			".tex",
			".txt",
			".wpd",
			".md"
		],
		"image":[
			".ai",
			".bmp",
			".ico",
			".jpeg",
			".jpg",
			".png",
			".ps",
			".psd",
			".svg",
			".tif",
			".tiff"
		],
		"video":[
			".3g2",
			".3gp",
			".avi",
			".flv",
			".h264",
			".m4v",
			".mkv",
			".mov",
			".mp4",
			".mpg",
			".mpeg",
			".rm",
			".swf",
			".vob",
			".wmv"
		]
	}
}

Contribution

Your suggestions will be more than appreciated. Read the contribution guide here

See all contributors

License

The dl is an open-source software licensed under the MIT License.

dl's People

Contributors

thedevsaddam avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.