update readme
This commit is contained in:
parent
3b08d17488
commit
4dd1a4e84f
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
46
.idea/workspace.xml
generated
46
.idea/workspace.xml
generated
@ -1,7 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="aa6c2199-1a12-49e5-87b6-7ea25345c196" name="Default" comment="" />
|
||||
<list default="true" id="aa6c2199-1a12-49e5-87b6-7ea25345c196" name="Default" comment="">
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
|
||||
</list>
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="TRACKING_ENABLED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
@ -15,11 +19,11 @@
|
||||
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
|
||||
<component name="FileEditorManager">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="450">
|
||||
<file leaf-file-name="read_a2.py" pinned="false" current-in-tab="true">
|
||||
<file leaf-file-name="read_a2.py" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/read_a2.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="2304">
|
||||
<caret line="64" column="16" lean-forward="true" selection-start-line="64" selection-start-column="16" selection-end-line="64" selection-end-column="16" />
|
||||
<state relative-caret-position="-1620">
|
||||
<caret line="3" column="0" lean-forward="true" selection-start-line="3" selection-start-column="0" selection-end-line="32" selection-end-column="66" />
|
||||
<folding>
|
||||
<element signature="e#0#13#0" expanded="true" />
|
||||
</folding>
|
||||
@ -27,6 +31,16 @@
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="README.md" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/README.md">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="540">
|
||||
<caret line="15" column="27" lean-forward="true" selection-start-line="15" selection-start-column="27" selection-end-line="15" selection-end-column="27" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="__builtin__.py" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$USER_HOME$/.PyCharm2017.1/system/python_stubs/-762174762/__builtin__.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
@ -73,10 +87,14 @@
|
||||
<find>h</find>
|
||||
</findStrings>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="IdeDocumentHistory">
|
||||
<option name="CHANGED_PATHS">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/read_a2.py" />
|
||||
<option value="$PROJECT_DIR$/README.md" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
@ -92,6 +110,7 @@
|
||||
<option name="width" value="1936" />
|
||||
<option name="height" value="1056" />
|
||||
</component>
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
|
||||
<component name="ProjectView">
|
||||
<navigator currentView="ProjectPane" proportions="" version="1">
|
||||
<flattenPackages />
|
||||
@ -338,14 +357,15 @@
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.3295325" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.33028573" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18534483" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18534483" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3295325" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
@ -425,13 +445,21 @@
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/read_a2.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="2304">
|
||||
<caret line="64" column="16" lean-forward="true" selection-start-line="64" selection-start-column="16" selection-end-line="64" selection-end-column="16" />
|
||||
<state relative-caret-position="-1620">
|
||||
<caret line="3" column="0" lean-forward="true" selection-start-line="3" selection-start-column="0" selection-end-line="32" selection-end-column="66" />
|
||||
<folding>
|
||||
<element signature="e#0#13#0" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/README.md">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="540">
|
||||
<caret line="15" column="27" lean-forward="true" selection-start-line="15" selection-start-column="27" selection-end-line="15" selection-end-column="27" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
</project>
|
44
README.md
44
README.md
@ -1 +1,45 @@
|
||||
# aria-control-file-parser
|
||||
|
||||
parse aria2c control file from cmd line.
|
||||
|
||||
I just find someone, also find a way to convert .aria2 file to magnet link.
|
||||
|
||||
just see this issue(https://github.com/aria2/aria2/issues/792).
|
||||
|
||||
read the aria technical notes, the .aria2 (Control File) contain the hash info of
|
||||
the magnet link, so just parse the file.
|
||||
|
||||
also @alphatr write a tool transform .aria2 file to a magnet link use javascript.
|
||||
|
||||
|
||||
```
|
||||
# ================================================================
|
||||
# 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 detail
|
||||
# https://aria2.github.io/manual/en/html/technical-notes.html
|
||||
# ================================================================
|
||||
```
|
Loading…
Reference in New Issue
Block a user