Skip to content

cxdy/j2live

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

J2Live

J2Live is a web-based application that allows users to edit and render Jinja2 templates with YAML variables. It provides a user-friendly interface with Monaco Editor for editing and rendering templates in real-time.

Features

  • YAML Editor: Edit YAML variables.
  • Jinja2 Editor: Edit Jinja2 templates.
  • Output Editor: View the rendered output.
  • Theme Selection: Switch between different themes (Everforest Dark, Nord).
  • FastAPI Integration: Built on top of FastAPI for backend services.
  • NiceGUI Integration: Utilizes NiceGUI for the frontend components.

Installation

Using Docker

  1. Build the Docker image:

    docker build -t j2live .
  2. Run the Docker container:

    docker run -p 8000:8000 j2live

The above will pull directly from this repository to build the image. If you want to build from your fork, it's almost the same:

  1. Build the Docker image:

    docker build -t j2live --build-arg BUILD_MODE=local .
  2. Run the Docker container:

    docker run -p 8000:8000 j2live

Locally

  1. Create a virtual environment:

    python3 -m venv venv
  2. Activate the virtual environment:

    source venv/bin/activate
  3. Clone the repository (as so static files are accessible)

    git clone https://github.com/martydingo/j2live.git
  4. Install J2Live:

    pip3 install git+https://github.com/martydingo/j2live
  5. Run J2Live:

    python3 -m j2live

Usage

  1. Open your web browser and navigate to http://localhost:8000.
  2. Use the YAML Editor to input your YAML variables.
  3. Use the Jinja2 Editor to input your Jinja2 template.
  4. The rendered output will be displayed in the Output Editor in realtime.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Authors

For more information, please refer to the documentation.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 88.1%
  • CSS 6.4%
  • Dockerfile 5.5%