Recursive Directory Processing

include.sh logo include_processor

Automate the expansion of your modular project structure. Recursively transform .include.* files into fully rendered documents in a mirrored output directory.

Powerful Automation

Turning a directory of fragments into a complete website in one command.

Mirrored Structure

Maintains your original directory hierarchy perfectly within the generated _included/ folder.

Smart Extensions

Automatically strips .include. from filenames, converting index.include.html to index.html.

Fragment Exclusion

Files and folders starting with _ are ignored, allowing you to keep templates and partials tidy.

Core Integration

Built on top of include.sh, inheriting its recursive power and reliability.

From Fragments to Final Documents

The processor acts as a build system for any text-based projects. It finds every file that needs processing, expands its includes, and places the result in the output folder.

Recursive scan of all subdirectories

Direct copy for static assets like CSS and images

Automated output directory management

Defaults to current working directory if no path is provided

bash — 80x24
# Input structure (Example):
my_project/
├── _header.txt
├── main.include.txt
└── docs/
└── guide.include.txt
❯ include_processor my_project
Processing complete. Output saved to my_project/_included
# Resulting structure:
my_project/_included/
├── main.txt
└── docs/
└── guide.txt

Requirements

Bash
find
mkdir
include.sh

Installation

Prerequisite: This tool requires the include command to be installed system-wide. Please ensure it is installed first. You can find more details on the main page.

Step 1
# Download the script
curl -L https://include-sh.codeberg.page/include_processor.sh -o include_processor.sh
Step 2
# Make executable
chmod +x include_processor.sh
Step 3
# Install system-wide
sudo cp include_processor.sh /usr/local/bin/include_processor
sudo chmod +x /usr/local/bin/include_processor