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

How use wttr.in with aria2c? #592

Closed
LinArcX opened this issue Mar 27, 2021 · 1 comment
Closed

How use wttr.in with aria2c? #592

LinArcX opened this issue Mar 27, 2021 · 1 comment
Labels
fixed Fixed, wating for the feedback

Comments

@LinArcX
Copy link

LinArcX commented Mar 27, 2021

No description provided.

@chubin
Copy link
Owner

chubin commented Mar 28, 2021

Because of aria2/aria2#190, it is not possible to use aria2c directly,
but you can easily do it with a small shell wrapper:

a2o() {
  TMP=$(mktemp /tmp/aria2c-XXXXXXXXXXXXXXX)
  IFS=+ aria2c --dir / -o "${TMP}" --allow-overwrite "$*" >& /dev/null &&
  cat "$TMP"
  rm "$TMP"
}

and then:

$ a2o https://wttr.in?A

Keep in mind, that:

  1. With aria2c, you need explicitly specify the protocol (http:// or https://),
  2. To force ANSI output, you need to use the ?A option.

@chubin chubin added the fixed Fixed, wating for the feedback label Mar 28, 2021
@LinArcX LinArcX closed this as completed Mar 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed Fixed, wating for the feedback
Projects
None yet
Development

No branches or pull requests

2 participants