Command-line file downloader tool

Overview

DL

Command-line file downloader tool

Usage

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

Alt Text

Installation on Mac/Linux

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

Uninstallation

curl https://raw.githubusercontent.com/thedevsaddam/dl/main/uninstall.sh -o uninstall.sh \
&& sudo chmod +x uninstall.sh \
&& sudo ./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.

Issues
  • Bump github.com/briandowns/spinner from 1.16.0 to 1.17.0

    Bump github.com/briandowns/spinner from 1.16.0 to 1.17.0

    Bumps github.com/briandowns/spinner from 1.16.0 to 1.17.0.

    Commits
    • 12b31a6 Move cursor to the beginning of the line before erasing (#126)
    • 8cd3c74 Update TestRestart - CrossOS Passing & More Consistent (#125)
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    opened by dependabot[bot] 2
  • Bump github.com/spf13/cobra from 1.2.1 to 1.3.0

    Bump github.com/spf13/cobra from 1.2.1 to 1.3.0

    Bumps github.com/spf13/cobra from 1.2.1 to 1.3.0.

    Release notes

    Sourced from github.com/spf13/cobra's releases.

    v1.3.0 - The Fall 2021 release 🍁

    Completion fixes & enhancements 💇🏼

    In v1.2.0, we introduced a new model for completions. Thanks to everyone for trying it, giving feedback, and providing numerous fixes! Continue to work with the new model as the old one (as noted in code comments) will be deprecated in a coming release.

    • DisableFlagParsing now triggers custom completions for flag names #1161
    • Fixed unbound variables in bash completions causing edge case errors #1321
    • help completion formatting improvements & fixes #1444
    • All completions now follow the help example: short desc are now capitalized and removes extra spacing from long description #1455
    • Typo fixes in bash & zsh completions #1459
    • Fixed mixed tab/spaces indentation in completion scripts. Now just 4 spaces #1473
    • Support for different bash completion options. Bash completions v2 supports descriptions and requires descriptions to be removed for menu-complete, menu-complete-backward and insert-completions. These descriptions are now purposefully removed in support of this model. #1509
    • Fix for invalid shell completions when using ~/.cobra.yaml. Log message Using config file: ~/.cobra.yaml now printed to stderr #1510
    • Removes unnecessary trailing spaces from completion command descriptions #1520
    • Option to hid default completion command #1541
    • Remove __complete command for programs without subcommands #1563

    Generator changes ⚙️

    Thanks to @​spf13 for providing a number of changes to the Cobra generator tool, streamlining it for new users!

    • The Cobra generator now won't automatically include Viper and cleans up a number of unused imports when not using Viper.
    • The Cobra generator's default license is now none
    • The Cobra generator now works with Go modules
    • Documentation to reflect these changes

    New Features ⭐

    • License can be specified by their SPDX identifiers #1159
    • MatchAll allows combining several PositionalArgs to work in concert. This now allows for enabling composing PositionalArgs #896

    Bug Fixes 🐛

    • Fixed multiple error message from cobra init boilerplates #1463 #1552 #1557

    Testing 👀

    • Now testing golang 1.16.x and 1.17.x in CI #1425
    • Fix for running diff test to ignore CR for windows #949
    • Added helper functions and reduced code reproduction in args_test #1426
    • Now using official golangci-lint github action #1477

    Security 🔏

    • Added GitHub dependabot #1427
    • Now using Viper v1.10.0
      • There is a known CVE in an indirect dependency from viper: spf13/cobra#1538. This will be patched in a future release

    Documentation 📝

    • Multiple projects added to the projects_using_cobra.md file: #1377 #1501 #1454
    • Removed ToC from main readme file as it is now automagically displayed by GitHub #1429
    • Documentation correct for when the --author flag is specified #1009
    • shell_completions.md has an easier to use snippet for copying and pasting shell completions #1372

    ... (truncated)

    Commits
    • 178edbb Bump github.com/spf13/viper from 1.9.0 to 1.10.0 (#1561)
    • 9054739 Remove __complete cmd for program without subcmds (#1563)
    • 19c9c74 Always include the os package import when generating the root command (#1557)
    • 01e05b8 Bump github.com/spf13/viper from 1.8.1 to 1.9.0 (#1554)
    • 36bff0a fix root.go.golden (#1552)
    • 1854bb5 Fix some typos (mostly found by codespell) (#1514)
    • ff2c55e chore(ci): use golangci-lint-action (#1477)
    • 1beb476 fix: Duplicate error message from cobra init boilerplates (#1463)
    • 6f84ef4 Provide option to hide default 'completion' cmd (#1541)
    • ee75a2b Remove trailing spaces from bash completion command description (#1520)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    opened by dependabot[bot] 1
  • Bump github.com/briandowns/spinner from 1.16.0 to 1.18.0

    Bump github.com/briandowns/spinner from 1.16.0 to 1.18.0

    Bumps github.com/briandowns/spinner from 1.16.0 to 1.18.0.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    opened by dependabot[bot] 1
  • Bump github.com/schollz/progressbar/v3 from 3.8.3 to 3.8.5

    Bump github.com/schollz/progressbar/v3 from 3.8.3 to 3.8.5

    Bumps github.com/schollz/progressbar/v3 from 3.8.3 to 3.8.5.

    Release notes

    Sourced from github.com/schollz/progressbar/v3's releases.

    v3.8.5

    What's Changed

    New Contributors

    Full Changelog: https://github.com/schollz/progressbar/compare/v3.8.4...v3.8.5

    v3.8.4

    • allow animated saucer head
    • update deps
    Commits
    • c869815 Merge pull request #110 from flowchartsman/immediate_describe
    • eaf664f Merge pull request #116 from T1MOXA/fix/humanized-max
    • 236c1d2 update deps
    • 8962db7 Merge pull request #117 from wystans/animatedSaucerHead
    • 453e39c Moved pacman.go to its own directory
    • 158f5e9 Refactor to include empty saucer head
    • 8a0fe80 Updated pacman customization with animated saucer head
    • 7f7240b Add an alternate saucer head to allow for an anmiated saucer head.
    • 828f3bf Added basic pacman customization
    • 7486f6b fix when rendering blank
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    opened by dependabot[bot] 1
Owner
Saddam H
A passionate software engineer & open-source enthusiast | Love to write elegant code | Golang | Postgres | Distributed System
Saddam H
Command-line file downloader tool

Command-line file downloader tool

Saddam H 37 Dec 27, 2021
A command line tool that builds and (re)starts your web application everytime you save a Go or template fileA command line tool that builds and (re)starts your web application everytime you save a Go or template file

# Fresh Fresh is a command line tool that builds and (re)starts your web application everytime you save a Go or template file. If the web framework yo

null 0 Nov 22, 2021
📩 Command line osu! beatmap downloader

Circleload ?? Command line osu! beatmap downloader Circleload is a command line tool to easily download osu! beatmaps. Install go install github.com/T

sammyette 6 Dec 28, 2021
Dj13SDDownloader - command line downloader sequence diagram

dj13SDDownloader command line downloader sequence diagram from https://sequence.davidje13.com/ Download Download Link curl https://github.com/xh-dev-g

null 0 Jan 2, 2022
An open-source GitLab command line tool bringing GitLab's cool features to your command line

GLab is an open source GitLab CLI tool bringing GitLab to your terminal next to where you are already working with git and your code without switching

Clement Sam 1.7k Jan 15, 2022
A command line tool to prompt for a value to be included in another command line.

readval is a command line tool which is designed for one specific purpose—to prompt for a value to be included in another command line. readval prints

Venky 0 Dec 22, 2021
This command line converts .webarchive file to resources embed .html file

webarchive-to-singlefile This command line converts Safari's .webarchive file to complete .html. Notice Only tested on MacOS. Google Chrome required.

会有猫的 0 Nov 9, 2021
A command line tool for file downloads

A command line tool for file downloads

null 258 Jul 25, 2021
tfuzz is a command-line tool to fuzz some layer 7 OSI protocols with a template file

tfuzz tfuzz is a command-line tool to fuzz some layer 7 OSI protocols with a template file download the linux binary executable (or you can compile fr

Noob0x 3 Sep 29, 2021
Command-line tool for listening log file of game named as

Path of Exile Trade Notifier Command-line tool for listening log file of game named as "Path of Exile" and looking for buy message and send it to Tele

null 0 Dec 15, 2021
Command line tool for time tracking in a human-readable file format.

klog klog is a plain-text file format and a command line tool for time tracking. ?? Documentation – Learn how to use klog ?? Download – Get the latest

Jan Heuermann 304 Jan 6, 2022
git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.

Table of contents Introduction Reference Contributing Introduction Overview git-xargs is a command-line tool (CLI) for making updates across multiple

Gruntwork 526 Jan 8, 2022
git-xargs is a command-line tool (CLI) for making updates across multiple GitHub repositories with a single command

git-xargs is a command-line tool (CLI) for making updates across multiple GitHub repositories with a single command. You give git-xargs:

Maxar Infrastructure 2 Nov 8, 2021
A command line tool for simplified docker volume command built with go

dockervol A command line tool for simplified docker volume command built with go. Features: Remove anonymous volume (beta) Remove volume by matching n

Moh Achun Armando 0 Dec 18, 2021
fofax is a fofa query tool written in go, positioned as a command-line tool and characterized by simplicity and speed.

fofaX 0x00 Introduction fofax is a fofa query tool written in go, positioned as

null 237 Jan 15, 2022
Aces is a command line utility that lets you encode any file to a character set of your choice.

Aces Any Character Encoding Set Aces is a command line utility that lets you encode any file to a character set of your choice. For example, you could

Ishan Goel 10 Jan 2, 2022
Portal is a quick and easy command-line file transfer utility from any computer to another 🖥️ 🌌 💻

Portal is a quick and easy command-line file transfer utility from any computer to another ??️ ?? ??

Zino Kader 27 Dec 14, 2021
From the command line, quickly explore data from a CSV file.

shallow-explore From the command line, quickly explore data from a CSV file. shallow-explore is a Golang backed command-line tool for iterating over c

Thomas Mickley-Doyle 6 Jan 12, 2022
Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.

asciigraph Go package to make lightweight ASCII line graphs ╭┈╯. Installation go get github.com/guptarohit/asciigraph Usage Basic graph package main

Rohit Gupta 1.8k Jan 5, 2022