Parse the information out of aria2 control files.
Project description
aria-control-file-parser
Parse
aria2ccontrol 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file parse_aria_control_file-1.1.0.tar.gz.
File metadata
- Download URL: parse_aria_control_file-1.1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20a8d4ab60119a1bc3fcc5b633a92749fe37ade0a55d77a630e52bc2b1b0fc0c
|
|
| MD5 |
23c33c36790cc3505a3fadec99279ed4
|
|
| BLAKE2b-256 |
9717f3f01ff983cbf64e36b1e4d665d87449eec1583413cf2d5576f3b5ef617e
|
File details
Details for the file parse_aria_control_file-1.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: parse_aria_control_file-1.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09161da7b86ad3bf70bc9a745f7700882a391bc3cb21ddf6464844ea0cb6abe4
|
|
| MD5 |
06e6525ded0c59c75ac179a2dfdaebd8
|
|
| BLAKE2b-256 |
217e113ae8c031e8a04bbcb41f8e193c1a6c2395945c5f382dbee1e432d25497
|