Git Product home page Git Product logo

taskerjavascripthelpers's People

Contributors

dependabot[bot] avatar stephengregory avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

taskerjavascripthelpers's Issues

Incorporate last used time into calculation of available machines

When a machine becomes available, the person that last used it may not have removed their laundry yet. Since there's no indication of whether a machine has been emptied, add a configurable number of minutes, after a machine used by someone else is reported as available, to notify me that it is available.

Add option to save exported variable list to variable

Sometimes I forget what variables I set in a task and have to refer back to the JavaScript to see what I named them. It'd be convenient if a variable was exporting containing that information.

For example, for a helper that does this:

Tasker.setLocalVariable('foo', [1,2,3]);
Tasker.setLocalVariable('bar', "this is wonderful");

Have it internally set jsdebug to:

JS set the following local variables:
Arrays: foo
Strings: bar

So in the Tasker task:

  • JavaScript action
    • calls above helper
  • Flash action
    • flashes %jsdebug

Tutorial Errors

Noticed that the Pokemon tutorial appears to be broken in a couple of places

  1. Sandbox Tutorial

After finishing, running command
node sandbox/sandbox.tasker.pokemonInfoHelper.js'
gives error "FIle you are testing does not exist: [...]/TaskerJavaScriptHelpers-master/src/pokemonInfoHelper.js"

Found the issue - the Sandbox file doesn't include lines to rename the file.
Should require 'path' at the start and replace the final line with

const currentScriptFilename = path.basename(__filename);
const scriptFilenameToTest = currentScriptFilename.replace('sandbox.', '');
taskerSandbox(scriptFilenameToTest, taskerLocalVariables);
  1. Exporting Script Tutorial

This step just doesn't work. Running npm run taskerfy gives error message:

[...]/TaskerJavaScriptHelpers-master/src/tasker.pokemonInfoHelper.js
  25:35  error    'pokemon_json' is not defined                  no-undef
  26:34  error    'use_shiny_image' is not defined               no-undef
  64:58  warning  Newline required at end of file but not found  eol-last

Can't find what's causing it to not import the local variables, but I'm basically a novice so it might be something obvious. Tried to check how the example one for Sparkle Laundry does it but can't figure it out.

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.