https://github.com/andrejewski/sprose
S-expressive prose language
https://github.com/andrejewski/sprose
Last synced: 3 months ago
JSON representation
S-expressive prose language
- Host: GitHub
- URL: https://github.com/andrejewski/sprose
- Owner: andrejewski
- License: isc
- Created: 2015-08-26T04:36:08.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-31T00:20:32.000Z (over 10 years ago)
- Last Synced: 2025-04-26T05:19:13.117Z (9 months ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sprose
Sprose is an embeddable programming language for plain text.
Essentially, a given text file is parsed into a series of expressions.
These expressions (S-expressions) are evaluated and their results are
are inserted into the text in place of the expressions.
The cool thing is that is all Sprose does. Literally everything else is
completely customizable.
Sprose expressions can be nested, create variables and namespaces, define
functions, and anything else really.
```bash
npm install sprose
```
## Example
A Sprose program needs two files, the text file which contains the expressions
to evaluate and a JavaScript module which contains the functions and variables
accessible by the text file.
```
This is a text file.
I can use (uppercase words in here).
```
```js
module.exports = {
uppercase: function(scope, args) {
return sprose.util.stringify(args).toUpperCase();
}
};
```
```
This is a text file.
I can use WORDS IN HERE.
```