Skip to content

Can generate code of any structure according to your template

License

Notifications You must be signed in to change notification settings

265525/codegeneration-allcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#codegeneration-allcode

Code Generation Plugin Introduction

This code generation plugin is written using python jinja module, which is very simple and flexible, and can be changed according to your needs

how to use

  1. Install python3.9
  2. pip install -U Jinja2
  3. git clone https://github.com/265525/codegeneration-allcode.git
  4. Run demo.py

example

from utils. templatebase import TemplateInit
# home generation
home = TemplateInit()
home.render("index.txt",context={"title":"home test 1"})

# user module generation
user = TemplateInit()
user. setdirPath("user")
user.render("index.txt",context={"title":"One layer of yser test 2"})

# The login module under user is generated
user.setdirPath("user/login")
user.render("login.txt",context={"content":"Second-layer user test 3"})

MIT License

Copyright (c) 2023 br66

About

Can generate code of any structure according to your template

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages