Skip to main content

An XDCC Downloader

Project description

XDCC Downloader
===============

.. figure:: xdcc_dl/resources/logo/logo_256.png
:alt: Logo

Logo
An XDCC File downloader based on the
`irclib <https://github.com/jaraco/irc>`__ framework.

Installation
------------

Via Pip (Preferred):
~~~~~~~~~~~~~~~~~~~~

**As User (Preferred)**

::

$ pip install xdcc_dl --user

**Systemwide**

::

# pip install xdcc_dl
or
$ sudo pip install xdcc_dl

Via setup.py
~~~~~~~~~~~~

**As User (Preferred)**

::

$ python setup.py install --user

**Systemwide**

::

# python setup.py install
or
$ sudo python setup.py install

Binaries
~~~~~~~~

The supplied binaries at the `Github
Releases <https://github.com/namboy94/xdcc-downloader/releases>`__ page
do not require installation nor any dependencies. They can simply be
executed.

Usage
-----

Message-based CLI
~~~~~~~~~~~~~~~~~

XDCC Packlists usually list xdcc commands in the folowing form:

::

/msg <BOTNAME> xdcc send #<PACKNUMBER>

By supplying this message as the ``-m`` parameter, the pack can be
downloaded.

**Examples:**

::

# This is the xdcc message: '/msg the_bot xdcc send #1'

# This command downloads pack 1 from the_bot
$ xdcc_dl -m "/msg the_bot xdcc send #1"

# It's possible to download a range of packs (1-10 in this case):
$ xdcc_dl -m "/msg the_bot xdcc send #1-10"

# Range stepping is also possible:
$ xdcc_dl -m "/msg the_bot xdcc send #1-10,10"
# (This will download packs 1,3,5,7,9)

# you can also specify the destination file or directory:
$ xdcc_dl -m "/msg the_bot xdcc send #1" -d /home/user/Downloads
# The destination defaults to your current working directory

# if the bot is on a different server than irc.rizon.net, a server
# has to be specified:
$ xdcc_dl -m "/msg the_bot xdcc send #1" --server irc.freenode.org

# You can also specify an IRC username. If none was supplied, a
# random string of numbers will be used instead
$ xdcc_dl -m "/msg the_bot xdcc send #1" --user Me

# To specify how verbose the program is, you can pass the
# verbosity parameter as a number between 0 and 6:
$ xdcc_dl -m "/msg the_bot xdcc send #1" --verbosity 3

As a library:
~~~~~~~~~~~~~

xdcc-downloader is built to be used as a library for use in other
projects. To make use of the XDCC downloader in your application, you
will first need to create a list of
`XDCCPack <xdcc_dl/entitites/XDCCPack.py>`__ objects, either by hand or
by using the `PackSearcher <xdcc_dl/pack_searchers/PackSearcher.py>`__.

Once this list of XDCCPacks is created, use one of the following
classes:

- `XDCCDownloader <xdcc_dl/xdcc/XDCCDownloader.py>`__, if you can
guarantee that every pack is on the same server
- `MultipleServerDownloader <xdcc_dl/xdcc/MultipleServerDownloader>`__,
if the packs are on different IRC servers

Do not use any classes in ``xdcc_dl.xdcc.layers``, those all work in
tandem to create these two higher-level classes.

Both classes are initialized using the following parameters:

**user**: Either a string, or a `User <xdcc_dl/entitites/User.py>`__
object which specifies the username for connecting to the IRC network. A
random username can be generated when passing 'random' as the username

**logger**: Either pass an integer value between 0 and 6 to set the
verbosity, a `Logger <xdcc_dl/logging/Logger.py>`__ object or another
object of a class that implements all of Logger's methods.

Once initialized, start the XDCC downloads by passing the list of
XDCCPacks to the downloader's download() method.

A second optional Parameter is the progress. This parameter is an
instance of the `Progress <xdcc_dl/entitites/Progress.py>`__ class and
can be used to see the progress of the downloads from a different point
in the application

Projects using xdcc-downloader
------------------------------

- `toktokkie <https://gitlab.namibsun.net/namboy94/toktokkie>`__

Further Information
-------------------

- `Changelog <https://gitlab.namibsun.net/namboy94/xdcc-downloader/raw/master/CHANGELOG>`__
- `Gitlab <https://gitlab.namibsun.net/namboy94/xdcc-downloader>`__
- `Github <https://github.com/namboy94/xdcc-downloader>`__
- `Python Package Index Site <https://pypi.python.org/pypi/xdcc_dl>`__
- `Documentation(HTML) <https://docs.namibsun.net/html_docs/xdcc_downloader/index.html>`__
- `Documentation(PDF) <https://docs.namibsun.net/pdf_docs/xdcc_downloader.pdf>`__
- `Git Statistics
(gitstats) <https://gitstats.namibsun.net/gitstats/xdcc_downloader/index.html>`__
- `Git Statistics
(git\_stats) <https://gitstats.namibsun.net/git_stats/xdcc_downloader/index.html>`__
- `Test
Coverage <https://coverage.namibsun.net/xdcc-downloader/index.html>`__

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xdcc_dl-0.4.0.tar.gz (33.0 kB view hashes)

Uploaded Source

Built Distributions

xdcc_dl-0.4.0-py3-none-any.whl (76.5 kB view hashes)

Uploaded Python 3

xdcc_dl-0.4.0-py2-none-any.whl (77.3 kB view hashes)

Uploaded Python 2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page