Giter VIP home page Giter VIP logo

alfred-figma's Introduction

Figma Alfred 3 workflow

Alfred workflow to quick link Figma teams, projects and files

TODO:

  • Figma's API doesn't allow access to getting listings of draft files.
  • Figma's API doesn't allow access to get teams. This requires adding team ids to the workflow manually.
  • Files open in the desktop app, but teams and projects won't.

Installation

$ npm install --global alfred-figma

Requires Node.js 10+ and the Alfred Powerpack.

Configuration

There are a couple of requirements.

  1. You need a Figma account and be part of a team.
  2. Create a Personal Access Token so you can reach the API.
  3. Create a .env file with your access token in the directory of the installed workflow.
    • FIGMA_TOKEN=<personal-access-token>
    • Alternatively add an environment variable for FIGMA_TOKEN
  4. Add a team to your results with the figma add [teamurl] command.

Usage

alfred-figma

The workflow lists results of 3 items teams, projects and files.

Teams

  • Open team page.
  • + Remove team from workflow.
  • + Open team page in web browser.

Projects

  • Open project page.
  • + Open project page in web browser.

Files

  • Open file.
  • + Y OR shift Quicklook preview of the file.
  • + Duplicate file to your drafts.
  • + Open file in web browser.

Credits

License

MIT © Jon Rohan

alfred-figma's People

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

alfred-figma's Issues

QA for Alfred 4

I'm still waiting for a proper .alfredworkflow file I can use to easily install this workflow (since I still can't get it to install via npm). So as a two-fold it would be nice if you can make sure this works with Alfred 4 and then maybe release an .alfredworkflow file so we can easily install. :) Thanks!

Figma add [teamurl] doesn't seem to work

So excited to use this! There might be an issue with the last step: It looks like anything written after the add part of the command will initiate a Google search instead of adding team.

(Also, any hints on where to find the team url? I'm not sure where to grab this from, and I'm sure other folks will have the same question.)

image

image

Add install case when users don't have any workflows

Tried to install this workflow via the cli npm install --global alfred-figma but kept getting this error:

> [email protected] postinstall /Users/misolori/.nvm/versions/node/v8.9.4/lib/node_modules/alfred-figma
> alfy-init

{ Error: Command failed: alfred-link
Error: Workflow directory `/Users/misolori/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows` does not exist
    at pathExists.then.exists (/Users/misolori/.nvm/versions/node/v8.9.4/lib/node_modules/alfred-figma/node_modules/alfred-link/index.js:19:10)
    at <anonymous>


    at Promise.all.then.arr (/Users/misolori/.nvm/versions/node/v8.9.4/lib/node_modules/alfred-figma/node_modules/execa/index.js:236:11)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
  code: 1,
  killed: false,
  stdout: '',
  stderr: 'Error: Workflow directory `/Users/misolori/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows` does not exist\n    at pathExists.then.exists (/Users/misolori/.nvm/versions/node/v8.9.4/lib/node_modules/alfred-figma/node_modules/alfred-link/index.js:19:10)\n    at <anonymous>\n',
  failed: true,
  signal: null,
  cmd: 'alfred-link',
  timedOut: false }
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `alfy-init`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/misolori/.npm/_logs/2018-10-25T15_46_44_571Z-debug.log

Turns out that if you don't have any workflows installed there is no workflows directory in Alfred.alfredpreferences. When installed, this case should be added to avoid these errors.

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.