Skip to main content

aria-control-file-parser

PyPI

Parse aria2c control files from the command line.

The .aria2 (Control File) contains the hash info of the magnet link, so we can parse the file to get the original magnet link. This allows you to resume the download where it left off if it was cancelled or interrupted.

See this issue.

# ================================================================
#  0                   1                   2                   3
#  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
# +---+-------+-------+-------------------------------------------+
# |VER|  EXT  |INFO   |INFO HASH ...                              |
# |(2)|  (4)  |HASH   | (INFO HASH LENGTH)                        |
# |   |       |LENGTH |                                           |
# |   |       |  (4)  |                                           |
# +---+---+---+-------+---+---------------+-------+---------------+
# |PIECE  |TOTAL LENGTH   |UPLOAD LENGTH  |BIT-   |BITFIELD ...   |
# |LENGTH |     (8)       |     (8)       |FIELD  | (BITFIELD     |
# |  (4)  |               |               |LENGTH |  LENGTH)      |
# |       |               |               |  (4)  |               |
# +-------+-------+-------+-------+-------+-------+---------------+
# |NUM    |INDEX  |LENGTH |PIECE  |PIECE BITFIELD ...             |
# |IN-    |  (4)  |  (4)  |BIT-   | (PIECE BITFIELD LENGTH)       |
# |FLIGHT |       |       |FIELD  |                               |
# |PIECE  |       |       |LENGTH |                               |
# |  (4)  |       |       |  (4)  |                               |
# +-------+-------+-------+-------+-------------------------------+
#
#         ^                                                       ^
#         |                                                       |
#         +-------------------------------------------------------+
#                 Repeated in (NUM IN-FLIGHT) PIECE times

# More information available at:
# https://aria2.github.io/manual/en/html/technical-notes.html
# ================================================================

How to Use

python3 aria2_parser.py dahufa.aria2

With multiple files or with a directory:

python3 aria2_parser.py dahufa.aria2 dahufa.aria2 ./folder

Reading aria2 files from folder recursively:

python3 aria2_parser.py ./ -r

Build

python3 setup.py build
python3 setup.py install

Metadata

Release files for parse-aria-control-file 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for parse-aria-control-file 1.1.0
File Size Uploaded Provenance Actions
parse_aria_control_file-1.1.0.tar.gz 5.4 kB Without provenance Details for parse_aria_control_file-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for parse-aria-control-file 1.1.0
File Interpreter ABI Platform Actions
parse_aria_control_file-1.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for parse_aria_control_file-1.1.0-py2.py3-none-any.whl

Total release size: 10.7 kB

Release files / parse_aria_control_file-1.1.0.tar.gz

Download URL parse_aria_control_file-1.1.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
20a8d4ab60119a1bc3fcc5b633a92749fe37ade0a55d77a630e52bc2b1b0fc0c
BLAKE2b-256 checksum
How to use checksums
9717f3f01ff983cbf64e36b1e4d665d87449eec1583413cf2d5576f3b5ef617e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / parse_aria_control_file-1.1.0-py2.py3-none-any.whl

Download URL parse_aria_control_file-1.1.0-py2.py3-none-any.whl
Size 5.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
09161da7b86ad3bf70bc9a745f7700882a391bc3cb21ddf6464844ea0cb6abe4
BLAKE2b-256 checksum
How to use checksums
217e113ae8c031e8a04bbcb41f8e193c1a6c2395945c5f382dbee1e432d25497
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Security for parse-aria-control-file 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page