Go to file
BitHeaven fc4665fdfb
Update download.go
2022-11-10 20:19:12 +05:00
.github/workflows no 2022-05-05 14:02:35 -04:00
concurrent Update download.go 2022-11-10 20:19:12 +05:00
e621 support new e621 API, GH Action changes 2020-04-23 18:37:01 -04:00
.gitignore sigh 2019-03-29 09:35:21 -07:00
LICENSE yep good 2019-02-28 11:47:50 -08:00
Makefile no 2022-05-05 14:02:35 -04:00
README.md chore: update readme 2019-09-05 22:07:34 -04:00
go.mod Update go.mod 2022-11-10 20:01:15 +05:00
go.sum migrate to go modules 2019-09-16 16:53:59 -04:00
install.sh update that install script 2020-04-23 18:45:25 -04:00
main.go Update main.go 2022-11-10 20:04:47 +05:00

README.md

e6dl

"I don't care about any of this, just take me to the downloads"

This is a command line tool for downloading posts that match certain tags on e621 or e926.

It does basically the same thing as this tool except it was written in Go and the output is a lot less pretty.

It supports concurrently downloading posts, and you can set a maximum number of workers that should be downloading at a time.

I made this because I wanted to rewrite one of my previous projects in Go, so I decided to start with this one since it's a pretty small and simple command line tool that encapsulates a lot of concepts in the language (type definition, imports, goroutines, standard libraries, slices, to name a few).

Installing

Prebuilt Binaries

There is an install script available for Linux/macOS here. It automatically grabs the latest release (at the time of writing) and saves to /usr/local/bin/e6dl.

From Source

Clone repo.

# Build e6dl then install it to /usr/local/bin
make install

You can also install it to a custom path of your choosing:

make install INSTALLPATH="/bin"

If you wanna get rid of it:

make uninstall

Building

First, install Go.

Then just:

make build

bin/e6dl will magically appear. You can also just:

go run main.go

To distribute:

make dist

3 files will be spit out in the dist directory - one for Windows, one for macOS, and one for Linux.

You can also run make dist-win, make dist-macos, or make dist-linux to build them individually.

Example

Here's a situation that uses every flag:

If you wanted to download a maximum of 20 posts with the tag pokemon in random order from e926 to the directory ./posts with a maximum of 2 downloading at a time:

e6dl --tags "pokemon order:random" --out ./posts --limit 20 --concurrents 2 --sfw

Usage

Usage of e6dl:
  --concurrents int
    	Maximum amount of concurrent downloads (default 5)
  --limit int
    	Maximum amount of posts to grab from e621 (default 10)
  --out string
    	The directory to write the downloaded posts to (default "dl")
  --sfw
    	Download posts from e926 instead of e621
  --tags string
    	Tags to search for
  --pages int
    	Number of search result pages to download (default 1)