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
- Host: GitHub
- URL: https://github.com/aconchillo/gas
- Owner: aconchillo
- Created: 2022-01-21T07:16:52.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-08T06:26:00.000Z (over 4 years ago)
- Last Synced: 2025-10-04T21:49:51.289Z (9 months ago)
- Language: Scheme
- Homepage:
- Size: 563 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- Changelog: NEWS
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]]