An open API service indexing awesome lists of open source software.

https://github.com/aconchillo/gas

Mac Scripting with GuileScript
https://github.com/aconchillo/gas

Last synced: 5 months ago
JSON representation

Mac Scripting with GuileScript

Awesome Lists containing this project

README

          

* gas

gas is a tool that allows writing [[https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/][Mac Scripting]] applications with [[https://github.com/aconchillo/guilescript][GuileScript]].

This project is in a very primitive state since it depends on GuileScript which
is totally a work-in-progress. I actually started GuileScript in order to be
able to create gas after seeing [[https://twitter.com/zaneshelby/status/1477988369154121734?s=20][obb]], a very cool ClojureScript project.

[[./gas.gif]]

* Installation

You can clone the repo and run:

#+BEGIN_EXAMPLE
$ make install
#+END_EXAMPLE

But it's probably better if you install it through [[https://github.com/aconchillo/homebrew-guile][Guile Homebrew]]:

#+BEGIN_EXAMPLE
$ brew install aconchillo/guile/gas
#+END_EXAMPLE

* Examples

There's only a couple of examples right now, you can try:

#+BEGIN_EXAMPLE
$ gas examples/choices.gs
#+END_EXAMPLE

* Running things from the command line

It is also possible to evaluate simple code from the command line. For example,
you can play and pause your Spotify app with this:

#+BEGIN_EXAMPLE
$ gas -e '(js-invoke (Application "Spotify") playpause)
#+END_EXAMPLE

* Creating a macOS app

Another sweet thing you can do is create a macOS app:

#+BEGIN_EXAMPLE
$ gas -a Choices.app examples/choices.gs
#+END_EXAMPLE

[[./gas-app.gif]]