zsugabubus / aria2t

TUI for aria2c(1)
GNU General Public License v3.0
26 stars 1 forks source link

Lots of errors during make #3

Open LinArcX opened 3 years ago

LinArcX commented 3 years ago

Hi. i wanted to compile your application on my machine, but i got lots of erros:

OS: VoidLinux ncurses-devel-6.2_4 Compiler:

gcc (GCC) 10.2.1 20201203 Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gperf:

GNU gperf 3.1 Copyright (C) 1989-2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Douglas C. Schmidt and Bruno Haible.

Sed:

sed (GNU sed) 4.8 Copyright (C) 2020 Free Software Foundation, Inc.

LinArcX commented 3 years ago

OK. i commented notification_handler() function and compiled again. Successfully compiled. but if i try to run the executable, i'll get connection refused error:

Screenshot-from-2021-03-25-21-30-54

Edit1: At the end of man page, you said:

EXAMPLE Connect to “127.0.0.1:16800” using “$$secret$$” token: env ARIA_RPC_PORT=16800 'ARIA_RPC_SECRET=$$secret$$' aria2t

What's “$$secret$$” token? And how we can generate one of those?

Edit2: OK. finally i got how to run the server. (Just put this line in a separate terminal) aria2c --enable-rpc --rpc-listen-all

And run aria2t in another terminal: aria2t

Everything seems OK. but if i press a to add link, it will exit from main window and wait for user input. (Is it the normal behaviour?) Anyway i put a link and press ENTER. nothing happen!

zsugabubus commented 3 years ago

Hi! I'm glad you managed to compile it.

Pressing a opens your $EDITOR (usually vi, vim, emacs) where you can add files you want to download. One per line. The syntax is similar to what aria2c uses for its session files.

/path/to/my/file
  dir=/tmp
/path/to/another/file
  pause=true
zsugabubus commented 3 years ago

If you usually add downloads from one particular path you can automatize the whole process (either by using aria2c RPC) or binding some action to A, like:

~/.config/aria2t/actions/A:

#!/usr/bin/env bash
printf '%s\n dir='/example/path/to'\n' ~/Downloads/*.torrent >$2
vim $2
# After you have finished editing, the saved file is read by `aria2t` and
# downloads are added. If you do not like vim, you can use geany too,
# or nano or whatever you want. Or better you do not even need to
# open any kind of editor if you think so.

For several other examples take a look at my config if you are interested.

zsugabubus commented 3 years ago

Hmm. Just now realizing that if you have commented something out that will probably will not work. At the end have you managed to compile it cleanly or have you left that line commented?