* Setup - Edit > Preferences > Folders > Scripts - Add this repo to the list - Adjust the order to the following, so that the repo comes first: - =path/to/this/repo= - =$HOME/.config/GIMP//scripts= - =/usr/share/gimp//scripts= * TODO More convenient development ** Docs - Filters > Script-Fu > Console > Browse - https://docs.gimp.org/2.10/en_US/gimp-filters-script-fu.html - https://docs.gimp.org/en/gimp-scripting.html - No copy-paste in the API browser sadly ** Reloading - Filters > Script-Fu > Refresh Scripts ** Debugging - =(tracing 1)= is a welcome surprise, though of limited use (it prints a lot of things and the GUI window overflows, so it needs to be used sparingly) - Things can be printed to =stderr=, printing to =stdout= doesn't seem to have any effect whatsoever * TODO Server - There is a socket server, could it be used to write an Emacs integration? - https://github.com/sonota88/script-fu-shell - https://github.com/pft/gimpmode * Tinyscheme ** GIMP-specific foreign procedures/variables/constants *** How to find them - =scheme_define= in the script-fu sources - Foreign procedures use =mk_foreign_func= - Foreign variables/constants do not *** TODO scheme-wrapper.c - SF-RUN-MODE - gimp-directory - gimp-data-directory - gimp-plug-in-directory - gimp-locale-directory - gimp-sysconf-directory - MIN-IMAGE-SIZE - MAX-IMAGE-SIZE - MIN-RESOLUTION - MAX-RESOLUTION - TRUE - FALSE - UNIT-PIXEL - UNIT-INCH - UNIT-MM - UNIT-POINT - UNIT-PICA - SF-IMAGE - SF-DRAWABLE - SF-LAYER - SF-CHANNEL - SF-VECTORS - SF-COLOR - SF-TOGGLE - SF-VALUE - SF-STRING - SF-FILENAME - SF-DIRNAME - SF-ADJUSTMENT - SF-FONT - SF-PATTERN - SF-BRUSH - SF-GRADIENT - SF-OPTION - SF-PALETTE - SF-TEXT - SF-ENUM - SF-DISPLAY - SF-SLIDER - SF-SPINNER - DIR-SEPARATOR - SEARCHPATH-SEPARATOR - GIMP_* - script-fu-register - script-fu-menu-register - script-fu-quit - gimp-proc-db-call *** TODO ftx/ftx.c - Docs at gimp/plugins/script-fu/ftx/README - Seems to lag behind upstream which provides socket APIs and =system= - getenv - time - gettimeofday - usleep - file-exists? - file-type - file-size - file-delete - dir-open-stream - dir-read-entry - dir-rewind - dir-close-stream - FILE-TYPE-UNKNOWN - FILE-TYPE-FILE - FILE-TYPE-DIR - FILE-TYPE-LINK *** TODO script-fu-regex.c - =re-match= - There's commented out Scheme code for working with the returned result ** GIMP-specific Scheme procedures/variables/constants *** TODO /usr/share/gimp//scripts **** TODO script-fu-compat.init RNG stuff **** TODO script-fu-util.scm **** TODO script-fu.init The bulk ** Useful GIMP extensions *** TODO /usr/share/gimp//scripts/gimp-online.scm ** GIMP-specific init file - script-fu.init (sort of deprecated: script-fu-compat.init, plug-in-compat.init) - They're looked up in the search path which is a gimprc setting defaulting to the user path first, then the system path - Search path lookup loads the files from the first matching directory - Therefore, to have both user and system stuff loaded up, the user stuff needs to be moved to the beginning of the search path and replicate the search path logic to load the system stuff... ** Undocumented Tinyscheme features *** scheme.c **** TODO Init file init.scm TINYSCHEMEINIT *** TODO opdefines.h