Spiega documentation

present documentation
work with tech

present this documentation

The documentation is made with mardown and .org files. We need to convert those files into a public documentation. For portfolio creation look at portfolio creation. First of all we need to include the header template in every file with the command [C-t h] which reads header_org.org.

.org files are really versatile and can export to many other formats.

pdf
using LaTeX or postscript
html
with different exporting options
html reveal
mainly using reveal.js with reveal_custom.css
html slides
my custom scripts slide.js and slide.css

This file will be outputted as blog post or slides.

slides

Here we use two main libraries

reveal
reveal.js example org to reveal
custom

reveal

There are multiple options to turn org files into reveal slides

create animations

Blender has its own scripting tab but it doesn’t fit in my workflow where I use python REPL and LLMs to test the commands. Blender has an addon called blender-mcp which allows to access blender methods from outside. So I need to run the mcp server with transport http:

cd ~/lav/src/blender_twin/deploy/mcp_client/
#bash ./blender_local_client.sh &
cd $HOME/lav/src/blender_twin/deploy/mcp_client/blender_mcp_example_code/mcp/blmcp/ 
#python3 -m blmcp
uv --directory $HOME/lav/src/blender_twin/deploy/mcp_client/blender_mcp_example_code/mcp run blender-mcp --transport http --port 9191 &

I then need a container as defined in docker_compose.yml to create a bridge between the host and the containers within docker network.

blender-mcp-bridge:
  image: alpine/socat:latest
  container_name: blender-mcp-bridge
  network_mode: "host"
  command: TCP-LISTEN:19191,fork,reuseaddr TCP:127.0.0.1:9191
  restart: unless-stopped

I can then work on a script create_animation.py or let an LLM test the blender code without exiting the container.

Mermaid produces svg files which are loaded in blender apart from text which is not recognized. For that we created a script text2svg.py to load each text tag, load a font and create a path around that text. We apply as well some grouping logic so the import in blender is smoother.

cd ~/lav/src/spiega/script/
python3 text2svg.py ~/lav/siti/f/f_twin/arch_diagram.svg
mv output.svg ~/VideoProd/in_prog/graph/arch_dia.svg
File processed: /home/sabeiro/lav/siti/f/f_twin/arch_diagram.svgresults in output.svg

voice over

To speed up voice over we use some tools like

cd ~/VideoProd/in_prog/graph/
#pip install auto-editor
auto-editor 
mv output.svg ~/VideoProd/in_prog/graph/arch_dia.svg

exporting

We started with many tools and we tried to minimize the dependencies so over time I removed the dependencies from tools like `markdown` and `pandoc`. I rather use my own header and footer templates In emacs.el we define most of the configurations and load the libraries. In reveal_config.org we have the additional configurations for export.

conversion scripts

Each website uses different scripts

spiega
technical blog
viudi
music website
blender_twin
project docs
foto
photography website
viaggi
travel website
scritti
personal blog

Where I built custom lisp and python files for tag manipulations.

export options

We can visualize the current export options with:

[C-c C-e t]

#+TITLE:       the title to be shown (default is the buffer name)
#+AUTHOR:      the author (default taken from user-full-name)
#+DATE:        a date, an Org timestamp120, or a format string for format-time-string
#+EMAIL:       his/her email address (default from user-mail-address)
#+DESCRIPTION: the page description, e.g. for the XHTML meta tag
#+KEYWORDS:    the page keywords, e.g. for the XHTML meta tag
#+LANGUAGE:    language for HTML, e.g. ‘en’ (org-export-default-language)
#+TEXT:        Some descriptive text to be inserted at the beginning.
#+TEXT:        Several lines may be given.
#+OPTIONS:     H:2 num:t toc:t \n:nil @:t ::t |:t ^:t f:t TeX:t ...
#+BIND:        lisp-var lisp-val, e.g.: org-export-latex-low-levels itemize
               You need to confirm using these, or configure org-export-allow-BIND
#+LINK_UP:     the ``up'' link of an exported page
#+LINK_HOME:   the ``home'' link of an exported page
#+LATEX_HEADER: extra line(s) for the LaTeX header, like \usepackage{xyz}
#+EXPORT_SELECT_TAGS:   Tags that select a tree for export
#+EXPORT_EXCLUDE_TAGS:  Tags that exclude a tree from export
#+XSLT:        the XSLT stylesheet used by DocBook exporter to generate FO file

The options we have are:

