Giter Site home page Giter Site logo

Comments (8)

Neo-Oli avatar Neo-Oli commented on July 24, 2024 3

@PacoBell Yes. Or you can do what I do:
$HOME/bin/termux-url-opener

#!/data/data/com.termux/files/usr/bin/bash
cd ~/bin/
com=`ls --color=never url-*|fzf`
~/bin/$com $@

I then have various url-<name> scripts in $HOME/bin like
url-youtube-dl

youtube-dl $@

When I share I get this screen which lets me choose which script I want to run
screenshot_20170302-094514

from termux-tasker.

PacoBell avatar PacoBell commented on July 24, 2024

I personally want to feed YouTube URLs into youtube-dl from the YouTube app Share to "Copy link" to clipboard. Tasker already has a monitor for the %CLIP variable. This would be so easy if it were possible.

from termux-tasker.

Neo-Oli avatar Neo-Oli commented on July 24, 2024

@PacoBell You can do something very similar to this without tasker. You can create a script at $HOME/bin/termux-url-opener containing the command:
youtube-dl $@

Then you can go to a youtube video and click the share button. Then you can, from the youtube app, share to "Termux".

This will automatically launch $HOME/bin/termux-url-opener http://youtube.com?v=xxxxxxxx

from termux-tasker.

PacoBell avatar PacoBell commented on July 24, 2024

Awesome! I suppose I'd have to regex parse the URL in order to trigger different services depending on the domain.

from termux-tasker.

janru avatar janru commented on July 24, 2024

I'd like to pass a tasker variable to a termux script in the background. I assume, the solution above does not fit my needs, because it opens termux in the foreground, right?
let's say we have the script dosth.sh. Then I'd like to pass the string "myMessage" by executing '~/.termux/tasker/dosth.sh myMessage' which produces an error.
Could you please disable the check if the file "dosth.sh myMessage" exists? Or add a possibility to append parameters?

from termux-tasker.

TheNothingMan avatar TheNothingMan commented on July 24, 2024

Could you please disable the check if the file "dosth.sh myMessage" exists? Or add a possibility to append parameters?

I really would like to see that, too. Limiting Tasker to start scripts without parameters cuts down Tasker+Termux' possibilities.

From what I can see in the source code, all that is needed for this is adding the EXTRA_ARGUMENTS to the plugin setup, then add a PUT_EXTRA in the FireReceiver and send the extra to the TERMUX service.

EDIT: I had a close look on the source. It wasn't that easy, because Termux expects an array of arguments. However, I made it work as I would expect it, and created a pull request. Please have a look at it. This will lift the automation on the next level and make the money paid for the Tasker plugin well spent.

from termux-tasker.

TheNothingMan avatar TheNothingMan commented on July 24, 2024

While I am trying to be patient, I just have to ask: Will there be a version that contains the argument stuff at Google Play soon?
If there are any problems left with my code, I would be glad to see if I can help.

from termux-tasker.

fornwall avatar fornwall commented on July 24, 2024

@TheNothingMan Thanks for your pull request - great work! I've just tagged the release and updated it to Google Play, so it should be available in a few hours as an update.

It should also appear on F-Droid within a day or so.

from termux-tasker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.