https://github.com/bentimor/straw
A new client-side programming language
https://github.com/bentimor/straw
client client-side html programming-languages python python3 template template-engine template-engine-html templates
Last synced: about 17 hours ago
JSON representation
A new client-side programming language
- Host: GitHub
- URL: https://github.com/bentimor/straw
- Owner: BenTimor
- License: mit
- Created: 2020-06-03T17:43:44.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-08-10T12:53:04.000Z (almost 6 years ago)
- Last Synced: 2026-01-13T19:52:18.552Z (6 months ago)
- Topics: client, client-side, html, programming-languages, python, python3, template, template-engine, template-engine-html, templates
- Language: Python
- Homepage:
- Size: 49.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Straw - a Template Engine Structure
Straw is a Python project which is created so I'll be able to develop it again in another programming languages.
I'm developing this project again and again in another languages because it's simple enough to develop when I'm new to the language, but advanced enough so I'll be able to learn something.
[More information for Hebrew speakers on my blog.](https://bentimor.com/straw/)
[Straw in Rust programming language](https://github.com/BenTimor/IronStraw)
Currently, this project is totally abandoned and I'm not working on it, I just use it as a structure.
## Requirements
- Python 3.x
## Installation and Usage
We're on pip!
You can install Straw easily via the following command:
pip install StrawEngine
Now, if you want to 'compile' a file, you can do it via the following command:
straw file(,file2,file3...)
## Tutorial
You can read the tutorial in the [tutorial](https://github.com/BenTimor/Straw/tree/master/tutorial) folder.
## Code Example
Straw code:
head
title This is my website!
body
center
h1 Hello! :)
p Welcome to my website. Love you.
^note I'm adding the safe so it won't close the p tag.
@safe
I have nothing to say anymore.
^note It's a stupid idea but I like it
@eval
return "Credit - Ben Timor, https://bentimor.com"
Compiling into the HTML code:
This is my website!
Hello! :)
Welcome to my website. Love you.
I have nothing to say anymore.
Credit - Ben Timor, https://bentimor.com