Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
"atom-shell-commands":
commands: [
{
arguments: [
"-p"
"{FilePath}"
]
command: "roboFont"
name: "build robofont"
options:
keymap: "alt-r"
pwd: "{FileDir}"
}
]
@RafalBuchner

This comment has been minimized.

Copy link
Owner Author

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

This comment has been minimized.

Copy link

commented Apr 30, 2019

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

This comment has been minimized.

Copy link
Owner Author

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

This comment has been minimized.

Copy link

commented May 6, 2019

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
You can’t perform that action at this time.