How to: Use command line arguments

Guides explaining how to accomplish various things with HDoujin Downloader.
Post Reply
User avatar
Site Admin
Posts: 925
Joined: Fri Mar 10, 2017 9:28 pm

How to: Use command line arguments

Post by Squidy » Fri Apr 28, 2017 7:33 am

HDoujin supports a few useful command line interactions, which makes it easier to allow interactions with other programs.

Adding Manga to the Queue

HDoujin is very flexible when it comes to adding manga to the queue. You can add manga from files (e.g., a text file containing a list of URLs, or a manga.queue file) and from URLs:

Code: Select all

"HDoujin Downloader.exe" <url or file path>
If the file path is not absolute, the program will attempt to find the file in the same directory as the executable. You can list as many files and URLs as you want, and even list them both at the same time.

You can then start the download process by adding the -start-all argument at the end of the list of items.

It's possible to specify a page/chapter range using -pages and -chapters, respectively. For example, you might specify a page range like this:

Code: Select all

"HDoujin Downloader.exe" -pages=1,3-8 <url>
The page range will be applied to the next URL, or all URLs in a file if a file is provided. After being applied, the range is reset, and will not be applied to any further items.

Adding Manga to a List

If you don't want to add manga directory to the queue, you can add them to a list using the Add from List feature under Manga > Add From List. URLs can be added to this list using the -l argument to enable list mode before providing any files/URLs:

Code: Select all

"HDoujin Downloader.exe" -l <url or file path>
By default, new URLs will always be appended to the list. You can replace the contents of the list instead using the -lr argument after or before enabling list mode. Similarly, append mode can be re-enabled using -la.

Use the -q argument to switch back to queue mode at any time. You can even switch between the two in the same line, and the URLs following the argument will be treated accordingly.

Changing the Download Directory

Changing the download directory won't affect your default download directory setting; it will only affect the items added in the same set of arguments following the directory change.

Using the -dir argument followed by a path will affect the download directory for all following items. If an absolute path is not provided, the path will be relative to the executable. To specify a path relative to the current directory, use -rdir instead.

If at any point you want to revert back to using the default download directory, use the -dir-reset argument.

No-GUI Mode

HDoujin can be run in "no-GUI" mode by providing the following set of arguments,

Code: Select all

"HDoujin Downloader.exe" <url> <path> nogui
where <url> is the URL of the manga, and <path> is the desired output directory (e.g., the name of the manga). If you don't provide an absolute path, the path will be relative to the default download directory defined in your config.ini file.

This is an old feature that hasn't been expanded on a lot, so functionality is extremely limited in this mode. Most settings are ignored (which means no conversions), and only a single download is possible at one time.
I'm the admin and developer of HDoujin Downloader.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest