Skip to content

Getting Started with ZenScript

Welcome to ZenScript, a simple tool for generating HTML documents using a user-friendly scripting language. Whether you're a beginner or an experienced web developer, ZenScript can help you create HTML content quickly and efficiently. This guide will walk you through the basics of getting started with ZenScript.

Installation

ZenScript is a Python-based program, so you'll need to have Python installed on your computer to use it. You can download and install Python from the official website: Python.org

Once Python is installed, you can download the ZenScript program from its GitHub repository: ZenScript GitHub Repository

Running ZenScript

After downloading the ZenScript program, navigate to the directory where you saved it using your command line interface or terminal. Then, run the program by executing the following command:

python zenscript.py

This will launch the ZenScript shell, and you can enter a ZenScript file path. Then you'll be ready to write ZenScript code.

Writing ZenScript Code

ZenScript code consists of simple commands and content that describe the structure and style of your HTML document. Here's a basic example of ZenScript code:

main
init
title Welcome to ZenScript
endinit
body
heading Hello World!
text Example text goes here
endbody
endmain

In this example, we're setting the title of the HTML document to "Welcome to ZenScript", and adding a heading and paragraph text.

Compiling ZenScript Code

Once you've written your ZenScript code, you can compile it into HTML format using the ZenScript interpreter. Simply follow these steps:

  1. Save your ZenScript code in a file with a .zs extension (e.g., example.zs).
  2. Run the ZenScript shell, then type the path to your ZenScript file.

  3. The ZenScript interpreter will process your code and generate an HTML file to the specified path based on the instructions provided.

Viewing the HTML Output

After compiling your ZenScript code, you can view the resulting HTML output in any web browser. Simply open the HTML file generated by the ZenScript interpreter to see your document rendered in the browser.

Getting Help

If you have any questions or need assistance while using ZenScript, feel free to consult the documentation included with the program or reach out to the community for support.

Congratulations! You're now ready to start creating HTML documents with ZenScript. Happy coding!