Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uris: extract, export and report count and size #87

Closed
wants to merge 2 commits into from
Closed

uris: extract, export and report count and size #87

wants to merge 2 commits into from

Conversation

Thell
Copy link

@Thell Thell commented Sep 27, 2015

  • use the apt-get --print-uris output to obtain information and
    present to user prior to downloading.
  • make DLLISTCOUNT and DLLISTBYTES available to the aria2 environment
    such that --on-download-[stop|complete] scripts have access.

Signed-off-by: Thell Fowler thell@tbfowler.name

--->8---

In response to #84 as well as my own desire to have more useful output during docker builds (aka a progress monitor for noninteractive shells).

- use the apt-get --print-uris output to obtain information and
  present to user prior to downloading.
- make DLLISTCOUNT and DLLISTBYTES available to the aria2 environment
  such that --on-download-[stop|complete] scripts have access.

Signed-off-by: Thell Fowler <thell@tbfowler.name>
@Thell
Copy link
Author

Thell commented Sep 27, 2015

Just to mention... I opted for numfmt iec-i to align with the Download Results rather than si which would more closely align with apt. Either way, since it is rounded the results match up.

- utilize the size field of the uri list and force usage of "-qq"
  for consistency.

Signed-off-by: Thell Fowler <thell@tbfowler.name>
@varhub
Copy link
Contributor

varhub commented Jan 29, 2016

Hello @Thell,

In #91 I broke your PR, sorry.
By the way, I think that code seems better because removes complex regex of grep and sed.
Doing it I noticed that plain --print-uris already comes with file size as cut -d' ' -f3, so if you wish I can take a look to DLLISTBYTES

@Thell
Copy link
Author

Thell commented Jan 30, 2016

@varhub Thanks for the offer, and the reminder this existed. The PR needs to be updated to reflect a better solution in use here. I'll do so later and submit a new PR.

DLLISTBYTES=$( echo "$apturis"| awk -F " " '{bytes+=$3} END{print bytes}' )

@Thell Thell closed this Jan 30, 2016
@Lasall
Copy link
Collaborator

Lasall commented Oct 30, 2017

@Thell Do you think you can work on another PR to add this feature?

@Thell
Copy link
Author

Thell commented Nov 1, 2017

Sure, but it will be some months down the road. If someone else gets to it first... :)

@Lasall
Copy link
Collaborator

Lasall commented Jan 5, 2018

For the record I pushed a solution for #84 to the sources, so the original intention of --on-download-[stop|complete] scripts might be easier to implement now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants