https://github.com/equalsraf/dman
https://github.com/equalsraf/dman
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/equalsraf/dman
- Owner: equalsraf
- Created: 2018-07-19T16:00:11.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-19T16:00:38.000Z (almost 8 years ago)
- Last Synced: 2025-03-06T12:31:08.744Z (about 1 year ago)
- Language: Python
- Size: 17.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# About *dman*
_dman_ is the download manager interface daemon. _dman_
is not a download manager, although it sometimes behaves like one,
dman is a portable interface to call other download managers.
## What? Why?
There are lots of download managers out there, and I have no intention of
implementing yet another download (manager/accelerator).
What annoys me is that I lack a portable way to programmatically call
my download manager, i.e.:
* When I'm on Linux I use KGet
* On OpenBSD wget/aria2/Fatrat
* On Windows, only god knows what
Some of those are full fledged download managers, other are lack queueing
features/single instance.
Basically _dman_ is wrapper around whatever download managers you have in
your system. If for example KGet is available then it simply forwards to
KGet, otherwise call applications like wget but manages download queues
internally.
It is a meta-Download-Manager :D
## How do I use it?
Just call the dman command:
$ dman http://...
## What applications do you support?
* WGet
* Aria
# Development
We are still very early in the development cycle. We need:
* Testing, testing, testing, ...
* The more applications the merrier, if you need a plugin we
don't support let us know
## Adding support new download apps
Take a peek into dman/plugins.py. For simple programs you
inherit from the ProcessDownload class.
## dman IPC
dman has 2 IPC mechanisms you can use to interact with the
download manager: json-rpc and the urldropper socket.
Both operate as a UNIX socket, and accept messages as netstring
frames.
### urldropper
The urldropper interface is the simplest interface to start a download.
It simply accepts URLs for download.
It does not return error codes, or offer any other functionality.
This interface simply consists of writing URLs into a socket.
The urls are encoded as netstrings.
Any number of urls can be written in the same connection.
So, a simple python example could be:
import socket
from dman import client, netstring
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
sock.connect(client.urldrop_path())
sock.send(netstring.encode(url))
sock.close()
### Json RPC
TBD ...