It supports thepiratebay, nyaa, 1337x, libgen, limetorrents and rarbg

    • TUVIMEN@programming.devOP
      link
      fedilink
      arrow-up
      6
      ·
      18 days ago

      I don’t really use qbittorrents, i do everything from terminal so i use transmission with transmission-remote cli, this script gives me the ability to add any torrent in a couple of seconds. Also it can search for books on libgen.

  • Bogus5553@lemm.ee
    link
    fedilink
    English
    arrow-up
    5
    ·
    18 days ago

    Pretty cool. May I ask tough, what’s the reason for doing this in BASH and not in something like Python?

      • tenchiken@lemmy.dbzer0.comM
        link
        fedilink
        English
        arrow-up
        5
        ·
        18 days ago

        I’m with this… Bash runs in nearly anything without any real good chance of version conflicts.

        Why complicate things needlessly?

        • Rogue@feddit.uk
          link
          fedilink
          English
          arrow-up
          4
          arrow-down
          1
          ·
          18 days ago

          That’s profoundly untrue. Scripting in bash is an indescribably painful experience.

          You have absolutely no idea what version of a binary the user will be running so you’re limited to using only options that have been well established.

          I’ve never worked with python but I understand it has at least got some semblance of package management providing assurance that methods you’re calling exist, and I imagine it has some standardised mechanism for handling errors unlike bash.

          A simple example is making a GET request to an API and deserializing a JSON response if its successful, handling a timeout if the server can’t be reached or handling the HTTP status code if it’s not a 200 response.

          JS, python, Rust, C#, Java etc will all handle that simple scenario with zero effort but in bash it’s a nightmare.

          • tenchiken@lemmy.dbzer0.comM
            link
            fedilink
            English
            arrow-up
            5
            ·
            18 days ago

            I didn’t say it wasn’t painful, merely convenient for me.

            I’m fine sticking with well established. Why would I need package management with a shell script? Bash has as many ways of handling errors as I give it. All this you mention are using functionality I can address in other ways but again, I never claimed it solved everything. I only prefer it due to knowing that if I solved the problem in bash, it stays solved for me.

            Show us on the doll where the shell script touched you…

            • Rogue@feddit.uk
              link
              fedilink
              English
              arrow-up
              4
              arrow-down
              1
              ·
              18 days ago

              Show us on the doll where the shell script touched you…

              Everywhere.

              I believed bash would be enjoyable, I believed we’d have fun. But all it ever gave was pain. I was young and naive.

              • tenchiken@lemmy.dbzer0.comM
                link
                fedilink
                English
                arrow-up
                3
                ·
                18 days ago

                Hah! Indeed.

                I feel it’s the known pain at least. I’ve had python and perl pain as well, and it’s not as comforting a pain to me.

                Hello Darkness, my old friend… I’ve come to script with you again…

    • TUVIMEN@programming.devOP
      link
      fedilink
      arrow-up
      5
      ·
      18 days ago

      Not really bash but posix shell, the main reason is because at the time of making it i had not yet made python ffi for my html searching lib

  • JamonBear@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    16 days ago

    Nice! It’s using xclip or xsel to copy magnet links, afaik it’s only working on Xorg. What is the Wayland alternative for xclip?

    • TUVIMEN@programming.devOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      16 days ago

      You can use the --no-clipboard option to make a wrapper script that would integrate it with wl-copy.

  • krash@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    16 days ago

    I really like this. Is it possible to have it search several sources in the future?

    • TUVIMEN@programming.devOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      16 days ago

      Using all sources could return over 200 results for one query. This would make it hard to browse without fzf.

      Results would have to get sorted by the script and fields like date are provided in human readable format that would have to be converted with a lot of effort to sort it. Sources have also unique fields.

      Shell script is just bad to make that feature, although torge is extendable enough for you to make a wrapper script that could do it without sorting.