SYNOPSISnotionflux [-e code]
notionflux allows you to access the notion lua scripting interface from the command-line. It either takes a script from stdin or through the '-e' parameter.
The lua script will be executed by the Lua engine running in Notion, which means it has access to the Notion lua api (notioncore.* et al). Calls to 'print' will print values to Notion's stdout (e.g. ~/.xsession-errors). The scripts' return value will be printed by notionflux
- -e code
Lua code to execute.
The notionflux socket is created with read/write permissions only for the user who started notion(1). Neither notion(1) nor notionflux are setuid(2), so notionflux should not pose any security threat.
EXAMPLESWrite 'foo' to notion(1)'s stdout and 'bar' to the terminal, specifying the script on the commandline:
- $ notionflux -e "print('foo'); return 'bar'" "bar"
Or the same, but now via STDIN:
- $ echo "print('foo'); return 'bar'" | notionflux "bar"
AUTHORNotionflux was written by the Notion team, based on ionflux which was written by Tuomo Valkonen <tuomov at iki.fi>.