H:         set the number of headline levels for export
num:       turn on/off section-numbers
toc:       turn on/off table of contents, or set level limit (integer)
\n:        turn on/off line-break-preservation (DOES NOT WORK)
@:         turn on/off quoted HTML tags
::         turn on/off fixed-width sections
|:         turn on/off tables
^:         turn on/off TeX-like syntax for sub- and superscripts.  If
you write "^:{}", a_{b} will be interpreted, but
the simple a_b will be left as it is.
-:         turn on/off conversion of special strings.
f:         turn on/off footnotes like this[1].
todo:      turn on/off inclusion of TODO keywords into exported text
tasks:     turn on/off inclusion of tasks (TODO items), can be nil to remove
all tasks, todo to remove DONE tasks, or list of kwds to keep
pri:       turn on/off priority cookies
tags:      turn on/off inclusion of tags, may also be not-in-toc
<:         turn on/off inclusion of any time/date stamps like DEADLINES
*:         turn on/off emphasized text (bold, italic, underlined)
TeX:       turn on/off simple TeX macros in plain text
LaTeX:     configure export of LaTeX fragments.  Default auto
skip:      turn on/off skipping the text before the first heading
author:    turn on/off inclusion of author name/email into exported file
email:     turn on/off inclusion of author email into exported file
creator:   turn on/off inclusion of creator info into exported file
timestamp: turn on/off inclusion creation time into exported file
d:         turn on/off inclusion of drawers

A typical syntax:

#+OPTIONS:     H:2 num:t toc:t \n:nil @:t ::t |:t ^:t f:t TeX:t ...
(org-insert-export-options-template)

export scripts

We use multiple scripts to export, convert and publish the org files into slides, blog articles and pages: org-export.

html compatibility

An exhaustive guide.

> export iframe

html css

We can add css style in the page

publish

References ref1, ref2, ref3, ref4, ref5, ref6, ref7

.org files allow the publishing option as defined in emacs.el where I can set a project and the publishing directory. All the .org files in the `base-directory` will be converted into the `publishing-directory` and the pictures will be copied.

