Repository navigation
Installation
| Needed for | |
|---|---|
| Python 3.11+ | divide itself |
PHP 8 (the php command) |
rendering, and checking includes |
Div (divengine/div) |
rendering, and checking includes |
| Xdebug (optional) | the PHP [[debugger |
Editing, highlighting, completion and most checks work with Python alone. Everything that needs to know what Div would do (rendering, resolving {% includes %}) asks the real engine, so it needs PHP and Div.
From the repository, as a command for your user:
git clone https://github.com/divengine/divide.git
cd divide
tools/install.shtools/install.sh creates the checkout's .venv if needed, installs divide there (editable) and links the divide command in ~/.local/bin (or the folder you give it: tools/install.sh /usr/local/bin). Then, in any folder:
cd ~/sites/my-project
divide # the folder is the project
divide page.tpl # a file: its folder is the projectgit pull in the checkout updates the command. To remove it, delete the link.
Or as an isolated command with pipx:
pipx install git+https://github.com/divengine/divide.git
divide --helpThe usual way is Composer, in the project that holds your templates:
composer require divengine/divdivide finds the engine by itself, in this order:
- the
DIVIDE_DIV_PHPenvironment variable: avendor/autoload.php, or a Div checkout'ssrc/div.php(with itsvendor/installed); - the path set in Options > Div engine… (saved in
~/.config/divide/config.json); - a
vendor/autoload.phpwithvendor/divengine/div, looking upwards from the template and from the project folder.
If none is found, Ctrl+F9 on a template explains what to do, and include checks are simply skipped.
divide # the current folder as the project, project window open
divide ~/sites/shop # another folder as the project
divide index.tpl card.tpl # open files (their folder becomes the project)
divide ~/sites/shop index.tpl
divide --palette turbo-c # Turbo C colours instead of Turbo Pascal'sUse a terminal at least 80×25; 120 columns or more is comfortable for working side by side with the output.
Next: Getting Started.
divide · part of Divengine · report an issue
Manual
- The Desktop
- Editing Templates
- Editing PHP
- Outline
- Finding Files and Commands
- Language Servers
- Completion
- Checking Templates
- Rendering
- Render Trace
- Running PHP
- Running Flows
- Flow Structure
- Flow Designer
- Flow Functions
- Flow Simulation
- Function Mock Simulation
- Debugging PHP
- Web Server
- Data Files
- Other Files
- Project Window
- Div Setup
- Dialector
- Translating Templates
- Composer
- Git
Reference
Links