aria2p icon indicating copy to clipboard operation
aria2p copied to clipboard

External script with keybinding

Open Monirzadeh opened this issue 3 years ago • 5 comments

Is your feature request related to a problem? Please describe. For control, some aspect of aria2p need to change config with scripts like this issue #112. It is hard or complicated to implement into aria2p.

Describe the solution you'd like run external (bash or python) scripts with keybinding can solve this problem and expand functionality of aria2p. For example, we can run a bash script with key binding that ask speed limit, then change some value in aria2c and restart server.

Monirzadeh avatar Jun 28 '22 11:06 Monirzadeh

I'm not sure to understand what your feature request is. aria2p already provides programmatic ways to modify options within the running aria2 server. See for example https://pawamoy.github.io/aria2p/reference/api/#aria2p.api.API.set_global_options and set_options just below it.

Are you asking for specific keybindings within the TUI to change these options? Or some kind of TUI menu?

pawamoy avatar Jun 28 '22 18:06 pawamoy

I want to define keybinding in TUI can run a costume script. This custom script can show specific menu inside aria2p or change multi variable same time. In your documentation, aria2c options to create the download with I don't want to create new download with option. Usually I want to change specific configuration in aria2c and restart server. Or aria2p get specific data from selected item in TUI that I can use them for other modification in my script.

Another example, I want to open a specific download in my file manager. If I have selected item (in TUI) destination and can run a custom command in bash with key o that easily call my file manager with that destination. No need of this feature inside aria2p

Monirzadeh avatar Jun 28 '22 20:06 Monirzadeh

I'm waiting for the CSS branch of Textual to be released. Then I'll be able to rewrite the TUI with Textual and hopefully it will make it much more easier to implement such features. PRs welcome in the mean time :slightly_smiling_face:

pawamoy avatar Aug 17 '22 18:08 pawamoy

I was asking about it too here https://github.com/pawamoy/aria2p/issues/109

Bellavene avatar Sep 12 '23 20:09 Bellavene

Textual can be used now to re-implement the TUI with it. Happy to review PRs, otherwise I'll get to it when I need to have some fun :slightly_smiling_face:

pawamoy avatar Sep 13 '23 10:09 pawamoy