(setq org-publish-project-alist
      `(("pages"
         :base-directory "~/lav/src/spiega/blender_twin/"
         :publishing-directory "~/lav/siti/blender_twin/a/"
         :publishing-function roam-publication-wrapper
         :recursive t
         :html-head "<link rel=\"stylesheet\" href=\"static_html//css/org.css\" type=\"text/css\"/>\n"
         )
        ("static"
         :base-directory "~/lav/src/spiega/static/blender_twin/"
         :base-extension "jpg\\|gif\\|png\\|svg\\|css\\|js"
         :recursive t
         :publishing-directory "~/lav/siti/blender_twin/"
         :publishing-function org-publish-attachment)
      ("blender_twin" :components ("pages" "static"))))
(org-publish "blender_twin" t)

In case run a webserver

cd ~/lav/siti/blender_twin
python3 -m http.server

thumbnail

Copy default thumbnail if no other is provided

cd ~/lav/siti/f/f_stage
for i in ~/lav/src/spiega/article/* ;
do
    titN1=${i%.org}
    titN=${titN1##*/}
    thumbF=thumb_$titN.png
    if [ ! -f $thumbF ]; then
        echo $titN
        cp thumb_spiega.png $thumbF
    fi
done
activation.html
admin_tool.html
agent_compensation.html
agent_instruction
agent_naming.html
antani_concept.html
antani_infra.html
antani_integration.html
antani_kpi.html
antani_overview.html
app.html
audio_mixer.html
backup_sync
bibliography.bib
bib.tex
blindtest.html
causality.html
cloud_provider.html
coiler.html
commercial.html
company_tools.html
competences.csv
competences.html
contact_channel.html
cplusplus.html
creative_coding.html
customer_lifetime.html
data_compliance.html
data_modeling.html
data_platform.html
data_storage.html
data_viz.html
deployment.html
documentation.html
dsp.html
emacs_llm
experience.html
feature_relevance.html
filatto_infra.html
flute.html
generative.html
geo_admin
geomadi_graph.html
geo.html
go.html
index.html
interview.csv
javascript.html
lagged_metrics.html
lernia_feature.html
lernia.html
llm_provider
location.html
logs_proc.html
machine_learning.html
mallink_engine.html
management_lead
mc_amp.html
messaging.html
middleware.html
midi_hub.html
midiRecord.txt
mini_hub.html
ml_basics.html
ml_eng.html
model.glb
monte_carlo.html
motion.html
motorway.html
music_composition.html
music_entropy.html
music_evaluation.html
neural_networks.html
nodejs.html
node.html
no_key_board.html
offer_segmentation.html
org_creator
overview.html
personal_profile.yml
piezo_buffer.html
portfolio.yml
praxis.html
prediction.html
prediction_telemetry.html
productivity_tools
programming_praxis.html
python.html
queries.html
redgreen_repeat
restaurant.html
resume.yml
ride.html
R.html
route.html
routific.html
scheduler.html
security.html
series_prod.html
skills.yml
spark.html
spatial_data.html
sql.html
synth.html
team_composition
tech.html
tech_stack.html
telemetry_data_quality.html
telemetry_data_sets.html
telemetry_forecast.html
telemetry_prediction.html
telemetry_quality.html
telemetry_spatial.html
testing.html
test_table.data
text_gen.html
traffic_motorway.html
train_mapping.html
train_reference.html
triangulation.html
video_production.html
webserver.html
websites.html

emacs reveal slides

Emacs has many packages to convert .org into html + reveal.js, the most common is org-reveal but I tested org-re-reveal, emacs-reveal, oer-reveal, ox-reveal and they all cause headaches.

I had to pick manually select files from reveal.js and put them in the same order in the folder reveal/ with the same relative paths.

I tend to prefer `org-reveal` which has least dependencies.

TODO export file

I need to figure out how to change filename (add _slide) and how to move it to another directory

script

We use one command to export this file to reveal.js and move it to the final folder.

(org-reveal-export-to-html)
;;(org-re-reveal-export-to-html)
;;; xml-rpc-autoloads.el --- automatically extracted autoloads (do not edit)   -*- lexical-binding: t -*-
;; Generated by the `loaddefs-generate' function.

;; This file is part of GNU Emacs.

;;; Code:

(provide 'xml-rpc-autoloads)

;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; no-native-compile: t
;; coding: utf-8-emacs-unix
;; End:

;;; xml-rpc-autoloads.el ends here
;;; writegood-mode-autoloads.el --- automatically extracted autoloads (do not edit)   -*- lexical-binding: t -*-
;; Generated by the `loaddefs-generate' function.

;; This file is part of GNU Emacs.

;;; Code:

(provide 'writegood-mode-autoloads)

;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; no-native-compile: t
;; coding: utf-8-emacs-unix
;; End:

;;; writegood-mode-autoloads.el ends here
;;; metaweblog-autoloads.el --- automatically extracted autoloads (do not edit)   -*- lexical-binding: t -*-
;; Generated by the `loaddefs-generate' function.

;; This file is part of GNU Emacs.

;;; Code:

(provide 'metaweblog-autoloads)

;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; no-native-compile: t
;; coding: utf-8-emacs-unix
;; End:

;;; metaweblog-autoloads.el ends here
;;; org2blog-autoloads.el --- automatically extracted autoloads (do not edit)   -*- lexical-binding: t -*-
;; Generated by the `loaddefs-generate' function.

;; This file is part of GNU Emacs.

;;; Code:

(provide 'org2blog-autoloads)

;; Local Variables:
;; version-control: never
;; no-byte-compile: t
;; no-update-autoloads: t
;; no-native-compile: t
;; coding: utf-8-emacs-unix
;; End:

;;; org2blog-autoloads.el ends here
mv documentation_present.html ~/lav/siti/spiega/a/documentation_present_slide.html
#firefox http://localhost/spiega/a/documentation_present_slide.html

TODO oer package

Here we test the oer package

(use-package oer-reveal-publish)
(oer-reveal-setup-submodules t)
(oer-reveal-generate-include-files t)
(oer-reveal-publish-setq-defaults)
(setq oer-reveal-publish-babel-languages '((dot . t) (emacs-lisp . t))
      org-publish-project-alist
      (list (list "img"
                  :base-directory "~/lav/siti/blender_twin/"
                  :base-extension "png"
                  :publishing-function 'org-publish-attachment
                  :publishing-directory "~/lav/siti/f/f_twin/")))
img :base-directory ~/lav/siti/blender_twin/ :base-extension png :publishing-function org-publish-attachment :publishing-directory ~/lav/siti/f/f_twin/

wrap in tags

(use-package wrap-region)
(wrap-region-add-wrapper "<div class=\"r-stack\">" "</div>")

(lambda (arg) (interactive p) (wrap-region-trigger arg <div class=“r-stack”>))

slide generation from .org and .html

emacs has a lot of publishing options but in some cases I need a really custom design and therefore I strip header and footer from the html and append my own. We have a bash file for that convert_slide.sh. I need as well to convert the mermaid svg graph into a format blender can import which means first of all to convert the plain text into path which is accomplished by text2svg. This script tries as well to rename path ids to allow easier grouping into blender.

cd $HOME/lav/src/spiega/script/
bash ./convert.sh 
#bash ./text2svg.sh
###        /home/sabeiro/lav/src/spiega/article//documentation_present.org

open graph

We want to create open graph descriptions and

	<!-- Open Graph -->
<meta property="og:title" content="technical blog">
<meta property="og:description" content="technical blog, a collection of articles/post written during 17y of career spanning over 3k3 source code files and 2k images">
<meta property="og:url" content="https://intertino.it/spiega/a/spiega.html">
<meta property="og:image" content="https://intertino.it/f/f_stage/module_library_small.png">
cd ~/lav/siti/f/f_stage/
for i in ~/lav/src/spiega/markdown/*.org;
do
    titN1=${i%.org}
    titN=${titN1##*/}
    cp module_library_small.png thumb_$titN.png
done

references

There are multiple guides with many different outcomes:

systemcrafters

convert folder

We mainly use following script to convert the documentation.

(org-publish-current-project)
#rm ~/lav/siti/spiega/a/*
#rm ~/lav/siti/scritti/p/*
cd $HOME/lav/src/spiega
bash ./script/convert.sh
elogio noia
/home/sabeiro/lav/siti/scritti//a/elogio_noia.html

blog

Let’s find a way to create a blog out of a folder of org files.

References: ref1, ref2, ref3, ref4

A wordpress approach:

(use-package org2blog) ;;uses wordpress

Date: 2026-09-07 Mon 00:00

Author: sabeiro

Created: 2026-09-10 Thu 12:16

Validate