Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Execute all Zencode from Zenroom and Slangroom plugins in one shot

Notifications You must be signed in to change notification settings

dyne/slangroom-exec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Slangroom-exec

The missing slangroom executor




โœจ Slangroom-exec features

slangroom-exec is a simple utility that reads from STDIN the following content

  1. conf
  2. slangroom-contract
  3. data
  4. keys
  5. extra
  6. context

separated each per new-line and encoded in base64 (it seems difficult, but slexfe helper tool is here for that) and outputs the slangroom execution to stoud.

Slangroom-exec Demo



๐ŸŽฎ Quick start

Slangroom-exec is in mise and can be installed from it or directly from github releases:

# download the executable from mise
mise use "aqua:dyne/slangroom-exec"
# or from github releases
wget https://github.com/dyne/slangroom-exec/releases/latest/download/slangroom-exec-$(uname)-$(uname -m) -O ~/.local/bin/slangroom-exec && chmod +x ~/.local/bin/slangroom-exec

# execute a simple slangroom contract
wget -qO - https://raw.githubusercontent.com/dyne/slangroom-exec/main/test/fixtures/welcome.slex | slangroom-exec

๐Ÿ” back to top


๐Ÿ’พ Build

To be able to build slangroom-exec you need the following dependencies to be available in your PATH:

You can install them by hand or use mise and run mise install in the root of the repository.

You can build the executable following the steps:

# clone the repository and enter in it
git clone https://github.com/dyne/slangroom-exec
cd slangroom-exec

# if you decided to use mise now run: mise install

# build the executable
make slangroom-exec

๐Ÿ” back to top


๐Ÿช› Slexfe

The SLangroom-EXec Format Encode (aka slexfe) script is used to encode the human readable input of slangroom-exec, i.e.

  • the slangroom configuration
  • the slangroom contract
  • the slangroom keys/data/extra/context

into the base64 multiline encoded machine-readable version of it and the result is printed to stdout.

๐Ÿ’พ Install

Slexfe can be installed directly from github releases:

wget https://github.com/dyne/slangroom-exec/releases/latest/download/slexfe -O ~/.local/bin/slexfe && chmod +x ~/.local/bin/slexfe

๐Ÿงฉ Usage

As said before slexfe can take in input up to 6 files and they should be iondicated with the right flag:

-c  for conf
-s  for slangroom-contract
-d  for data
-k  for keys
-e  for extra
-x  for context

If all the files have the same name and they follow the slangroom name contention, that is:

  • conf: ${name}.conf
  • slangroom-contract: ${name}.slang
  • data: ${name}.data.json
  • keys: ${name}.keys.json
  • extra: ${name}.extra.json
  • context: ${name}.context

you can use the -F flag. So for example

slexfe -c hello.conf -s hello.slang -d hello.data.json -k hello.keys.json -e hello.extra.json -x hello.context

will be equal to

slexfe -F hello

Pay attention, this works also when not all the files are definted.

A last feature to help in the easier cases, when something is passed in /dev/stdin to slexfe, e.g.:

cat hello.slang | slexfe

it is interpreted as the slangroom contract. This also overwrites the --slangroom-contract option flag if passed as a duplicate.

๐Ÿ” back to top


๐Ÿ› Troubleshooting & debugging

Availabe bugs are reported via GitHub issues.

๐Ÿ” back to top


๐Ÿ˜ Acknowledgements

Copyright ยฉ 2024-2025 by Dyne.org foundation, Amsterdam.

๐Ÿ” back to top


๐Ÿ‘ค Contributing

  1. ๐Ÿ”€ FORK IT
  2. Create your feature branch git checkout -b feature/branch
  3. Commit your changes git commit -am 'feat: New feature\ncloses #398'
  4. Push to the branch git push origin feature/branch
  5. Create a new Pull Request gh pr create -f
  6. ๐Ÿ™ Thank you

๐Ÿ” back to top


๐Ÿ’ผ License

Slangroom-exec - The missing slangroom executor
Copyleft ๐Ÿ„ฏ 2024-2025 Dyne.org foundation, Amsterdam

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

๐Ÿ” back to top

About

Execute all Zencode from Zenroom and Slangroom plugins in one shot

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors 6