Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RafalBuchner/5affdfafc76785c637ea7c5d2a035787 to your computer and use it in GitHub Desktop.
Save RafalBuchner/5affdfafc76785c637ea7c5d2a035787 to your computer and use it in GitHub Desktop.
"atom-shell-commands":
commands: [
{
arguments: [
"-p"
"{FilePath}"
]
command: "roboFont"
name: "build robofont"
options:
keymap: "alt-r"
pwd: "{FileDir}"
}
]
@RafalBuchner
Copy link
Author

RafalBuchner commented Apr 29, 2019

Do you dislike the script editor inside Robofont? Ever wanted to run python scripts from the Atom and make them executed inside Robofont?
Install atom-shell-commands.
Add command entry to your atom-shell-commands configurations in the user config file by copying this text and putting it inside the Atom's config file (after '*:' line):

File->Open Your Config, or ~/.atom/config.cson

Before you use the Build system make sure you have installed Robofont as shell command by going to Robofont Preferences > Extensions > Shell and click on the install button. To make sure that it's installed correctly write robofont in the terminal and hit return. For Robofont shell command to work correctly you probably need to install PyObjC in terminal using pip3.

Now if you will hit option+r shortcut, it should run your script inside the RoboFont's Output Window.

Based on similar stuff by @typoman
typoman/Robofont.sublime-build

@ddaanniiieeelll
Copy link

I was very happy when I saw this yesterday, but somehow I can't make it work.
I think I followed all instructions properly:
installed atom-shell-commands
put the your text in the config file
downloaded pyobjc
allowed remote scripting in robofont and installed the shell command

Now from how I understood it a simple script like

f = CurrentFont() 
print(f)

should return the current font in robofonts output window when I run it in Atom.
Instead, in Atom, I get the error : 'CurrentFont()' is not defined and robofonts output window stays empty.
Any chance you could help me out with this?

@RafalBuchner
Copy link
Author

RafalBuchner commented May 5, 2019

how exactly you run the script? have you tried to do it by hitting option and "r" (that is the shortcut set in the config, that I shared)?

@ddaanniiieeelll
Copy link

Nevermind, while installing the shell command I checked Allow remote scripting but apparently I unchecked it again.
While Robofont stays installed as shell command remote scripting was simply disabled (because it still was installed it didn't occur to me to check if remote scripting is allowed).
Simple as that …
But thanks anyways

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment