EDIT I want to run a shell script that includes a Glyphs python script, so is possible to import Glyphs as a module?
I’ve found a post where Georg says that is not possible to run glyphs ‘headless’.
I will try to explain better. What I’m trying to do is automate exporting from a shell script. I already have a python script that automates this task but it requires to
Glyphs be open, so via Apple script I managed to open the App and now I want to run the python script (is not saved in the Glyphs script folder). I was wondering if is possible via Apple script to ‘paste’ the python code in the Macro window or open the .py file with Glyphs and then run the code. For instance in Robofont when you open a .py file it opens a Scripting window.
How should I set ExportContainer key? In the commented code says “ExportContiner” looks like a typo but I tried in several different ways but It doesn’t work for me, I cant manage to export woff, woff2 and eot. @GeorgSeifert could you please help me with this.
This is what I got,
for instance in font.instances():
print "Instance:", instance
instance.generate_({
'ExportContainer': "'woff', 'woff2', 'eot'",
'Destination': web_path
})