Jelajahi Sumber

[#1] Fix PDF fonts layout margins and installation guide steps

Lange François 2 minggu lalu
induk
melakukan
c9d2d702a5
35 mengubah file dengan 39 tambahan dan 75 penghapusan
  1. TEMPAT SAMPAH
      Project.pdf
  2. TEMPAT SAMPAH
      Retro Planning.pdf
  3. TEMPAT SAMPAH
      delivery.zip
  4. TEMPAT SAMPAH
      docs/Backup_Procedure.pdf
  5. TEMPAT SAMPAH
      docs/Data_Ingestion.pdf
  6. TEMPAT SAMPAH
      docs/Final_Report.pdf
  7. 12 25
      docs/Installation_Guide.md
  8. TEMPAT SAMPAH
      docs/Installation_Guide.pdf
  9. TEMPAT SAMPAH
      docs/Operator_Installation_Guide.pdf
  10. TEMPAT SAMPAH
      docs/Scrum_Artifacts.pdf
  11. TEMPAT SAMPAH
      docs/Scrum_Daily.pdf
  12. TEMPAT SAMPAH
      docs/Scrum_Plan.pdf
  13. TEMPAT SAMPAH
      docs/Scrum_Retro.pdf
  14. TEMPAT SAMPAH
      docs/Scrum_Review.pdf
  15. TEMPAT SAMPAH
      docs/Scrum_Wiki.pdf
  16. TEMPAT SAMPAH
      docs/Start_Stop_Procedures.pdf
  17. TEMPAT SAMPAH
      docs/Technical_Document.pdf
  18. TEMPAT SAMPAH
      docs/Test_Cases_Sprint8.pdf
  19. TEMPAT SAMPAH
      docs/URL_Formats.pdf
  20. TEMPAT SAMPAH
      docs/Uninstall_Guide.pdf
  21. TEMPAT SAMPAH
      docs/User_Description.pdf
  22. TEMPAT SAMPAH
      docs/User_Guide.pdf
  23. TEMPAT SAMPAH
      docs/WSL_Deployment.pdf
  24. TEMPAT SAMPAH
      docs/Wiki_Home.pdf
  25. TEMPAT SAMPAH
      docs/architecture.pdf
  26. TEMPAT SAMPAH
      docs/disaster_recovery_plan.pdf
  27. TEMPAT SAMPAH
      docs/distributed_deployment.pdf
  28. TEMPAT SAMPAH
      docs/docker_connection.pdf
  29. 3 3
      docs/project_report.md
  30. TEMPAT SAMPAH
      docs/project_report.pdf
  31. TEMPAT SAMPAH
      docs/retro_planning.pdf
  32. TEMPAT SAMPAH
      docs/taiga_audit_report.pdf
  33. TEMPAT SAMPAH
      docs/zabbix_monitoring.pdf
  34. 12 25
      generate_docs.py
  35. 12 22
      scripts/generate_pdfs.py

TEMPAT SAMPAH
Project.pdf


TEMPAT SAMPAH
Retro Planning.pdf


TEMPAT SAMPAH
delivery.zip


TEMPAT SAMPAH
docs/Backup_Procedure.pdf


TEMPAT SAMPAH
docs/Data_Ingestion.pdf


TEMPAT SAMPAH
docs/Final_Report.pdf


+ 12 - 25
docs/Installation_Guide.md

@@ -37,47 +37,33 @@ To install Docker directly inside your WSL Ubuntu instance (without Docker Deskt
 sudo apt remove -y docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc
 ```
 
-### Step 2.2: Add Docker's Official GPG Key & Repository
+### Step 2.2: Add Docker's Official GPG Key & Repository and Install Docker
 ```bash
 sudo apt update
 sudo apt install -y ca-certificates curl
-sudo install -m 0755 -d /etc/apt/keyrings
 sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
-sudo chmod a+r /etc/apt/keyrings/docker.asc
-
-sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
-Types: deb
-URIs: https://download.docker.com/linux/ubuntu
-Suites: \$(. /etc/os-release && echo "\${UBUNTU_CODENAME:-\$VERSION_CODENAME}")
-Components: stable
-Architectures: \$(dpkg --print-architecture)
-Signed-By: /etc/apt/keyrings/docker.asc
-EOF
+echo "deb [arch=\$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu jammy stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
+sudo apt-get update
+sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
 ```
 
-### Step 2.3: Install Docker Components
-```bash
-sudo apt update
-sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
-```
-
-### Step 2.4: Start and Enable Docker Daemon
+### Step 2.3: Start and Enable Docker Daemon
 ```bash
 sudo systemctl start docker
 sudo systemctl enable docker
 ```
 
-### Step 2.5: Add User to the Docker Group
+### Step 2.4: Add User to the Docker Group
 Ensure you can execute Docker commands without `sudo`:
 ```bash
 grep "^docker:" /etc/group || sudo addgroup docker
-sudo usermod -aG docker \$USER
+sudo usermod -aG docker $USER
 ```
 
-### Step 2.6: Reboot the WSL Instance
+### Step 2.5: Reboot the WSL Instance
 Execute the command below inside WSL to gracefully reboot the instance:
 ```bash
-cd /mnt/c/ && cmd.exe /c start "rebooting WSL" cmd /c "timeout 5 && wsl -d \$WSL_DISTRO_NAME" && wsl.exe --terminate \$WSL_DISTRO_NAME
+cd /mnt/c/ && cmd.exe /c start "rebooting WSL" cmd /c "timeout 5 && wsl -d $WSL_DISTRO_NAME" && wsl.exe --terminate $WSL_DISTRO_NAME
 ```
 
 Upon reconnecting, verify Docker is running by starting the hello-world container:
@@ -111,7 +97,7 @@ echo "\$ a
 [network]
 generateResolvConf = false
 .
-w
+W
 q" | sudo ed /etc/wsl.conf
 ```
 
@@ -125,6 +111,7 @@ There are two repositories configured for this project:
 
 Clone the primary repository inside your home directory:
 ```bash
+cd ~
 git clone https://git.btshub.lu/lanfr/LocalFoodAI_lanfr144.git
 cd LocalFoodAI_lanfr144
 ```
@@ -160,7 +147,7 @@ chmod +x data_sync.sh backup_db.sh manage_services.sh scripts/manage_models.sh
 
 Follow the standard runbook to initialize credentials and launch services:
 ```bash
-# 1. Create a local .env file based on step 3 guidelines
+# 1. Create a local [.env file](file:///C:/Users/lanfr144/Documents/DOPRO1/Antigravity/Food/.env) based on [step 3 guidelines](#3-network-configuration--performance-tuning)
 # 2. Run the service manager to spin up containers
 ./manage_services.sh start
 ```

TEMPAT SAMPAH
docs/Installation_Guide.pdf


TEMPAT SAMPAH
docs/Operator_Installation_Guide.pdf


TEMPAT SAMPAH
docs/Scrum_Artifacts.pdf


TEMPAT SAMPAH
docs/Scrum_Daily.pdf


TEMPAT SAMPAH
docs/Scrum_Plan.pdf


TEMPAT SAMPAH
docs/Scrum_Retro.pdf


TEMPAT SAMPAH
docs/Scrum_Review.pdf


TEMPAT SAMPAH
docs/Scrum_Wiki.pdf


TEMPAT SAMPAH
docs/Start_Stop_Procedures.pdf


TEMPAT SAMPAH
docs/Technical_Document.pdf


TEMPAT SAMPAH
docs/Test_Cases_Sprint8.pdf


TEMPAT SAMPAH
docs/URL_Formats.pdf


TEMPAT SAMPAH
docs/Uninstall_Guide.pdf


TEMPAT SAMPAH
docs/User_Description.pdf


TEMPAT SAMPAH
docs/User_Guide.pdf


TEMPAT SAMPAH
docs/WSL_Deployment.pdf


TEMPAT SAMPAH
docs/Wiki_Home.pdf


TEMPAT SAMPAH
docs/architecture.pdf


TEMPAT SAMPAH
docs/disaster_recovery_plan.pdf


TEMPAT SAMPAH
docs/distributed_deployment.pdf


TEMPAT SAMPAH
docs/docker_connection.pdf


+ 3 - 3
docs/project_report.md

@@ -48,7 +48,7 @@ Below is an exhaustive catalog of every critical file in the repository, detaili
 | **download_csv.sh**<br>`./download_csv.sh` | Downloader helper script that fetches specific smaller subsets of OpenFoodFacts CSV files. | `a701972` | Lange François | 2026/06/16 18:25:32 | *[#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows* |
 | **master_trigger.sh**<br>`./master_trigger.sh` | Orchestrator script that wakes and verifies multiple secondary subservices in sequence. | `a701972` | Lange François | 2026/06/16 18:25:32 | *[#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows* |
 | **manage_services.sh**<br>`./manage_services.sh` | DevOps service manager script. Handles automated, sequential startup, shutdown, restart, and health checking of all container elements in the stack. | `1e316d1` | Lange François | 2026/06/16 09:25:09 | *[#1] Render Mermaid flowcharts, relative cross-linking, and clean up RCS $ placeholders* |
-| **generate_docs.py**<br>`./generate_docs.py` | Dynamic doc generator. Generates and mirrors all markdown manuals under `/docs` with live Git log metadata injection. | `6caac32` | Lange François | 2026/06/16 19:07:16 | *[#1] Remove emojis from markdown manuals to eliminate system symbol font dependencies, and use portable relative font paths in CSS* |
+| **generate_docs.py**<br>`./generate_docs.py` | Dynamic doc generator. Generates and mirrors all markdown manuals under `/docs` with live Git log metadata injection. | `2a1cfbe` | Lange François | 2026/06/16 19:21:55 | *[#1] Fix code block line wrapping and replace literal $ placeholders with correct #ident formatting in descriptions* |
 | **docker-compose.yml**<br>`./docker-compose.yml` | Main 10-container Docker orchestration map defining MySQL, App UI, Ollama Engine, SearXNG, Nginx proxy, Airflow stack, and Zabbix server suites. | `a701972` | Lange François | 2026/06/16 18:25:32 | *[#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows* |
 | **docker-compose_skip.yml**<br>`./docker-compose_skip.yml` | Resilient 8-container offline/local single-node orchestration manifest. | `a701972` | Lange François | 2026/06/16 18:25:32 | *[#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows* |
 | **docker-compose-wsl.yml**<br>`./docker-compose-wsl.yml` | WSL2-specific Docker Compose configuration file. Configures services with a +20 port shift to guarantee zero port conflicts on developer workstations. | `a701972` | Lange François | 2026/06/16 18:25:32 | *[#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows* |
@@ -59,8 +59,8 @@ Below is an exhaustive catalog of every critical file in the repository, detaili
 | **requirements.txt**<br>`./requirements.txt` | Python runtime dependency catalog storing strict library versioning constraints. | `a701972` | Lange François | 2026/06/16 18:25:32 | *[#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows* |
 | **INSTALL_WSL.md**<br>`./INSTALL_WSL.md` | WSL2 deployment guide. Provides step-by-step instructions for installing and deploying the application inside WSL2 with port shifts. | `129180a` | Lange François | 2026/06/15 12:49:05 | *[#1] Add Developer and Agent Productivity Guidelines to guides and agent workflows* |
 | **taiga/local-food-ai-1-36f35ff9-da1b-4eb5-9309-058448c998ad.json**<br>`./taiga/local-food-ai-1-36f35ff9-da1b-4eb5-9309-058448c998ad.json` | Historical Taiga Agile export. Contains the complete project history, including all closed user stories, tasks, and sprint configurations. | `d768ead` | Lange François | 2026/06/01 07:44:40 | *TG-221 #closed - Last commit to sync all the file to ship to the teacher.* |
-| **scripts/generate_pdfs.py**<br>`./scripts/generate_pdfs.py` | PDF document builder. Converts all markdown documentation manuals under `/docs` into high-fidelity PDF format with expanded Git version headers. | `6caac32` | Lange François | 2026/06/16 19:07:16 | *[#1] Remove emojis from markdown manuals to eliminate system symbol font dependencies, and use portable relative font paths in CSS* |
-| **scripts/generate_project_report.py**<br>`./scripts/generate_project_report.py` | Technical project report generator. Automatically gathers codebase structure, Git commit metadata, and purpose records to construct the Project.pdf report. | `1e316d1` | Lange François | 2026/06/16 09:25:09 | *[#1] Render Mermaid flowcharts, relative cross-linking, and clean up RCS $ placeholders* |
+| **scripts/generate_pdfs.py**<br>`./scripts/generate_pdfs.py` | PDF document builder. Converts all markdown documentation manuals under `/docs` into high-fidelity PDF format with expanded Git version headers. | `609bfd1` | Lange François | 2026/06/16 21:00:12 | *[#1] Style code blocks as dark terminal boxes, avoid page-breaks inside pre elements to prevent copy-paste split errors, and update compiled PDFs* |
+| **scripts/generate_project_report.py**<br>`./scripts/generate_project_report.py` | Technical project report generator. Automatically gathers codebase structure, Git commit metadata, and purpose records to construct the Project.pdf report. | `2a1cfbe` | Lange François | 2026/06/16 19:21:55 | *[#1] Fix code block line wrapping and replace literal $ placeholders with correct #ident formatting in descriptions* |
 | **scripts/setup_deploy.py**<br>`./scripts/setup_deploy.py` | DevOps deployment script. Orchestrates local and VM container sets, verifying network connectivity and system parameters. | `a701972` | Lange François | 2026/06/16 18:25:32 | *[#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows* |
 | **scripts/taiga_sync_final.py**<br>`./scripts/taiga_sync_final.py` | Taiga automated synchronization helper. Pushes bug tickets, fills wiki pages, and assigns unassigned user stories. | `a701972` | Lange François | 2026/06/16 18:25:32 | *[#1] Fix PDF corruption via renormalization and add Uninstall Guide for WSL and Windows* |
 

TEMPAT SAMPAH
docs/project_report.pdf


TEMPAT SAMPAH
docs/retro_planning.pdf


TEMPAT SAMPAH
docs/taiga_audit_report.pdf


TEMPAT SAMPAH
docs/zabbix_monitoring.pdf


+ 12 - 25
generate_docs.py

@@ -202,47 +202,33 @@ To install Docker directly inside your WSL Ubuntu instance (without Docker Deskt
 sudo apt remove -y docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc
 ```
 
-### Step 2.2: Add Docker's Official GPG Key & Repository
+### Step 2.2: Add Docker's Official GPG Key & Repository and Install Docker
 ```bash
 sudo apt update
 sudo apt install -y ca-certificates curl
-sudo install -m 0755 -d /etc/apt/keyrings
 sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
-sudo chmod a+r /etc/apt/keyrings/docker.asc
-
-sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
-Types: deb
-URIs: https://download.docker.com/linux/ubuntu
-Suites: \$(. /etc/os-release && echo "\${UBUNTU_CODENAME:-\$VERSION_CODENAME}")
-Components: stable
-Architectures: \$(dpkg --print-architecture)
-Signed-By: /etc/apt/keyrings/docker.asc
-EOF
+echo "deb [arch=\$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu jammy stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
+sudo apt-get update
+sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
 ```
 
-### Step 2.3: Install Docker Components
-```bash
-sudo apt update
-sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
-```
-
-### Step 2.4: Start and Enable Docker Daemon
+### Step 2.3: Start and Enable Docker Daemon
 ```bash
 sudo systemctl start docker
 sudo systemctl enable docker
 ```
 
-### Step 2.5: Add User to the Docker Group
+### Step 2.4: Add User to the Docker Group
 Ensure you can execute Docker commands without `sudo`:
 ```bash
 grep "^docker:" /etc/group || sudo addgroup docker
-sudo usermod -aG docker \$USER
+sudo usermod -aG docker $USER
 ```
 
-### Step 2.6: Reboot the WSL Instance
+### Step 2.5: Reboot the WSL Instance
 Execute the command below inside WSL to gracefully reboot the instance:
 ```bash
-cd /mnt/c/ && cmd.exe /c start "rebooting WSL" cmd /c "timeout 5 && wsl -d \$WSL_DISTRO_NAME" && wsl.exe --terminate \$WSL_DISTRO_NAME
+cd /mnt/c/ && cmd.exe /c start "rebooting WSL" cmd /c "timeout 5 && wsl -d $WSL_DISTRO_NAME" && wsl.exe --terminate $WSL_DISTRO_NAME
 ```
 
 Upon reconnecting, verify Docker is running by starting the hello-world container:
@@ -276,7 +262,7 @@ echo "\$ a
 [network]
 generateResolvConf = false
 .
-w
+W
 q" | sudo ed /etc/wsl.conf
 ```
 
@@ -290,6 +276,7 @@ There are two repositories configured for this project:
 
 Clone the primary repository inside your home directory:
 ```bash
+cd ~
 git clone https://git.btshub.lu/lanfr/LocalFoodAI_lanfr144.git
 cd LocalFoodAI_lanfr144
 ```
@@ -325,7 +312,7 @@ chmod +x data_sync.sh backup_db.sh manage_services.sh scripts/manage_models.sh
 
 Follow the standard runbook to initialize credentials and launch services:
 ```bash
-# 1. Create a local .env file based on step 3 guidelines
+# 1. Create a local [.env file](file:///C:/Users/lanfr144/Documents/DOPRO1/Antigravity/Food/.env) based on [step 3 guidelines](#3-network-configuration--performance-tuning)
 # 2. Run the service manager to spin up containers
 ./manage_services.sh start
 ```

+ 12 - 22
scripts/generate_pdfs.py

@@ -17,24 +17,11 @@ def main():
     root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')).replace('\\', '/')
     
     user_css = """
-    @font-face {
-        font-family: 'Roboto';
-        src: url('docs/fonts/Roboto-Regular.ttf');
-    }
-    @font-face {
-        font-family: 'Roboto';
-        font-weight: bold;
-        src: url('docs/fonts/Roboto-Bold.ttf');
-    }
-    @font-face {
-        font-family: 'RobotoMono';
-        src: url('docs/fonts/RobotoMono-Regular.ttf');
-    }
     * {
         color: #1a1a1a !important;
     }
     body {
-        font-family: 'Roboto', sans-serif;
+        font-family: 'Helvetica', 'Arial', sans-serif !important;
         color: #1a1a1a !important;
         background-color: #ffffff !important;
     }
@@ -44,24 +31,24 @@ def main():
     pre {
         background-color: #212529 !important;
         border: 1px solid #343a40 !important;
-        padding: 10px !important;
-        border-radius: 4px !important;
-        margin: 10px 0 !important;
-        font-family: 'RobotoMono', monospace !important;
+        padding: 2px !important;
+        border-radius: 3px !important;
+        font-family: 'Courier New', 'Courier', monospace !important;
+        font-size: 10pt !important;
         white-space: pre-wrap !important;
         word-break: break-all !important;
-        page-break-inside: avoid !important;
-        break-inside: avoid !important;
     }
     pre code, pre * {
-        font-family: 'RobotoMono', monospace !important;
+        font-family: 'Courier New', 'Courier', monospace !important;
+        font-size: 10pt !important;
         color: #f8f9fa !important;
         background-color: #212529 !important;
         white-space: pre-wrap !important;
         word-break: break-all !important;
     }
     code {
-        font-family: 'RobotoMono', monospace !important;
+        font-family: 'Courier New', 'Courier', monospace !important;
+        font-size: 10pt !important;
         color: #b02a37 !important;
         background-color: #f8f9fa !important;
         padding: 2px 4px !important;
@@ -143,6 +130,9 @@ def main():
         # Clean up absolute file:/// paths to relative paths
         md_content = re.sub(r'file:///.*?/docs/([a-zA-Z0-9_-]+)\.md', r'\1.pdf', md_content, flags=re.IGNORECASE)
         md_content = re.sub(r'file:///.*?/Food/([a-zA-Z0-9_.-]+)', r'../\1', md_content, flags=re.IGNORECASE)
+        
+        # Add <br/> after code blocks to force copy-paste blank line
+        md_content = re.sub(r'(```[a-zA-Z0-9_-]*\n[\s\S]*?\n```)', r'\1\n<br/>', md_content)
 
         try:
             pdf = MarkdownPdf(toc_level=2, optimize=True, plugins={"mermaid": {}})