Giter VIP home page Giter VIP logo

alfred-workflow-nodejs's People

Contributors

giangvo avatar gvotruong avatar krokofant avatar nhoxuan avatar steyep 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  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  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  avatar

alfred-workflow-nodejs's Issues

question

Navigate to workflow folder and run pm install, where is the workflow folder?

Missing methods in npm version

Hey,

I'm currently trying to get my first alfred worflow with your nice framework up and running. I noticed that the npm package is slightly different than the github version. Especially this method of the Actionhandler is totally missing:

        onMenuItemSelected: function(action, handler) {
            if (!action || !handler) {
                return;
            }
            eventEmitter.on("menuItemSelected-" + action, handler);
        },

Deeper menus after first onMenuItemSelected

I have multiple top-level alternatives such as
(Action) Set password + password
(Action) Set user + username
(Action) Get courses
(MenuItemSelected) Get courses + SelectedCourse

Now I would want an additional menu like
(MenuItemSelected) Get courses + SelectedCourse + Register

Is this possible?

I am not understanding the menu API or "feedbacks"

Is there more to feedback that the notification alert?

How can I declare a menu of two options (Say ActionA and ActionB) and handle the event when either is selected?

I am lost between the various properties of each items and what they're for (title,subtitle,arg, hasSubItems, valid, data) unless they're just used for the menu subsystems & feedbacks

Sorry, I am not understanding the documentation. Can you help?

Right now I have this:

(function main() {
    actionHandler.onAction("menu", function(query) {
        var Item = AlfredNode.Item;
        // generate feeback A
        var item1 = new Item({
            title: "TV Off",
            subtitle: "Press tab to get menu items",
            arg: "Feedback A",
            hasSubItems: true, // set this to true to tell that this feedback has sub Items
            valid: true,
            data: {
                alias: "X"
            } // we can set data to item to use later to build sub items
        });
        workflow.addItem(item1);

        // generate feeback B
        var item2 = new Item({
            title: "Feedback B",
            subtitle: "Press tab to get menu items",
            arg: "FeedbackB",
            hasSubItems: false, // set this to true to tell that this feedback has sub Items
            valid: true,
            data: {
                alias: "Y"
            } // we can set data to item to use later to build sub items
        });
        workflow.addItem(item2);

        // generate feedbacks
        workflow.feedback();
    });

    actionHandler.onAction("Feedback B", function(query) {
        // your code to handle action 1 here
        workflow.info("Hub IP", "Test");
    });

    AlfredNode.run();
})();

Encoding issue

I have a menu which first gets a list of objects from online. These objects contains strings with ä in them. These are encoded as %E4. The problem seems to arise when I select an element from a menu. The menu element has an ä which has the hex value %E4. When I autocomplete the title gets sent to an onMenuItemSelected listener.

The title is now still an ä but has a hexencoding of a%u0308 which makes the following code fail:

function getItemData(itemTitle) { var wfData = Storage.get("wfData"); return wfData ? wfData[itemTitle] : undefined; }

The wfData has a key containing the %E4 based ä and the ä in itemTitle is based on a%u0308.

Any idea on how to solve this?

why examplejs not work

8039ac92-b578-46ae-91ed-43143296323f

as the picture show,after I follow your instruction, when I click "examplejs k", it shows google!what's wrong with it

GHSL-2020-115

Hello,

I am a member of the GitHub Security Lab (https://securitylab.github.com).

I've attempted to reach a maintainer for this project to report a potential security issue but have been unable to verify the report was received. Please could a project maintainer could contact us at [email protected], using reference GHSL-2020-115?

Thank you,
Kevin Backhouse
GitHub Security Lab

AlfredNode.Item.mods Example?

Hello,

I see in the documentation that there is a mods option for the AlfredNode.Item object. Is this to support separate attributes when using modifier keys? I can't seem to find any examples within the repo.

Thanks!
Kobi

TypeError: storage.initSync is not a function

I have an exception. Node version is v14.17.5.

storage.initSync();
            ^

TypeError: storage.initSync is not a function
    at Alfred/Alfred.alfredpreferences/workflows/user.workflow.F8F6BE96-BE8B-4524-8F7F-873C8C80E4EB/node_modules/alfred-workflow-nodejs/alfredNode.js:171:13
    at Object.<anonymous> (Alfred/Alfred.alfredpreferences/workflows/user.workflow.F8F6BE96-BE8B-4524-8F7F-873C8C80E4EB/node_modules/alfred-workflow-nodejs/alfredNode.js:214:3)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
    at Module.load (internal/modules/cjs/loader.js:937:32)
    at Function.Module._load (internal/modules/cjs/loader.js:778:12)
    at Module.require (internal/modules/cjs/loader.js:961:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (Alfred/Alfred.alfredpreferences/workflows/user.workflow.F8F6BE96-BE8B-4524-8F7F-873C8C80E4EB/main.js:1:18)
    at Module._compile (internal/modules/cjs/loader.js:1072:14)

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.