<commit_before>=============================
Yet Another Coinado.io client
=============================

How to install
--------------
It is easy.
.. code-block:: bash
   git clone hogehoge --depth 1
   pip install -r requirements.txt
Done.

How to use
----------
First of all, you must set your secret key as environment variable.
Secret key will be found in your genuin coinado script file which you have downloaded before.
.. code-block:: bash
   export COINADO_SECRET=foobarfoooooobaaaaaaa

Now, you can download smoothly.
.. code-block:: bash
   python yacoinado.py 743bc6fad39e3a35460d31af5322c131dd196ac2
   python yacoinado.py 'http://releases.ubuntu.com/14.04.3/ubuntu-14.04.3-desktop-amd64.iso.torrent'
   python yacoinado.py 'magnet:?xt=urn:btih:743bc6fad39e3a35460d31af5322c131dd196ac2&dn=ubuntu-14.04.3-desktop-amd64.iso'
   python yacoinado.py ~/Desktop/ubuntu-14.04.3-desktop-amd64.iso.torrent

If you want to download the specific file,
.. code-block:: bash
   python yacoinado.py 743bc6fad39e3a35460d31af5322c131dd196ac2 --select filename_or_keyword

To inquire account balance,
.. code-block:: bash
   python yacoinado.py --inquiry
   ...
   Balance: 6.42 GB
   ...

Advanced usage
--------------
.. code-block:: bash
   python yacoinado.py --filename 743bc6fad39e3a35460d31af5322c131dd196ac2
   ubuntu-14.04.3-desktop-amd64.iso
.. code-block:: bash
   python yacoinado.py --endpoint 743bc6fad39e3a35460d31af5322c131dd196ac2
   https://coinado.io/i/743bc6fad39e3a35460d31af5322c131dd196ac2/auto?u=yoursecretfoobar
.. code-block:: bash
   python yacoinado.py --infohash 'http://releases.ubuntu.com/14.04.3/ubuntu-14.04.3-desktop-amd64.iso.torrent'
   743bc6fad39e3a35460d31af5322c131dd196ac2

Using high functioning downloader
.. code-block:: bash
   cat hash-list.txt | python yacoinado.py --endpoint --stdin | xargs curl -O --remote-header-name
   cat hash-list.txt | python yacoinado.py --endpoint --stdin | xargs wget --content-disposition

Parallel download (GNU Parallel)
.. code-block:: bash
   cat hash-list.txt | python yacoinado.py --endpoint --stdin | parallel -a - curl -O --remote-header-name

License
-------
BSD 3-clause license<commit_msg>fix layout problem in README.rst<commit_after>=============================
Yet Another Coinado.io Client
=============================

Dependence
++++++++++
- Requests (http://www.python-requests.org/en/latest/)
- BencodePy (https://github.com/eweast/BencodePy)

How to install
++++++++++++++
It is easy.

.. code-block:: bash

   $ git clone https://github.com/pluser/yacoinado.git --depth 1
   $ pip install -r requirements.txt

Done.

How to use
++++++++++
First of all, you need to set your secret key as environment variable.
Secret key will be found in your genuin coinado.io script file which you have downloaded before.

.. code-block:: bash

   $ export COINADO_SECRET=foobarfoooooobaaaaaaa

Now, you can download smoothly.

.. code-block:: bash

   $ python yacoinado.py 743bc6fad39e3a35460d31af5322c131dd196ac2
   $ python yacoinado.py 'http://releases.ubuntu.com/14.04.3/ubuntu-14.04.3-desktop-amd64.iso.torrent'
   $ python yacoinado.py 'magnet:?xt=urn:btih:743bc6fad39e3a35460d31af5322c131dd196ac2&dn=ubuntu-14.04.3-desktop-amd64.iso'
   $ python yacoinado.py ~/Desktop/ubuntu-14.04.3-desktop-amd64.iso.torrent

If you want to download the specific file,

.. code-block:: bash

   $ python yacoinado.py 743bc6fad39e3a35460d31af5322c131dd196ac2 --select filename_or_keyword

To inquire account balance,

.. code-block:: bash

   $ python yacoinado.py --inquiry
   ...
   Balance: 6.42 GB
   ...

Advanced usage
++++++++++++++
Basic
-----

.. code-block:: bash

   $ python yacoinado.py --filename 743bc6fad39e3a35460d31af5322c131dd196ac2
   ubuntu-14.04.3-desktop-amd64.iso

.. code-block:: bash

   $ python yacoinado.py --endpoint 743bc6fad39e3a35460d31af5322c131dd196ac2
   https://coinado.io/i/743bc6fad39e3a35460d31af5322c131dd196ac2/auto?u=yoursecretfoobar

.. code-block:: bash

   $ python yacoinado.py --infohash 'http://releases.ubuntu.com/14.04.3/ubuntu-14.04.3-desktop-amd64.iso.torrent'
   743bc6fad39e3a35460d31af5322c131dd196ac2

Using high functioning downloader
---------------------------------

.. code-block:: bash

   $ cat hash-list.txt | python yacoinado.py --endpoint --stdin | xargs curl -O --remote-header-name
   $ cat hash-list.txt | python yacoinado.py --endpoint --stdin | xargs wget --content-disposition

Parallel download (GNU Parallel)
--------------------------------

.. code-block:: bash

   $ cat hash-list.txt | python yacoinado.py --endpoint --stdin | parallel -a - curl -O --remote-header-name

License
+++++++
BSD 3-clause license
{'fraction_non_alphanumeric': 0.16373390557939915, 'fraction_numerical': 0.09656652360515021, 'mean_word_length': 3.4432793136320305, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3648408', 'n_tokens_mistral': 1992, 'n_tokens_neox': 1665, 'n_words': 356}