Add Docker documentation tools container with pandoc, mdbook, typst, latex, spell checking, and reading time estimation
This commit is contained in:
62
AGENTS.md
Normal file
62
AGENTS.md
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
# AIOS-Public Agents
|
||||||
|
|
||||||
|
This document tracks the various agents, tools, and systems used in the AIOS-Public project.
|
||||||
|
|
||||||
|
## Documentation Tools
|
||||||
|
|
||||||
|
### RCEO-AIOS-Public-Tools-DocMaker
|
||||||
|
|
||||||
|
**Purpose**: Documentation generation container with multiple document conversion tools.
|
||||||
|
|
||||||
|
**Container/Stack Name**: RCEO-AIOS-Public-Tools-DocMaker
|
||||||
|
|
||||||
|
**Technology Stack**:
|
||||||
|
- Base: Debian Bookworm slim
|
||||||
|
- Bash
|
||||||
|
- Python 3
|
||||||
|
- Node.js
|
||||||
|
- Rust (with Cargo)
|
||||||
|
- Pandoc
|
||||||
|
- LaTeX (Full)
|
||||||
|
- mdBook (installed via Cargo)
|
||||||
|
- mdbook-pdf (installed via Cargo)
|
||||||
|
- Typst
|
||||||
|
- Marp CLI
|
||||||
|
- Spell/Grammar checking:
|
||||||
|
- Hunspell (with en-US dictionary)
|
||||||
|
- Aspell (with en dictionary)
|
||||||
|
- Vale (style and grammar linter)
|
||||||
|
- Reading time estimation: mdstat
|
||||||
|
- Additional text processing tools
|
||||||
|
|
||||||
|
**Usage**: This container/stack should be used for projects that need to generate finished documentation in various formats (PDF, HTML, presentations, etc.).
|
||||||
|
|
||||||
|
**Docker Configuration**:
|
||||||
|
- Located in the `Docker/` directory
|
||||||
|
- Includes Dockerfile and docker-compose.yml
|
||||||
|
- Maps the project root directory to `/workspace` inside the container
|
||||||
|
- Can be run with `docker-compose up` from the Docker directory
|
||||||
|
|
||||||
|
**Commands to run**:
|
||||||
|
```bash
|
||||||
|
# Build and start the container
|
||||||
|
cd Docker
|
||||||
|
docker-compose up --build
|
||||||
|
|
||||||
|
# Or to run commands directly
|
||||||
|
docker-compose run docmaker [command]
|
||||||
|
|
||||||
|
# Example usage of documentation tools:
|
||||||
|
|
||||||
|
# Spell checking with hunspell
|
||||||
|
docker-compose run docmaker hunspell -d en_US document.md
|
||||||
|
|
||||||
|
# Grammar/style checking with Vale
|
||||||
|
docker-compose run docmaker vale document.md
|
||||||
|
|
||||||
|
# Reading time estimation
|
||||||
|
docker-compose run docmaker python3 -m mdstat document.md
|
||||||
|
|
||||||
|
# Check spelling with aspell
|
||||||
|
docker-compose run docmaker aspell -c document.md
|
||||||
|
```
|
||||||
69
Docker/RCEO-AIOS-Public-Tools-DocMaker/Dockerfile
Normal file
69
Docker/RCEO-AIOS-Public-Tools-DocMaker/Dockerfile
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
FROM debian:bookworm-slim
|
||||||
|
|
||||||
|
# Avoid prompts from apt
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Install base packages
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
bash \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
git \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
nodejs \
|
||||||
|
npm \
|
||||||
|
build-essential \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Create symbolic link for python
|
||||||
|
RUN ln -s /usr/bin/python3 /usr/bin/python
|
||||||
|
|
||||||
|
# Install Rust
|
||||||
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||||
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||||
|
|
||||||
|
# Install Pandoc
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
pandoc \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install LaTeX (full version)
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
texlive-full \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install mdBook and mdbook-pdf using cargo
|
||||||
|
RUN cargo install mdbook mdbook-pdf
|
||||||
|
|
||||||
|
# Install Typst
|
||||||
|
RUN curl -L https://github.com/typst/typst/releases/latest/download/typst-x86_64-unknown-linux-musl.tar.xz \
|
||||||
|
| tar xJ -C /tmp && cp /tmp/typst /usr/local/bin && chmod +x /usr/local/bin/typst
|
||||||
|
|
||||||
|
# Install Marp CLI
|
||||||
|
RUN npm install -g @marp-team/marp-cli
|
||||||
|
|
||||||
|
# Install spell/grammar checking tools
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
hunspell \
|
||||||
|
hunspell-en-us \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install vale for advanced style and grammar checking
|
||||||
|
RUN curl -L https://github.com/errata-ai/vale/releases/latest/download/vale_Linux_64-bit.tar.gz \
|
||||||
|
| tar xz -C /tmp && cp /tmp/vale /usr/local/bin && chmod +x /usr/local/bin/vale
|
||||||
|
|
||||||
|
# Install text statistics tool for reading time estimation
|
||||||
|
RUN pip3 install mdstat
|
||||||
|
|
||||||
|
# Install additional text processing tools
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
aspell \
|
||||||
|
aspell-en \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Create a working directory
|
||||||
|
WORKDIR /workspace
|
||||||
|
|
||||||
|
# Default command
|
||||||
|
CMD ["/bin/bash"]
|
||||||
80
Docker/RCEO-AIOS-Public-Tools-DocMaker/README.md
Normal file
80
Docker/RCEO-AIOS-Public-Tools-DocMaker/README.md
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
# RCEO-AIOS-Public-Tools-DocMaker Container
|
||||||
|
|
||||||
|
This container is part of the AIOS-Public project and provides a comprehensive documentation generation environment.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
The RCEO-AIOS-Public-Tools-DocMaker container is designed for documentation generation tasks. It includes a wide range of tools for creating, converting, and processing documentation in various formats.
|
||||||
|
|
||||||
|
## Tools Included
|
||||||
|
|
||||||
|
### Core Tools
|
||||||
|
- **Base OS**: Debian Bookworm slim
|
||||||
|
- **Shell**: Bash
|
||||||
|
- **Programming Languages**:
|
||||||
|
- Python 3
|
||||||
|
- Node.js
|
||||||
|
- Rust (with Cargo)
|
||||||
|
|
||||||
|
### Documentation Generation
|
||||||
|
- **Pandoc**: Universal document converter
|
||||||
|
- **mdBook**: Create books from Markdown files
|
||||||
|
- **mdbook-pdf**: PDF renderer for mdBook
|
||||||
|
- **Typst**: Modern typesetting system
|
||||||
|
- **Marp CLI**: Create presentations from Markdown
|
||||||
|
|
||||||
|
### LaTeX
|
||||||
|
- **TeX Live Full**: Complete LaTeX distribution for advanced document typesetting
|
||||||
|
|
||||||
|
### Spell and Grammar Checking
|
||||||
|
- **Hunspell**: Spell checker (with en-US dictionary)
|
||||||
|
- **Aspell**: Spell checker (with en dictionary)
|
||||||
|
- **Vale**: Syntax-aware linter for prose
|
||||||
|
|
||||||
|
### Text Analysis
|
||||||
|
- **mdstat**: Text statistics including reading time estimation
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Building the container
|
||||||
|
```bash
|
||||||
|
# From the Docker directory
|
||||||
|
cd /home/localuser/AIWorkspace/AIOS-Public/Docker
|
||||||
|
docker-compose build docmaker
|
||||||
|
```
|
||||||
|
|
||||||
|
### Running the container
|
||||||
|
```bash
|
||||||
|
# Start an interactive session
|
||||||
|
docker-compose run docmaker
|
||||||
|
|
||||||
|
# Run a specific command
|
||||||
|
docker-compose run docmaker [command]
|
||||||
|
|
||||||
|
# Example: Convert a Markdown file to PDF using pandoc
|
||||||
|
docker-compose run docmaker pandoc input.md -o output.pdf
|
||||||
|
|
||||||
|
# Example: Check spelling in a document
|
||||||
|
docker-compose run docmaker hunspell -d en_US document.md
|
||||||
|
|
||||||
|
# Example: Generate reading time statistics
|
||||||
|
docker-compose run docmaker python3 -m mdstat document.md
|
||||||
|
```
|
||||||
|
|
||||||
|
### Using with docker-compose
|
||||||
|
```bash
|
||||||
|
# Build and start the container in one command
|
||||||
|
docker-compose up --build
|
||||||
|
|
||||||
|
# Start without rebuilding
|
||||||
|
docker-compose up
|
||||||
|
```
|
||||||
|
|
||||||
|
## Volumes
|
||||||
|
|
||||||
|
The container maps:
|
||||||
|
- Project root (`/home/localuser/AIWorkspace/AIOS-Public`) to `/workspace` inside the container (mapped as `../../` from the container directory)
|
||||||
|
|
||||||
|
## Purpose
|
||||||
|
|
||||||
|
This container should be used for projects that need to generate finished documentation in various formats (PDF, HTML, presentations, etc.) with integrated spell/grammar checking and reading time estimation.
|
||||||
15
Docker/RCEO-AIOS-Public-Tools-DocMaker/docker-compose.yml
Normal file
15
Docker/RCEO-AIOS-Public-Tools-DocMaker/docker-compose.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
docmaker:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
container_name: RCEO-AIOS-Public-Tools-DocMaker
|
||||||
|
image: rceo-aios-public-tools-docmaker:latest
|
||||||
|
volumes:
|
||||||
|
- ../../:/workspace:rw
|
||||||
|
working_dir: /workspace
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
command: /bin/bash
|
||||||
38
Docker/README.md
Normal file
38
Docker/README.md
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
# AIOS-Public Docker Documentation Tools
|
||||||
|
|
||||||
|
This directory contains Docker configurations for documentation generation tools in the AIOS-Public project.
|
||||||
|
|
||||||
|
## Container Structure
|
||||||
|
|
||||||
|
Each container has its own subdirectory with specific configuration files:
|
||||||
|
|
||||||
|
- `RCEO-AIOS-Public-Tools-DocMaker/` - Comprehensive documentation generation environment
|
||||||
|
|
||||||
|
## Available Containers
|
||||||
|
|
||||||
|
### RCEO-AIOS-Public-Tools-DocMaker
|
||||||
|
A container with a full suite of documentation tools including:
|
||||||
|
- Pandoc, mdBook, Typst, Marp for document conversion
|
||||||
|
- LaTeX for typesetting
|
||||||
|
- Spell/grammar checking tools (Hunspell, Aspell, Vale)
|
||||||
|
- Reading time estimation (mdstat)
|
||||||
|
- Programming languages (Python, Node.js, Rust)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
### Building and Running Individual Containers
|
||||||
|
Each container has its own subdirectory with its Dockerfile and docker-compose.yml file.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Navigate to the specific container directory
|
||||||
|
cd /home/localuser/AIWorkspace/AIOS-Public/Docker/RCEO-AIOS-Public-Tools-DocMaker
|
||||||
|
|
||||||
|
# Build the container
|
||||||
|
docker-compose build
|
||||||
|
|
||||||
|
# Run the container
|
||||||
|
docker-compose up --build
|
||||||
|
```
|
||||||
|
|
||||||
|
### Individual Container Documentation
|
||||||
|
For specific usage information for each container, see the README files in their respective subdirectories.
|
||||||
Reference in New Issue
Block a user